From owner-svn-src-stable@FreeBSD.ORG Tue Feb 14 09:36:03 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 388F9106566B; Tue, 14 Feb 2012 09:36:03 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 079118FC0A; Tue, 14 Feb 2012 09:36:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1E9a2jq088933; Tue, 14 Feb 2012 09:36:02 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1E9a2j1088929; Tue, 14 Feb 2012 09:36:02 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201202140936.q1E9a2j1088929@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 14 Feb 2012 09:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231649 - in stable/8: sbin/ifconfig sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2012 09:36:03 -0000 Author: luigi Date: Tue Feb 14 09:36:02 2012 New Revision: 231649 URL: http://svn.freebsd.org/changeset/base/231649 Log: MFC: reserve an IFCAP bit for netmap, instruct ifconfig to parse the information (just a change on the format string suffices), and put a comment on if_var.h to tell that if_pspare[0] may be used to point to the netmap structure. Modified: stable/8/sbin/ifconfig/ifconfig.c stable/8/sys/net/if.h stable/8/sys/net/if_var.h Modified: stable/8/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.c Tue Feb 14 09:29:37 2012 (r231648) +++ stable/8/sbin/ifconfig/ifconfig.c Tue Feb 14 09:36:02 2012 (r231649) @@ -867,7 +867,7 @@ unsetifdescr(const char *val, int value, #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ -"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE" +"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" /* * Print the status of the interface. If an address family was Modified: stable/8/sys/net/if.h ============================================================================== --- stable/8/sys/net/if.h Tue Feb 14 09:29:37 2012 (r231648) +++ stable/8/sys/net/if.h Tue Feb 14 09:36:02 2012 (r231649) @@ -220,6 +220,7 @@ struct if_data { #define IFCAP_POLLING_NOCOUNT 0x20000 /* polling ticks cannot be fragmented */ #define IFCAP_VLAN_HWTSO 0x40000 /* can do IFCAP_TSO on VLANs */ #define IFCAP_LINKSTATE 0x80000 /* the runtime link state is dynamic */ +#define IFCAP_NETMAP 0x100000 /* netmap mode supported/enabled */ #define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM) #define IFCAP_TSO (IFCAP_TSO4 | IFCAP_TSO6) Modified: stable/8/sys/net/if_var.h ============================================================================== --- stable/8/sys/net/if_var.h Tue Feb 14 09:29:37 2012 (r231648) +++ stable/8/sys/net/if_var.h Tue Feb 14 09:36:02 2012 (r231649) @@ -206,7 +206,7 @@ struct ifnet { */ char if_cspare[3]; char *if_description; /* interface description */ - void *if_pspare[7]; + void *if_pspare[7]; /* 1 netmap, 6 TBD */ int if_ispare[3]; u_int if_fib; /* interface FIB */ };