1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Grab one of the ifcap bits for netmap, and enable printing in ifconfig.

Document the fact that we might want an IFCAP_CANTCHANGE mask,
even though the value is not yet used in sys/net/if.c

(asked on -current a week ago, no feedback so i assume no objection).
This commit is contained in:
Luigi Rizzo 2011-06-14 12:40:55 +00:00
parent 81a654646e
commit c9d658e9f7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223078
2 changed files with 11 additions and 1 deletions

View File

@ -908,7 +908,7 @@ unsetifdescr(const char *val, int value, int s, const struct afswtch *afp)
#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

View File

@ -199,6 +199,13 @@ struct if_data {
* field. IFCAP_* and CSUM_* do not match one to one and CSUM_* may be
* more detailed or differenciated than IFCAP_*.
* Hwassist features are defined CSUM_* in sys/mbuf.h
*
* Capabilities that cannot be arbitrarily changed with ifconfig/ioctl
* are listed in IFCAP_CANTCHANGE, similar to IFF_CANTCHANGE.
* This is not strictly necessary because the common code never
* changes capabilities, and it is left to the individual driver
* to do the right thing. However, having the filter here
* avoids replication of the same code in all individual drivers.
*/
#define IFCAP_RXCSUM 0x00001 /* can offload checksum on RX */
#define IFCAP_TXCSUM 0x00002 /* can offload checksum on TX */
@ -220,12 +227,15 @@ 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)
#define IFCAP_WOL (IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC)
#define IFCAP_TOE (IFCAP_TOE4 | IFCAP_TOE6)
#define IFCAP_CANTCHANGE (IFCAP_NETMAP)
#define IFQ_MAXLEN 50
#define IFNET_SLOWHZ 1 /* granularity is 1 second */