diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2013-04-29 18:00:53 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2013-04-29 18:00:53 +0000 |
| commit | d4b42e08696b1dc7089bfd21edd6f0f621f30b0d (patch) | |
| tree | 1bd5d782959e08a9f316d08183d065c57a3ef362 /sys/dev/netmap | |
| parent | 28cb773df8d5f7e3d79bc3f7c74cd72327cfd91f (diff) | |
Notes
Diffstat (limited to 'sys/dev/netmap')
| -rw-r--r-- | sys/dev/netmap/if_em_netmap.h | 1 | ||||
| -rw-r--r-- | sys/dev/netmap/if_igb_netmap.h | 1 | ||||
| -rw-r--r-- | sys/dev/netmap/if_lem_netmap.h | 1 | ||||
| -rw-r--r-- | sys/dev/netmap/if_re_netmap.h | 1 | ||||
| -rw-r--r-- | sys/dev/netmap/ixgbe_netmap.h | 1 | ||||
| -rw-r--r-- | sys/dev/netmap/netmap.c | 3 | ||||
| -rw-r--r-- | sys/dev/netmap/netmap_kern.h | 11 | ||||
| -rw-r--r-- | sys/dev/netmap/netmap_mem2.c | 1 |
8 files changed, 11 insertions, 9 deletions
diff --git a/sys/dev/netmap/if_em_netmap.h b/sys/dev/netmap/if_em_netmap.h index 776f0e0ee8248..37127dd50e8fb 100644 --- a/sys/dev/netmap/if_em_netmap.h +++ b/sys/dev/netmap/if_em_netmap.h @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: if_em_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * * netmap support for em. * diff --git a/sys/dev/netmap/if_igb_netmap.h b/sys/dev/netmap/if_igb_netmap.h index e817341cc9fe7..a94ca3b188359 100644 --- a/sys/dev/netmap/if_igb_netmap.h +++ b/sys/dev/netmap/if_igb_netmap.h @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: if_igb_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * * Netmap support for igb, partly contributed by Ahmed Kooli * For details on netmap support please see ixgbe_netmap.h diff --git a/sys/dev/netmap/if_lem_netmap.h b/sys/dev/netmap/if_lem_netmap.h index d3be70017f8ec..acef45f0d8848 100644 --- a/sys/dev/netmap/if_lem_netmap.h +++ b/sys/dev/netmap/if_lem_netmap.h @@ -26,7 +26,6 @@ /* * $FreeBSD$ - * $Id: if_lem_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * * netmap support for "lem" * diff --git a/sys/dev/netmap/if_re_netmap.h b/sys/dev/netmap/if_re_netmap.h index 1c747b7151bc3..1995d019a7fde 100644 --- a/sys/dev/netmap/if_re_netmap.h +++ b/sys/dev/netmap/if_re_netmap.h @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: if_re_netmap.h 10609 2012-02-22 19:44:58Z luigi $ * * netmap support for "re" * For details on netmap support please see ixgbe_netmap.h diff --git a/sys/dev/netmap/ixgbe_netmap.h b/sys/dev/netmap/ixgbe_netmap.h index 3defd4b3bed0b..be790502c276f 100644 --- a/sys/dev/netmap/ixgbe_netmap.h +++ b/sys/dev/netmap/ixgbe_netmap.h @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: ixgbe_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * * netmap modifications for ixgbe * diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 910ae6fcb940e..17ec152a15a5f 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -99,6 +99,7 @@ MALLOC_DEFINE(M_NETMAP, "netmap", "Network memory map"); #include <net/netmap.h> #include <dev/netmap/netmap_kern.h> +/* XXX the following variables must be deprecated and included in nm_mem */ u_int netmap_total_buffers; u_int netmap_buf_size; char *netmap_buffer_base; /* address of an invalid buffer */ @@ -148,6 +149,8 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, copy, CTLFLAG_RW, &netmap_copy, 0 , ""); #define NM_BDG_HASH 1024 /* forwarding table entries */ #define NM_BDG_BATCH 1024 /* entries in the forwarding buffer */ #define NM_BRIDGES 4 /* number of bridges */ + + int netmap_bridge = NM_BDG_BATCH; /* bridge batch size */ SYSCTL_INT(_dev_netmap, OID_AUTO, bridge, CTLFLAG_RW, &netmap_bridge, 0 , ""); diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h index 4f501e076738e..732a50d5e0d6e 100644 --- a/sys/dev/netmap/netmap_kern.h +++ b/sys/dev/netmap/netmap_kern.h @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: netmap_kern.h 11829 2012-09-26 04:06:34Z luigi $ * * The header contains the definitions of constants and function * prototypes used only in kernelspace. @@ -35,6 +34,7 @@ #define _NET_NETMAP_KERN_H_ #if defined(__FreeBSD__) + #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) @@ -42,8 +42,10 @@ #define NM_SELINFO_T struct selinfo #define MBUF_LEN(m) ((m)->m_pkthdr.len) #define NM_SEND_UP(ifp, m) ((ifp)->if_input)(ifp, m) + #elif defined (linux) -#define NM_LOCK_T safe_spinlock_t // see bsd_glue.h + +#define NM_LOCK_T safe_spinlock_t // see bsd_glue.h #define NM_SELINFO_T wait_queue_head_t #define MBUF_LEN(m) ((m)->len) #define NM_SEND_UP(ifp, m) netif_rx(m) @@ -65,6 +67,7 @@ #endif #elif defined (__APPLE__) + #warning apple support is incomplete. #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) @@ -74,8 +77,10 @@ #define NM_SEND_UP(ifp, m) ((ifp)->if_input)(ifp, m) #else + #error unsupported platform -#endif + +#endif /* end - platform-specific code */ #define ND(format, ...) #define D(format, ...) \ diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index b72f5849d16f0..7cab1c86391e8 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: netmap_mem2.c 11881 2012-10-18 23:24:15Z luigi $ * * (New) memory allocator for netmap */ |
