VirtualBox

Changeset 22895 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Sep 10, 2009 3:59:44 AM (15 years ago)
Author:
vboxsync
Message:

NAT: BSD mbuf's related changeset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/slirp_state.h

    r22843 r22895  
    7575};
    7676TAILQ_HEAD(dns_list_head, dns_entry);
     77#ifdef VBOX_WITH_SLIRP_BSD_MBUF
     78TAILQ_HEAD(if_queue, mbuf);
     79#endif
    7780
    7881struct port_forward_rule
     
    106109    int if_queued;
    107110    int if_thresh;
     111#ifndef VBOX_WITH_SLIRP_BSD_MBUF
    108112    struct mbuf if_fastq;
    109113    struct mbuf if_batchq;
     114#else
     115    struct if_queue if_fastq;
     116    struct if_queue if_batchq;
     117#endif
    110118    struct mbuf *next_m;
    111119    /* Stuff from icmp.c */
     
    214222# define VBOX_SOCKET_EVENT (pData->phEvents[VBOX_SOCKET_EVENT_INDEX])
    215223    HANDLE phEvents[VBOX_EVENT_COUNT];
     224#endif
     225#ifdef VBOX_WITH_SLIRP_BSD_MBUF
     226# ifdef zone_mbuf
     227#  undef zone_mbuf
     228# endif
     229    uma_zone_t zone_mbuf;
     230# ifdef zone_clust
     231#  undef zone_clust
     232# endif
     233    uma_zone_t zone_clust;
     234# ifdef zone_pack
     235#  undef zone_pack
     236# endif
     237    uma_zone_t zone_pack;
     238# ifdef zone_jumbop
     239#  undef zone_jumbop
     240# endif
     241    uma_zone_t zone_jumbop;
     242# ifdef zone_jumbo9
     243#  undef zone_jumbo9
     244# endif
     245    uma_zone_t zone_jumbo9;
     246# ifdef zone_jumbo16
     247#  undef zone_jumbo16
     248# endif
     249    uma_zone_t zone_jumbo16;
     250# ifdef zone_ext_refcnt
     251#  undef zone_ext_refcnt
     252    int nmbclusters;            /* limits number of mbuf clusters */
     253    int nmbjumbop;                      /* limits number of page size jumbo clusters */
     254    int nmbjumbo9;                      /* limits number of 9k jumbo clusters */
     255    int nmbjumbo16;                     /* limits number of 16k jumbo clusters */
     256    struct mbstat mbstat;
     257# endif
     258    uma_zone_t zone_ext_refcnt;
    216259#endif
    217260
     
    696739#define instancehead pData->instancehead
    697740
     741#ifdef VBOX_WITH_SLIRP_BSD_MBUF
     742# define nmbclusters    pData->nmbclusters
     743# define nmbjumbop  pData->nmbjumbop
     744# define nmbjumbo9  pData->nmbjumbo9
     745# define nmbjumbo16 pData->nmbjumbo16
     746# define mbstat pData->mbstat
     747# include "ext.h"
     748# undef zone_mbuf
     749# undef zone_clust
     750# undef zone_pack
     751# undef zone_jumbop
     752# undef zone_jumbo9
     753# undef zone_jumbo16
     754# undef zone_ext_refcnt
     755static inline uma_zone_t slirp_zone_pack(PNATState pData)
     756{
     757    return pData->zone_pack;
     758}
     759static inline uma_zone_t slirp_zone_jumbop(PNATState pData)
     760{
     761    return pData->zone_jumbop;
     762}
     763static inline uma_zone_t slirp_zone_jumbo9(PNATState pData)
     764{
     765    return pData->zone_jumbo9;
     766}
     767static inline uma_zone_t slirp_zone_jumbo16(PNATState pData)
     768{
     769    return pData->zone_jumbo16;
     770}
     771static inline uma_zone_t slirp_zone_ext_refcnt(PNATState pData)
     772{
     773    return pData->zone_ext_refcnt;
     774}
     775static inline uma_zone_t slirp_zone_mbuf(PNATState pData)
     776{
     777    return pData->zone_mbuf;
     778}
     779static inline uma_zone_t slirp_zone_clust(PNATState pData)
     780{
     781    return pData->zone_clust;
     782}
     783#ifndef VBOX_SLIRP_BSD
     784# define m_adj(m, len) m_adj(pData, (m), (len))
     785#endif
     786#endif
     787
    698788#endif /* !___slirp_state_h */
Note: See TracChangeset for help on using the changeset viewer.

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