On Tue, Jun 07, 2011 at 08:14:17AM +0200, Luigi Rizzo wrote: > hi, > in order to import netmap support into the tree (see > http://info.iet.unipi.it/~luigi/netmap ), i need > to use one of the if_cap{abilities|enable} bits to report > that the interface supports this mode and record whether > the mode is enabled or not. > > Bit 0x100000 is currently the first unused bit so if > there are no objections i will add the following > to sys/net/if.h > > #define IFCAP_NETMAP 0x100000 /* netmap mode supported/enabled */ > > and the following change to sbin/ifconfig/ifconfig.c > > -"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE" > +"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" > > That's all you need, as netmap mode is not supposed to be > set from sbin/ifconfig. speaking of which, it occurs to me that while we have a "CANTCHANGE" category for interface flags, we don't have one for capabilities. Would it be ok to add one ? Looking at the list in if.h, for example, it seems to me that things like IFCAP_LINKSTATE or IFCAP_VLAN_MTU or IFCAP_JUMBO_MTU shouldn't be modifiable through SIOCSIFCAP. Of course if would be best to separate CANTCHANGE bits from those that can be modified through ioctls, but that would apply to interface flags as well, and i don't think it can be done due to API change issues. cheers luigiReceived on Wed Jun 08 2011 - 03:49:24 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:14 UTC