From owner-svn-src-head@FreeBSD.ORG Mon Apr 29 18:00:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9F41056E; Mon, 29 Apr 2013 18:00:55 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 80E9714A1; Mon, 29 Apr 2013 18:00:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3TI0slL017987; Mon, 29 Apr 2013 18:00:54 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3TI0rim017973; Mon, 29 Apr 2013 18:00:53 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201304291800.r3TI0rim017973@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 29 Apr 2013 18:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250052 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2013 18:00:55 -0000 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 #include +/* 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 */