Date: Tue, 14 Feb 2012 09:36:02 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r231649 - in stable/8: sbin/ifconfig sys/net Message-ID: <201202140936.q1E9a2j1088929@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */ };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202140936.q1E9a2j1088929>