svn commit: r231649 - in stable/8: sbin/ifconfig sys/net
Luigi Rizzo
luigi at FreeBSD.org
Tue Feb 14 09:36:03 UTC 2012
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 */
};
More information about the svn-src-stable-8
mailing list