Date: Mon, 29 Apr 2013 18:00:53 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250052 - head/sys/dev/netmap Message-ID: <201304291800.r3TI0rim017973@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: luigi Date: Mon Apr 29 18:00:53 2013 New Revision: 250052 URL: http://svnweb.freebsd.org/changeset/base/250052 Log: whitespace changes: remove $Id$ lines, and add blank lines around some #if / #elif /#endif Modified: head/sys/dev/netmap/if_em_netmap.h head/sys/dev/netmap/if_igb_netmap.h head/sys/dev/netmap/if_lem_netmap.h head/sys/dev/netmap/if_re_netmap.h head/sys/dev/netmap/ixgbe_netmap.h head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_kern.h head/sys/dev/netmap/netmap_mem2.c Modified: head/sys/dev/netmap/if_em_netmap.h ============================================================================== --- head/sys/dev/netmap/if_em_netmap.h Mon Apr 29 17:29:48 2013 (r250051) +++ head/sys/dev/netmap/if_em_netmap.h Mon Apr 29 18:00:53 2013 (r250052) @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: if_em_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * * netmap support for em. * Modified: head/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- head/sys/dev/netmap/if_igb_netmap.h Mon Apr 29 17:29:48 2013 (r250051) +++ head/sys/dev/netmap/if_igb_netmap.h Mon Apr 29 18:00:53 2013 (r250052) @@ -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 Modified: head/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- head/sys/dev/netmap/if_lem_netmap.h Mon Apr 29 17:29:48 2013 (r250051) +++ head/sys/dev/netmap/if_lem_netmap.h Mon Apr 29 18:00:53 2013 (r250052) @@ -26,7 +26,6 @@ /* * $FreeBSD$ - * $Id: if_lem_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * * netmap support for "lem" * Modified: head/sys/dev/netmap/if_re_netmap.h ============================================================================== --- head/sys/dev/netmap/if_re_netmap.h Mon Apr 29 17:29:48 2013 (r250051) +++ head/sys/dev/netmap/if_re_netmap.h Mon Apr 29 18:00:53 2013 (r250052) @@ -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 Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Mon Apr 29 17:29:48 2013 (r250051) +++ head/sys/dev/netmap/ixgbe_netmap.h Mon Apr 29 18:00:53 2013 (r250052) @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: ixgbe_netmap.h 10627 2012-02-23 19:37:15Z luigi $ * * netmap modifications for ixgbe * Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Mon Apr 29 17:29:48 2013 (r250051) +++ head/sys/dev/netmap/netmap.c Mon Apr 29 18:00:53 2013 (r250052) @@ -99,6 +99,7 @@ MALLOC_DEFINE(M_NETMAP, "netmap", "Netwo #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, #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 , ""); Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Mon Apr 29 17:29:48 2013 (r250051) +++ head/sys/dev/netmap/netmap_kern.h Mon Apr 29 18:00:53 2013 (r250052) @@ -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, ...) \ Modified: head/sys/dev/netmap/netmap_mem2.c ============================================================================== --- head/sys/dev/netmap/netmap_mem2.c Mon Apr 29 17:29:48 2013 (r250051) +++ head/sys/dev/netmap/netmap_mem2.c Mon Apr 29 18:00:53 2013 (r250052) @@ -25,7 +25,6 @@ /* * $FreeBSD$ - * $Id: netmap_mem2.c 11881 2012-10-18 23:24:15Z luigi $ * * (New) memory allocator for netmap */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304291800.r3TI0rim017973>