VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/bsd/sys/mbuf.h

最後變更 在這個檔案是 93944,由 vboxsync 提交於 3 年 前

Devices: Must not use PAGE_SIZE, PAGE_SHIFT, PAGE_OFFSET_MASK, PAGE_ADDRESS or PHYS_PAGE_ADDRESS here either. bugref:9898

  • 屬性 svn:eol-style 設為 native
檔案大小: 36.1 KB
 
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * @(#)mbuf.h 8.5 (Berkeley) 2/19/95
31 * $FreeBSD: src/sys/sys/mbuf.h,v 1.217.2.3.4.1 2009/04/15 03:14:26 kensmith Exp $
32 */
33
34#ifndef _SYS_MBUF_H_
35#define _SYS_MBUF_H_
36
37#ifndef VBOX
38/* XXX: These includes suck. Sorry! */
39#include <sys/queue.h>
40#ifdef _KERNEL
41#include <sys/systm.h>
42#include <vm/uma.h>
43#ifdef WITNESS
44#include <sys/lock.h>
45#endif
46#endif
47#else /* VBOX */
48# include <VBox/param.h>
49# include "misc.h"
50# include "ext.h"
51
52typedef const char *c_caddr_t;
53
54DECL_NO_RETURN(static void) panic (char *fmt, ...)
55{
56 va_list args;
57 va_start(args, fmt);
58 vbox_slirp_printV(fmt, args);
59 va_end(args);
60 AssertFatalFailed();
61}
62/* for non-gnu compilers */
63# define __func__ RT_GCC_EXTENSION __FUNCTION__
64# ifndef __inline
65# ifdef __GNUC__
66# define __inline __inline__
67# else
68# define __inline
69# endif
70# endif
71
72# undef bzero
73# define bzero(a1, len) memset((a1), 0, (len))
74
75/* (vvl) some definitions from sys/param.h */
76/*
77 * Constants related to network buffer management.
78 * MCLBYTES must be no larger than HOST_PAGE_SIZE.
79 */
80# ifndef MSIZE
81# define MSIZE 256 /* size of an mbuf */
82# endif /* MSIZE */
83
84# ifndef MCLSHIFT
85# define MCLSHIFT 11 /* convert bytes to mbuf clusters */
86# endif /* MCLSHIFT */
87
88# ifndef MCLBYTES
89# define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
90# endif /*MCLBYTES*/
91
92# if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
93# define MJUMPAGESIZE HOST_PAGE_SIZE /* jumbo cluster 4k */
94# else
95# define MJUMPAGESIZE (4 * 1024) /* jumbo cluster 4k */
96# endif
97# define MJUM9BYTES (9 * 1024) /* jumbo cluster 9k */
98# define MJUM16BYTES (16 * 1024) /* jumbo cluster 16k */
99#endif /* VBOX */
100
101/*
102 * Mbufs are of a single size, MSIZE (sys/param.h), which includes overhead.
103 * An mbuf may add a single "mbuf cluster" of size MCLBYTES (also in
104 * sys/param.h), which has no additional overhead and is used instead of the
105 * internal data area; this is done when at least MINCLSIZE of data must be
106 * stored. Additionally, it is possible to allocate a separate buffer
107 * externally and attach it to the mbuf in a way similar to that of mbuf
108 * clusters.
109 */
110#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */
111#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */
112#define MINCLSIZE (MHLEN + 1) /* smallest amount to put in cluster */
113#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */
114
115#if defined(_KERNEL) || defined(VBOX)
116/*-
117 * Macros for type conversion:
118 * mtod(m, t) -- Convert mbuf pointer to data pointer of correct type.
119 * dtom(x) -- Convert data pointer within mbuf to mbuf pointer (XXX).
120 */
121#define mtod(m, t) ((t)((m)->m_data))
122#define dtom(x) ((struct mbuf *)((intptr_t)(x) & ~(MSIZE-1)))
123
124/*
125 * Argument structure passed to UMA routines during mbuf and packet
126 * allocations.
127 */
128struct mb_args {
129 int flags; /* Flags for mbuf being allocated */
130 short type; /* Type of mbuf being allocated */
131};
132#endif /* _KERNEL */
133
134#if defined(__LP64__)
135#define M_HDR_PAD 6
136#else
137#define M_HDR_PAD 2
138#endif
139
140/*
141 * Header present at the beginning of every mbuf.
142 */
143struct m_hdr {
144 struct mbuf *mh_next; /* next buffer in chain */
145 struct mbuf *mh_nextpkt; /* next chain in queue/record */
146 caddr_t mh_data; /* location of data */
147 int mh_len; /* amount of data in this mbuf */
148 int mh_flags; /* flags; see below */
149 short mh_type; /* type of data in this mbuf */
150#ifdef VBOX
151 struct socket *mh_so; /*socket assotiated with mbuf*/
152 TAILQ_ENTRY(mbuf) mh_ifq;
153#endif
154 uint8_t pad[M_HDR_PAD];/* word align */
155};
156
157/*
158 * Packet tag structure (see below for details).
159 */
160struct m_tag {
161 SLIST_ENTRY(m_tag) m_tag_link; /* List of packet tags */
162 u_int16_t m_tag_id; /* Tag ID */
163 u_int16_t m_tag_len; /* Length of data */
164 u_int32_t m_tag_cookie; /* ABI/Module ID */
165 void (*m_tag_free)(struct m_tag *);
166};
167
168/*
169 * Record/packet header in first mbuf of chain; valid only if M_PKTHDR is set.
170 */
171struct pkthdr {
172 struct ifnet *rcvif; /* rcv interface */
173 /* variables for ip and tcp reassembly */
174 void *header; /* pointer to packet header */
175 int len; /* total packet length */
176 /* variables for hardware checksum */
177 int csum_flags; /* flags regarding checksum */
178 int csum_data; /* data field used by csum routines */
179 u_int16_t tso_segsz; /* TSO segment size */
180 u_int16_t ether_vtag; /* Ethernet 802.1p+q vlan tag */
181 SLIST_HEAD(packet_tags, m_tag) tags; /* list of packet tags */
182};
183
184/*
185 * Description of external storage mapped into mbuf; valid only if M_EXT is
186 * set.
187 */
188struct m_ext {
189 caddr_t ext_buf; /* start of buffer */
190 void (*ext_free) /* free routine if not the usual */
191 (void *, void *);
192 void *ext_args; /* optional argument pointer */
193 u_int ext_size; /* size of buffer, for ext_free */
194#ifdef VBOX
195 volatile uint32_t *ref_cnt; /* pointer to ref count info */
196#else
197 volatile u_int *ref_cnt; /* pointer to ref count info */
198#endif
199 int ext_type; /* type of external storage */
200};
201
202/*
203 * The core of the mbuf object along with some shortcut defines for practical
204 * purposes.
205 */
206struct mbuf {
207 struct m_hdr m_hdr;
208 union {
209 struct {
210 struct pkthdr MH_pkthdr; /* M_PKTHDR set */
211 union {
212 struct m_ext MH_ext; /* M_EXT set */
213 char MH_databuf[MHLEN];
214 } MH_dat;
215 } MH;
216 char M_databuf[MLEN]; /* !M_PKTHDR, !M_EXT */
217 } M_dat;
218};
219#define m_next m_hdr.mh_next
220#define m_len m_hdr.mh_len
221#define m_data m_hdr.mh_data
222#define m_type m_hdr.mh_type
223#define m_flags m_hdr.mh_flags
224#define m_nextpkt m_hdr.mh_nextpkt
225#define m_act m_nextpkt
226#define m_pkthdr M_dat.MH.MH_pkthdr
227#define m_ext M_dat.MH.MH_dat.MH_ext
228#define m_pktdat M_dat.MH.MH_dat.MH_databuf
229#define m_dat M_dat.M_databuf
230#ifdef VBOX
231# define m_so m_hdr.mh_so
232# define ifq_so m_hdr.mh_so
233# define m_ifq m_hdr.mh_ifq
234#endif
235
236/*
237 * mbuf flags.
238 */
239#define M_EXT 0x00000001 /* has associated external storage */
240#define M_PKTHDR 0x00000002 /* start of record */
241#define M_EOR 0x00000004 /* end of record */
242#define M_RDONLY 0x00000008 /* associated data is marked read-only */
243#define M_PROTO1 0x00000010 /* protocol-specific */
244#define M_PROTO2 0x00000020 /* protocol-specific */
245#define M_PROTO3 0x00000040 /* protocol-specific */
246#define M_PROTO4 0x00000080 /* protocol-specific */
247#define M_PROTO5 0x00000100 /* protocol-specific */
248#define M_BCAST 0x00000200 /* send/received as link-level broadcast */
249#define M_MCAST 0x00000400 /* send/received as link-level multicast */
250#define M_FRAG 0x00000800 /* packet is a fragment of a larger packet */
251#define M_FIRSTFRAG 0x00001000 /* packet is first fragment */
252#define M_LASTFRAG 0x00002000 /* packet is last fragment */
253#define M_SKIP_FIREWALL 0x00004000 /* skip firewall processing */
254#define M_FREELIST 0x00008000 /* mbuf is on the free list */
255#define M_VLANTAG 0x00010000 /* ether_vtag is valid */
256#define M_PROMISC 0x00020000 /* packet was not for us */
257#define M_NOFREE 0x00040000 /* do not free mbuf, embedded in cluster */
258#define M_PROTO6 0x00080000 /* protocol-specific */
259#define M_PROTO7 0x00100000 /* protocol-specific */
260#define M_PROTO8 0x00200000 /* protocol-specific */
261/*
262 * For RELENG_{6,7} steal these flags for limited multiple routing table
263 * support. In RELENG_8 and beyond, use just one flag and a tag.
264 */
265#define M_FIB 0xF0000000 /* steal some bits to store fib number. */
266
267#define M_NOTIFICATION M_PROTO5 /* SCTP notification */
268
269/*
270 * Flags to purge when crossing layers.
271 */
272#define M_PROTOFLAGS \
273 (M_PROTO1|M_PROTO2|M_PROTO3|M_PROTO4|M_PROTO5|M_PROTO6|M_PROTO7|M_PROTO8)
274
275/*
276 * Flags preserved when copying m_pkthdr.
277 */
278#define M_COPYFLAGS \
279 (M_PKTHDR|M_EOR|M_RDONLY|M_PROTOFLAGS|M_SKIP_FIREWALL|M_BCAST|M_MCAST|\
280 M_FRAG|M_FIRSTFRAG|M_LASTFRAG|M_VLANTAG|M_PROMISC|M_FIB)
281
282/*
283 * External buffer types: identify ext_buf type.
284 */
285#define EXT_CLUSTER 1 /* mbuf cluster */
286#define EXT_SFBUF 2 /* sendfile(2)'s sf_bufs */
287#define EXT_JUMBOP 3 /* jumbo cluster 4096 bytes */
288#define EXT_JUMBO9 4 /* jumbo cluster 9216 bytes */
289#define EXT_JUMBO16 5 /* jumbo cluster 16184 bytes */
290#define EXT_PACKET 6 /* mbuf+cluster from packet zone */
291#define EXT_MBUF 7 /* external mbuf reference (M_IOVEC) */
292#define EXT_NET_DRV 100 /* custom ext_buf provided by net driver(s) */
293#define EXT_MOD_TYPE 200 /* custom module's ext_buf type */
294#define EXT_DISPOSABLE 300 /* can throw this buffer away w/page flipping */
295#define EXT_EXTREF 400 /* has externally maintained ref_cnt ptr */
296
297/*
298 * Flags indicating hw checksum support and sw checksum requirements. This
299 * field can be directly tested against if_data.ifi_hwassist.
300 */
301#define CSUM_IP 0x0001 /* will csum IP */
302#define CSUM_TCP 0x0002 /* will csum TCP */
303#define CSUM_UDP 0x0004 /* will csum UDP */
304#define CSUM_IP_FRAGS 0x0008 /* will csum IP fragments */
305#define CSUM_FRAGMENT 0x0010 /* will do IP fragmentation */
306#define CSUM_TSO 0x0020 /* will do TSO */
307
308#define CSUM_IP_CHECKED 0x0100 /* did csum IP */
309#define CSUM_IP_VALID 0x0200 /* ... the csum is valid */
310#define CSUM_DATA_VALID 0x0400 /* csum_data field is valid */
311#define CSUM_PSEUDO_HDR 0x0800 /* csum_data has pseudo hdr */
312
313#define CSUM_DELAY_DATA (CSUM_TCP | CSUM_UDP)
314#define CSUM_DELAY_IP (CSUM_IP) /* XXX add ipv6 here too? */
315
316/*
317 * mbuf types.
318 */
319#define MT_NOTMBUF 0 /* USED INTERNALLY ONLY! Object is not mbuf */
320#define MT_DATA 1 /* dynamic (data) allocation */
321#define MT_HEADER MT_DATA /* packet header, use M_PKTHDR instead */
322#define MT_SONAME 8 /* socket name */
323#define MT_CONTROL 14 /* extra-data protocol message */
324#define MT_OOBDATA 15 /* expedited data */
325#define MT_NTYPES 16 /* number of mbuf types for mbtypes[] */
326
327#define MT_NOINIT 255 /* Not a type but a flag to allocate
328 a non-initialized mbuf */
329
330#define MB_NOTAGS 0x1UL /* no tags attached to mbuf */
331
332/*
333 * General mbuf allocator statistics structure.
334 *
335 * Many of these statistics are no longer used; we instead track many
336 * allocator statistics through UMA's built in statistics mechanism.
337 */
338struct mbstat {
339 u_long m_mbufs; /* XXX */
340 u_long m_mclusts; /* XXX */
341
342 u_long m_drain; /* times drained protocols for space */
343 u_long m_mcfail; /* XXX: times m_copym failed */
344 u_long m_mpfail; /* XXX: times m_pullup failed */
345 u_long m_msize; /* length of an mbuf */
346 u_long m_mclbytes; /* length of an mbuf cluster */
347 u_long m_minclsize; /* min length of data to allocate a cluster */
348 u_long m_mlen; /* length of data in an mbuf */
349 u_long m_mhlen; /* length of data in a header mbuf */
350
351 /* Number of mbtypes (gives # elems in mbtypes[] array) */
352 short m_numtypes;
353
354 /* XXX: Sendfile stats should eventually move to their own struct */
355 u_long sf_iocnt; /* times sendfile had to do disk I/O */
356 u_long sf_allocfail; /* times sfbuf allocation failed */
357 u_long sf_allocwait; /* times sfbuf allocation had to wait */
358};
359
360/*
361 * Flags specifying how an allocation should be made.
362 *
363 * The flag to use is as follows:
364 * - M_DONTWAIT or M_NOWAIT from an interrupt handler to not block allocation.
365 * - M_WAIT or M_WAITOK or M_TRYWAIT from wherever it is safe to block.
366 *
367 * M_DONTWAIT/M_NOWAIT means that we will not block the thread explicitly and
368 * if we cannot allocate immediately we may return NULL, whereas
369 * M_WAIT/M_WAITOK/M_TRYWAIT means that if we cannot allocate resources we
370 * will block until they are available, and thus never return NULL.
371 *
372 * XXX Eventually just phase this out to use M_WAITOK/M_NOWAIT.
373 */
374#define MBTOM(how) (how)
375#ifndef VBOX
376#define M_DONTWAIT M_NOWAIT
377#define M_TRYWAIT M_WAITOK
378#define M_WAIT M_WAITOK
379#else
380/* @todo (r=vvl) not sure we can do it in NAT */
381# define M_WAITOK 0
382# define M_NOWAIT 0
383# define M_DONTWAIT 0
384# define M_TRYWAI 0
385# define M_WAIT 0
386#endif
387
388/*
389 * String names of mbuf-related UMA(9) and malloc(9) types. Exposed to
390 * !_KERNEL so that monitoring tools can look up the zones with
391 * libmemstat(3).
392 */
393#define MBUF_MEM_NAME "mbuf"
394#define MBUF_CLUSTER_MEM_NAME "mbuf_cluster"
395#define MBUF_PACKET_MEM_NAME "mbuf_packet"
396#define MBUF_JUMBOP_MEM_NAME "mbuf_jumbo_pagesize"
397#define MBUF_JUMBO9_MEM_NAME "mbuf_jumbo_9k"
398#define MBUF_JUMBO16_MEM_NAME "mbuf_jumbo_16k"
399#define MBUF_TAG_MEM_NAME "mbuf_tag"
400#define MBUF_EXTREFCNT_MEM_NAME "mbuf_ext_refcnt"
401
402#if defined(_KERNEL) || defined(VBOX)
403
404#ifdef WITNESS
405#define MBUF_CHECKSLEEP(how) do { \
406 if (how == M_WAITOK) \
407 WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, \
408 "Sleeping in \"%s\"", __func__); \
409} while (0)
410#else
411#define MBUF_CHECKSLEEP(how)
412#endif
413
414/*
415 * Network buffer allocation API
416 *
417 * The rest of it is defined in kern/kern_mbuf.c
418 */
419
420#ifndef VBOX
421extern uma_zone_t zone_mbuf;
422extern uma_zone_t zone_clust;
423extern uma_zone_t zone_pack;
424extern uma_zone_t zone_jumbop;
425extern uma_zone_t zone_jumbo9;
426extern uma_zone_t zone_jumbo16;
427extern uma_zone_t zone_ext_refcnt;
428#endif
429
430#ifndef VBOX
431static __inline struct mbuf *m_getcl(int how, short type, int flags);
432static __inline struct mbuf *m_get(int how, short type);
433static __inline struct mbuf *m_gethdr(int how, short type);
434static __inline struct mbuf *m_getjcl(int how, short type, int flags,
435 int size);
436static __inline struct mbuf *m_getclr(int how, short type); /* XXX */
437static __inline struct mbuf *m_free(struct mbuf *m);
438static __inline void m_clget(struct mbuf *m, int how);
439static __inline void *m_cljget(struct mbuf *m, int how, int size);
440void mb_free_ext(struct mbuf *);
441#else
442static __inline struct mbuf *m_getcl(PNATState pData, int how, short type, int flags);
443static __inline struct mbuf *m_get(PNATState pData, int how, short type);
444static __inline struct mbuf *m_gethdr(PNATState pData, int how, short type);
445static __inline struct mbuf *m_getjcl(PNATState pData, int how,
446 short type, int flags, int size);
447static __inline struct mbuf *m_getclr(PNATState pData, int how, short type); /* XXX */
448static __inline struct mbuf *m_free(PNATState pData, struct mbuf *m);
449static __inline void m_clget(PNATState pData, struct mbuf *m, int how);
450static __inline void *m_cljget(PNATState pData, struct mbuf *m, int how, int size);
451void mb_free_ext(PNATState, struct mbuf *);
452#endif
453static __inline void m_chtype(struct mbuf *m, short new_type);
454static __inline struct mbuf *m_last(struct mbuf *m);
455
456static __inline int
457m_gettype(int size)
458{
459 int type;
460
461 switch (size) {
462 case MSIZE:
463 type = EXT_MBUF;
464 break;
465 case MCLBYTES:
466 type = EXT_CLUSTER;
467 break;
468#if MJUMPAGESIZE != MCLBYTES
469 case MJUMPAGESIZE:
470 type = EXT_JUMBOP;
471 break;
472#endif
473 case MJUM9BYTES:
474 type = EXT_JUMBO9;
475 break;
476 case MJUM16BYTES:
477 type = EXT_JUMBO16;
478 break;
479 default:
480 panic("%s: m_getjcl: invalid cluster size", __func__);
481 }
482
483 return (type);
484}
485
486static __inline uma_zone_t
487#ifndef VBOX
488m_getzone(int size)
489#else
490m_getzone(PNATState pData, int size)
491#endif
492{
493 uma_zone_t zone;
494
495 switch (size) {
496 case MSIZE:
497 zone = zone_mbuf;
498 break;
499 case MCLBYTES:
500 zone = zone_clust;
501 break;
502#if MJUMPAGESIZE != MCLBYTES
503 case MJUMPAGESIZE:
504 zone = zone_jumbop;
505 break;
506#endif
507 case MJUM9BYTES:
508 zone = zone_jumbo9;
509 break;
510 case MJUM16BYTES:
511 zone = zone_jumbo16;
512 break;
513 default:
514 panic("%s: m_getjcl: invalid cluster type", __func__);
515 }
516
517 return (zone);
518}
519
520static __inline struct mbuf *
521#ifndef VBOX
522m_get(int how, short type)
523#else
524m_get(PNATState pData, int how, short type)
525#endif
526{
527 struct mb_args args;
528
529 args.flags = 0;
530 args.type = type;
531 return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how)));
532}
533
534/*
535 * XXX This should be deprecated, very little use.
536 */
537static __inline struct mbuf *
538#ifndef VBOX
539m_getclr(int how, short type)
540#else
541m_getclr(PNATState pData, int how, short type)
542#endif
543{
544 struct mbuf *m;
545 struct mb_args args;
546
547 args.flags = 0;
548 args.type = type;
549 m = uma_zalloc_arg(zone_mbuf, &args, how);
550 if (m != NULL)
551 bzero(m->m_data, MLEN);
552 return (m);
553}
554
555static __inline struct mbuf *
556#ifndef VBOX
557m_gethdr(int how, short type)
558#else
559m_gethdr(PNATState pData, int how, short type)
560#endif
561{
562 struct mb_args args;
563
564 args.flags = M_PKTHDR;
565 args.type = type;
566 return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how)));
567}
568
569static __inline struct mbuf *
570#ifndef VBOX
571m_getcl(int how, short type, int flags)
572#else
573m_getcl(PNATState pData, int how, short type, int flags)
574#endif
575{
576 struct mb_args args;
577
578 args.flags = flags;
579 args.type = type;
580 return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how)));
581}
582
583/*
584 * m_getjcl() returns an mbuf with a cluster of the specified size attached.
585 * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES.
586 *
587 * XXX: This is rather large, should be real function maybe.
588 */
589static __inline struct mbuf *
590#ifndef VBOX
591m_getjcl(int how, short type, int flags, int size)
592#else
593m_getjcl(PNATState pData, int how, short type, int flags, int size)
594#endif
595{
596 struct mb_args args;
597 struct mbuf *m, *n;
598 uma_zone_t zone;
599
600 args.flags = flags;
601 args.type = type;
602
603 m = uma_zalloc_arg(zone_mbuf, &args, how);
604 if (m == NULL)
605 return (NULL);
606
607#ifndef VBOX
608 zone = m_getzone(size);
609#else
610 zone = m_getzone(pData, size);
611#endif
612 n = uma_zalloc_arg(zone, m, how);
613 if (n == NULL) {
614 uma_zfree(zone_mbuf, m);
615 return (NULL);
616 }
617 return (m);
618}
619
620#ifndef VBOX
621static __inline void
622m_free_fast(struct mbuf *m)
623{
624 KASSERT(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags"));
625
626 uma_zfree_arg(zone_mbuf, m, (void *)MB_NOTAGS);
627}
628#else
629static __inline void
630m_free_fast(PNATState pData, struct mbuf *m)
631{
632 AssertMsg(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags"));
633
634 uma_zfree_arg(zone_mbuf, m, (void *)(uintptr_t)MB_NOTAGS);
635}
636#endif
637
638static __inline struct mbuf *
639#ifndef VBOX
640m_free(struct mbuf *m)
641#else
642m_free(PNATState pData, struct mbuf *m)
643#endif
644{
645 struct mbuf *n = m->m_next;
646
647 if (m->m_flags & M_EXT)
648#ifndef VBOX
649 mb_free_ext(m);
650#else
651 mb_free_ext(pData, m);
652#endif
653 else if ((m->m_flags & M_NOFREE) == 0)
654 uma_zfree(zone_mbuf, m);
655 return (n);
656}
657
658static __inline void
659#ifndef VBOX
660m_clget(struct mbuf *m, int how)
661#else
662m_clget(PNATState pData, struct mbuf *m, int how)
663#endif
664{
665
666 if (m->m_flags & M_EXT)
667 printf("%s: %p mbuf already has cluster\n", __func__, m);
668 m->m_ext.ext_buf = (char *)NULL;
669 uma_zalloc_arg(zone_clust, m, how);
670 /*
671 * On a cluster allocation failure, drain the packet zone and retry,
672 * we might be able to loosen a few clusters up on the drain.
673 */
674 if ((how & M_NOWAIT) && (m->m_ext.ext_buf == NULL)) {
675 zone_drain(zone_pack);
676 uma_zalloc_arg(zone_clust, m, how);
677 }
678}
679
680/*
681 * m_cljget() is different from m_clget() as it can allocate clusters without
682 * attaching them to an mbuf. In that case the return value is the pointer
683 * to the cluster of the requested size. If an mbuf was specified, it gets
684 * the cluster attached to it and the return value can be safely ignored.
685 * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES.
686 */
687static __inline void *
688#ifndef VBOX
689m_cljget(struct mbuf *m, int how, int size)
690#else
691m_cljget(PNATState pData, struct mbuf *m, int how, int size)
692#endif
693{
694 uma_zone_t zone;
695
696 if (m && m->m_flags & M_EXT)
697 printf("%s: %p mbuf already has cluster\n", __func__, m);
698 if (m != NULL)
699 m->m_ext.ext_buf = NULL;
700
701#ifndef VBOX
702 zone = m_getzone(size);
703#else
704 zone = m_getzone(pData, size);
705#endif
706 return (uma_zalloc_arg(zone, m, how));
707}
708
709static __inline void
710#ifndef VBOX
711m_cljset(struct mbuf *m, void *cl, int type)
712#else
713m_cljset(PNATState pData, struct mbuf *m, void *cl, int type)
714#endif
715{
716 uma_zone_t zone;
717 int size;
718
719 switch (type) {
720 case EXT_CLUSTER:
721 size = MCLBYTES;
722 zone = zone_clust;
723 break;
724#if MJUMPAGESIZE != MCLBYTES
725 case EXT_JUMBOP:
726 size = MJUMPAGESIZE;
727 zone = zone_jumbop;
728 break;
729#endif
730 case EXT_JUMBO9:
731 size = MJUM9BYTES;
732 zone = zone_jumbo9;
733 break;
734 case EXT_JUMBO16:
735 size = MJUM16BYTES;
736 zone = zone_jumbo16;
737 break;
738 default:
739 panic("unknown cluster type");
740 break;
741 }
742
743 m->m_data = m->m_ext.ext_buf = cl;
744#ifdef VBOX
745 m->m_ext.ext_free = (void (*)(void *, void *))0;
746 m->m_ext.ext_args = NULL;
747#else
748 m->m_ext.ext_free = m->m_ext.ext_args = NULL;
749#endif
750 m->m_ext.ext_size = size;
751 m->m_ext.ext_type = type;
752 m->m_ext.ref_cnt = uma_find_refcnt(zone, cl);
753 m->m_flags |= M_EXT;
754
755}
756
757static __inline void
758m_chtype(struct mbuf *m, short new_type)
759{
760
761 m->m_type = new_type;
762}
763
764static __inline struct mbuf *
765m_last(struct mbuf *m)
766{
767
768 while (m->m_next)
769 m = m->m_next;
770 return (m);
771}
772
773/*
774 * mbuf, cluster, and external object allocation macros (for compatibility
775 * purposes).
776 */
777#define M_MOVE_PKTHDR(to, from) m_move_pkthdr((to), (from))
778#ifndef VBOX
779#define MGET(m, how, type) ((m) = m_get((how), (type)))
780#define MGETHDR(m, how, type) ((m) = m_gethdr((how), (type)))
781#define MCLGET(m, how) m_clget((m), (how))
782#define MEXTADD(m, buf, size, free, args, flags, type) \
783 m_extadd((m), (caddr_t)(buf), (size), (free), (args), (flags), (type))
784#define m_getm(m, len, how, type) \
785 m_getm2((m), (len), (how), (type), M_PKTHDR)
786#else /*!VBOX*/
787#define MGET(m, how, type) ((m) = m_get(pData, (how), (type)))
788#define MGETHDR(m, how, type) ((m) = m_gethdr(pData, (how), (type)))
789#define MCLGET(m, how) m_clget(pData, (m), (how))
790#define MEXTADD(m, buf, size, free, args, flags, type) \
791 m_extadd(pData, (m), (caddr_t)(buf), (size), (free), (args), (flags), (type))
792#define m_getm(m, len, how, type) \
793 m_getm2(pData, (m), (len), (how), (type), M_PKTHDR)
794#endif
795
796/*
797 * Evaluate TRUE if it's safe to write to the mbuf m's data region (this can
798 * be both the local data payload, or an external buffer area, depending on
799 * whether M_EXT is set).
800 */
801#define M_WRITABLE(m) (!((m)->m_flags & M_RDONLY) && \
802 (!(((m)->m_flags & M_EXT)) || \
803 (*((m)->m_ext.ref_cnt) == 1)) ) \
804
805/* Check if the supplied mbuf has a packet header, or else panic. */
806#define M_ASSERTPKTHDR(m) \
807 KASSERT(m != NULL && m->m_flags & M_PKTHDR, \
808 ("%s: no mbuf packet header!", __func__))
809
810/*
811 * Ensure that the supplied mbuf is a valid, non-free mbuf.
812 *
813 * XXX: Broken at the moment. Need some UMA magic to make it work again.
814 */
815#define M_ASSERTVALID(m) \
816 KASSERT((((struct mbuf *)m)->m_flags & 0) == 0, \
817 ("%s: attempted use of a free mbuf!", __func__))
818
819/*
820 * Set the m_data pointer of a newly-allocated mbuf (m_get/MGET) to place an
821 * object of the specified size at the end of the mbuf, longword aligned.
822 */
823#define M_ALIGN(m, len) do { \
824 KASSERT(!((m)->m_flags & (M_PKTHDR|M_EXT)), \
825 ("%s: M_ALIGN not normal mbuf", __func__)); \
826 KASSERT((m)->m_data == (m)->m_dat, \
827 ("%s: M_ALIGN not a virgin mbuf", __func__)); \
828 (m)->m_data += (MLEN - (len)) & ~(sizeof(long) - 1); \
829} while (0)
830
831/*
832 * As above, for mbufs allocated with m_gethdr/MGETHDR or initialized by
833 * M_DUP/MOVE_PKTHDR.
834 */
835#define MH_ALIGN(m, len) do { \
836 KASSERT((m)->m_flags & M_PKTHDR && !((m)->m_flags & M_EXT), \
837 ("%s: MH_ALIGN not PKTHDR mbuf", __func__)); \
838 KASSERT((m)->m_data == (m)->m_pktdat, \
839 ("%s: MH_ALIGN not a virgin mbuf", __func__)); \
840 (m)->m_data += (MHLEN - (len)) & ~(sizeof(long) - 1); \
841} while (0)
842
843/*
844 * Compute the amount of space available before the current start of data in
845 * an mbuf.
846 *
847 * The M_WRITABLE() is a temporary, conservative safety measure: the burden
848 * of checking writability of the mbuf data area rests solely with the caller.
849 */
850#define M_LEADINGSPACE(m) \
851 ((m)->m_flags & M_EXT ? \
852 (M_WRITABLE(m) ? (m)->m_data - (m)->m_ext.ext_buf : 0): \
853 (m)->m_flags & M_PKTHDR ? (m)->m_data - (m)->m_pktdat : \
854 (m)->m_data - (m)->m_dat)
855
856/*
857 * Compute the amount of space available after the end of data in an mbuf.
858 *
859 * The M_WRITABLE() is a temporary, conservative safety measure: the burden
860 * of checking writability of the mbuf data area rests solely with the caller.
861 */
862#define M_TRAILINGSPACE(m) \
863 ((m)->m_flags & M_EXT ? \
864 (M_WRITABLE(m) ? (m)->m_ext.ext_buf + (m)->m_ext.ext_size \
865 - ((m)->m_data + (m)->m_len) : 0) : \
866 &(m)->m_dat[MLEN] - ((m)->m_data + (m)->m_len))
867
868/*
869 * Arrange to prepend space of size plen to mbuf m. If a new mbuf must be
870 * allocated, how specifies whether to wait. If the allocation fails, the
871 * original mbuf chain is freed and m is set to NULL.
872 */
873#define M_PREPEND(m, plen, how) do { \
874 struct mbuf **_mmp = &(m); \
875 struct mbuf *_mm = *_mmp; \
876 int _mplen = (plen); \
877 int __mhow = (how); \
878 \
879 MBUF_CHECKSLEEP(how); \
880 if (M_LEADINGSPACE(_mm) >= _mplen) { \
881 _mm->m_data -= _mplen; \
882 _mm->m_len += _mplen; \
883 } else \
884 _mm = m_prepend(_mm, _mplen, __mhow); \
885 if (_mm != NULL && _mm->m_flags & M_PKTHDR) \
886 _mm->m_pkthdr.len += _mplen; \
887 *_mmp = _mm; \
888} while (0)
889
890/*
891 * Change mbuf to new type. This is a relatively expensive operation and
892 * should be avoided.
893 */
894#define MCHTYPE(m, t) m_chtype((m), (t))
895
896/* Length to m_copy to copy all. */
897#define M_COPYALL 1000000000
898
899/* Compatibility with 4.3. */
900#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
901
902extern int max_datalen; /* MHLEN - max_hdr */
903extern int max_hdr; /* Largest link + protocol header */
904extern int max_linkhdr; /* Largest link-level header */
905extern int max_protohdr; /* Largest protocol header */
906extern struct mbstat mbstat; /* General mbuf stats/infos */
907extern int nmbclusters; /* Maximum number of clusters */
908
909struct uio;
910
911void m_align(struct mbuf *, int);
912int m_apply(struct mbuf *, int, int,
913 int (*)(void *, void *, u_int), void *);
914#ifndef VBOX
915void m_adj(struct mbuf *, int);
916int m_append(struct mbuf *, int, c_caddr_t);
917struct mbuf *m_defrag(struct mbuf *, int);
918struct mbuf *m_dup(struct mbuf *, int);
919void m_cat(struct mbuf *, struct mbuf *);
920struct mbuf *m_collapse(struct mbuf *, int, int);
921void m_copyback(struct mbuf *, int, int, c_caddr_t);
922struct mbuf *m_copym(struct mbuf *, int, int, int);
923struct mbuf *m_copymdata(struct mbuf *, struct mbuf *,
924 int, int, int, int);
925struct mbuf *m_copypacket(struct mbuf *, int);
926struct mbuf *m_copyup(struct mbuf *n, int len, int dstoff);
927void m_extadd(struct mbuf *, caddr_t, u_int,
928 void (*)(void *, void *), void *, int, int);
929#else
930void m_adj(PNATState, struct mbuf *, int);
931int m_append(PNATState pData, struct mbuf *, int, c_caddr_t);
932struct mbuf *m_defrag(PNATState, struct mbuf *, int);
933struct mbuf *m_dup(PNATState, struct mbuf *, int);
934void m_cat(PNATState, struct mbuf *, struct mbuf *);
935struct mbuf *m_collapse(PNATState, struct mbuf *, int, int);
936void m_copyback(PNATState, struct mbuf *, int, int, c_caddr_t);
937struct mbuf *m_copym(PNATState, struct mbuf *, int, int, int);
938struct mbuf *m_copymdata(PNATState, struct mbuf *, struct mbuf *,
939 int, int, int, int);
940struct mbuf *m_copypacket(PNATState, struct mbuf *, int);
941struct mbuf *m_copyup(PNATState, struct mbuf *n, int len, int dstoff);
942void m_extadd(PNATState pData, struct mbuf *, caddr_t, u_int,
943 void (*)(void *, void *), void *, int, int);
944#endif
945void m_copydata(const struct mbuf *, int, int, caddr_t);
946void m_copy_pkthdr(struct mbuf *, struct mbuf *);
947void m_demote(struct mbuf *, int);
948struct mbuf *m_devget(char *, int, int, struct ifnet *,
949 void (*)(char *, caddr_t, u_int));
950int m_dup_pkthdr(struct mbuf *, struct mbuf *, int);
951u_int m_fixhdr(struct mbuf *);
952struct mbuf *m_fragment(struct mbuf *, int, int);
953#ifndef VBOX
954void m_freem(struct mbuf *);
955struct mbuf *m_getm2(struct mbuf *, int, int, short, int);
956struct mbuf *m_prepend(struct mbuf *, int, int);
957struct mbuf *m_pulldown(struct mbuf *, int, int, int *);
958struct mbuf *m_pullup(struct mbuf *, int);
959int m_sanity(struct mbuf *, int);
960struct mbuf *m_split(struct mbuf *, int, int);
961struct mbuf *m_unshare(struct mbuf *, int how);
962#else
963void m_freem(PNATState pData, struct mbuf *);
964struct mbuf *m_getm2(PNATState pData, struct mbuf *, int, int, short, int);
965struct mbuf *m_prepend(PNATState, struct mbuf *, int, int);
966struct mbuf *m_pulldown(PNATState, struct mbuf *, int, int, int *);
967struct mbuf *m_pullup(PNATState, struct mbuf *, int);
968int m_sanity(PNATState, struct mbuf *, int);
969struct mbuf *m_split(PNATState, struct mbuf *, int, int);
970struct mbuf *m_unshare(PNATState, struct mbuf *, int how);
971#endif
972struct mbuf *m_getptr(struct mbuf *, int, int *);
973u_int m_length(struct mbuf *, struct mbuf **);
974void m_move_pkthdr(struct mbuf *, struct mbuf *);
975void m_print(const struct mbuf *, int);
976struct mbuf *m_uiotombuf(struct uio *, int, int, int, int);
977
978/*-
979 * Network packets may have annotations attached by affixing a list of
980 * "packet tags" to the pkthdr structure. Packet tags are dynamically
981 * allocated semi-opaque data structures that have a fixed header
982 * (struct m_tag) that specifies the size of the memory block and a
983 * <cookie,type> pair that identifies it. The cookie is a 32-bit unique
984 * unsigned value used to identify a module or ABI. By convention this value
985 * is chosen as the date+time that the module is created, expressed as the
986 * number of seconds since the epoch (e.g., using date -u +'%s'). The type
987 * value is an ABI/module-specific value that identifies a particular
988 * annotation and is private to the module. For compatibility with systems
989 * like OpenBSD that define packet tags w/o an ABI/module cookie, the value
990 * PACKET_ABI_COMPAT is used to implement m_tag_get and m_tag_find
991 * compatibility shim functions and several tag types are defined below.
992 * Users that do not require compatibility should use a private cookie value
993 * so that packet tag-related definitions can be maintained privately.
994 *
995 * Note that the packet tag returned by m_tag_alloc has the default memory
996 * alignment implemented by malloc. To reference private data one can use a
997 * construct like:
998 *
999 * struct m_tag *mtag = m_tag_alloc(...);
1000 * struct foo *p = (struct foo *)(mtag+1);
1001 *
1002 * if the alignment of struct m_tag is sufficient for referencing members of
1003 * struct foo. Otherwise it is necessary to embed struct m_tag within the
1004 * private data structure to insure proper alignment; e.g.,
1005 *
1006 * struct foo {
1007 * struct m_tag tag;
1008 * ...
1009 * };
1010 * struct foo *p = (struct foo *) m_tag_alloc(...);
1011 * struct m_tag *mtag = &p->tag;
1012 */
1013
1014/*
1015 * Persistent tags stay with an mbuf until the mbuf is reclaimed. Otherwise
1016 * tags are expected to ``vanish'' when they pass through a network
1017 * interface. For most interfaces this happens normally as the tags are
1018 * reclaimed when the mbuf is free'd. However in some special cases
1019 * reclaiming must be done manually. An example is packets that pass through
1020 * the loopback interface. Also, one must be careful to do this when
1021 * ``turning around'' packets (e.g., icmp_reflect).
1022 *
1023 * To mark a tag persistent bit-or this flag in when defining the tag id.
1024 * The tag will then be treated as described above.
1025 */
1026#define MTAG_PERSISTENT 0x800
1027
1028#define PACKET_TAG_NONE 0 /* Nadda */
1029
1030/* Packet tags for use with PACKET_ABI_COMPAT. */
1031#define PACKET_TAG_IPSEC_IN_DONE 1 /* IPsec applied, in */
1032#define PACKET_TAG_IPSEC_OUT_DONE 2 /* IPsec applied, out */
1033#define PACKET_TAG_IPSEC_IN_CRYPTO_DONE 3 /* NIC IPsec crypto done */
1034#define PACKET_TAG_IPSEC_OUT_CRYPTO_NEEDED 4 /* NIC IPsec crypto req'ed */
1035#define PACKET_TAG_IPSEC_IN_COULD_DO_CRYPTO 5 /* NIC notifies IPsec */
1036#define PACKET_TAG_IPSEC_PENDING_TDB 6 /* Reminder to do IPsec */
1037#define PACKET_TAG_BRIDGE 7 /* Bridge processing done */
1038#define PACKET_TAG_GIF 8 /* GIF processing done */
1039#define PACKET_TAG_GRE 9 /* GRE processing done */
1040#define PACKET_TAG_IN_PACKET_CHECKSUM 10 /* NIC checksumming done */
1041#define PACKET_TAG_ENCAP 11 /* Encap. processing */
1042#define PACKET_TAG_IPSEC_SOCKET 12 /* IPSEC socket ref */
1043#define PACKET_TAG_IPSEC_HISTORY 13 /* IPSEC history */
1044#define PACKET_TAG_IPV6_INPUT 14 /* IPV6 input processing */
1045#define PACKET_TAG_DUMMYNET 15 /* dummynet info */
1046#define PACKET_TAG_DIVERT 17 /* divert info */
1047#define PACKET_TAG_IPFORWARD 18 /* ipforward info */
1048#define PACKET_TAG_MACLABEL (19 | MTAG_PERSISTENT) /* MAC label */
1049#define PACKET_TAG_PF 21 /* PF + ALTQ information */
1050#define PACKET_TAG_RTSOCKFAM 25 /* rtsock sa family */
1051#define PACKET_TAG_IPOPTIONS 27 /* Saved IP options */
1052#define PACKET_TAG_CARP 28 /* CARP info */
1053#ifdef VBOX
1054# define PACKET_TAG_ALIAS 0xab01
1055# define PACKET_TAG_ETHER 0xab02
1056# define PACKET_SERVICE 0xab03
1057#endif
1058
1059/* Specific cookies and tags. */
1060
1061/* Packet tag routines. */
1062struct m_tag *m_tag_alloc(u_int32_t, int, int, int);
1063void m_tag_delete(struct mbuf *, struct m_tag *);
1064void m_tag_delete_chain(struct mbuf *, struct m_tag *);
1065void m_tag_free_default(struct m_tag *);
1066struct m_tag *m_tag_locate(struct mbuf *, u_int32_t, int, struct m_tag *);
1067struct m_tag *m_tag_copy(struct m_tag *, int);
1068int m_tag_copy_chain(struct mbuf *, struct mbuf *, int);
1069void m_tag_delete_nonpersistent(struct mbuf *);
1070
1071/*
1072 * Initialize the list of tags associated with an mbuf.
1073 */
1074static __inline void
1075m_tag_init(struct mbuf *m)
1076{
1077
1078 SLIST_INIT(&m->m_pkthdr.tags);
1079}
1080
1081/*
1082 * Set up the contents of a tag. Note that this does not fill in the free
1083 * method; the caller is expected to do that.
1084 *
1085 * XXX probably should be called m_tag_init, but that was already taken.
1086 */
1087static __inline void
1088m_tag_setup(struct m_tag *t, u_int32_t cookie, int type, int len)
1089{
1090
1091 t->m_tag_id = type;
1092 t->m_tag_len = len;
1093 t->m_tag_cookie = cookie;
1094}
1095
1096/*
1097 * Reclaim resources associated with a tag.
1098 */
1099static __inline void
1100m_tag_free(struct m_tag *t)
1101{
1102
1103 (*t->m_tag_free)(t);
1104}
1105
1106/*
1107 * Return the first tag associated with an mbuf.
1108 */
1109static __inline struct m_tag *
1110m_tag_first(struct mbuf *m)
1111{
1112
1113 return (SLIST_FIRST(&m->m_pkthdr.tags));
1114}
1115
1116/*
1117 * Return the next tag in the list of tags associated with an mbuf.
1118 */
1119static __inline struct m_tag *
1120m_tag_next(struct mbuf *m, struct m_tag *t)
1121{
1122 NOREF(m);
1123 return (SLIST_NEXT(t, m_tag_link));
1124}
1125
1126/*
1127 * Prepend a tag to the list of tags associated with an mbuf.
1128 */
1129static __inline void
1130m_tag_prepend(struct mbuf *m, struct m_tag *t)
1131{
1132
1133 SLIST_INSERT_HEAD(&m->m_pkthdr.tags, t, m_tag_link);
1134}
1135
1136/*
1137 * Unlink a tag from the list of tags associated with an mbuf.
1138 */
1139static __inline void
1140m_tag_unlink(struct mbuf *m, struct m_tag *t)
1141{
1142
1143 SLIST_REMOVE(&m->m_pkthdr.tags, t, m_tag, m_tag_link);
1144}
1145
1146/* These are for OpenBSD compatibility. */
1147#define MTAG_ABI_COMPAT 0 /* compatibility ABI */
1148
1149static __inline struct m_tag *
1150m_tag_get(int type, int length, int fWait)
1151{
1152 return (m_tag_alloc(MTAG_ABI_COMPAT, type, length, fWait));
1153}
1154
1155static __inline struct m_tag *
1156m_tag_find(struct mbuf *m, int type, struct m_tag *start)
1157{
1158 return (SLIST_EMPTY(&m->m_pkthdr.tags) ? (struct m_tag *)NULL :
1159 m_tag_locate(m, MTAG_ABI_COMPAT, type, start));
1160}
1161
1162/* XXX temporary FIB methods probably eventually use tags.*/
1163#define M_FIBSHIFT 28
1164#define M_FIBMASK 0x0F
1165
1166/* get the fib from an mbuf and if it is not set, return the default */
1167#define M_GETFIB(_m) \
1168 ((((_m)->m_flags & M_FIB) >> M_FIBSHIFT) & M_FIBMASK)
1169
1170#define M_SETFIB(_m, _fib) do { \
1171 _m->m_flags &= ~M_FIB; \
1172 _m->m_flags |= (((_fib) << M_FIBSHIFT) & M_FIB); \
1173} while (0)
1174
1175#endif /* _KERNEL */
1176
1177#endif /* !_SYS_MBUF_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette