On Mon, Dec 06, 2021 at 10:07:47AM +0000, Stuart Henderson wrote:
> On 2021/12/05 19:22, Yury Shefer wrote:
> > Hi all,
> > 
> > I have quad-port Intel ET2 NIC based on 82576[1] controller. The manual
> > says that hardware VLAN tagging should be supported but ifconfig output
> > shows VLAN_MTU only in hwfeatures on OpenBSD 7.0. How do I check if 802.1Q
> > tagging is offloaded or not? And if it's not - does it matter at 1Gbps
> > speeds on 3 Ghz CPU?
> > 
> > $ dmesg | grep em0
> > em0 at pci11 dev 0 function 0 "Intel 82576" rev 0x01: msi, address
> > 90:e2:ba:84:64:14
> > 
> > $ ifconfig em0 hwfeatures
> > em0: flags=808843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF4> mtu 1500
> 
> Not supported by the driver with 82576 - you would see VLAN_HWTAGGING here:
> 
> >         hwfeatures=10<VLAN_MTU> hardmtu 9216
>                               ^^^^^
> 
> >From if_em.c:
> 
> 1949 #if NVLAN > 0
> 1950         if (sc->hw.mac_type != em_82575 && sc->hw.mac_type != em_82580 
> &&                  1951             sc->hw.mac_type != em_82576 &&
> 1952             sc->hw.mac_type != em_i210 && sc->hw.mac_type != em_i350)    
>                   1953                 ifp->if_capabilities |= 
> IFCAP_VLAN_HWTAGGING;
> 1954 #endif
> 
> >From commit log:
> 
> ----------------------------                                                  
>                   revision 1.242
> date: 2010/08/03 16:21:52;  author: jsg;  state: Exp;  lines: +3 -2;          
>                   Disable hardware VLAN stripping/insertion on 8257[56] for 
> now.  While
> stripping works insertion seems to have trouble in certain conditions,        
>                   which needs to be fixed before we want to enable hardware 
> support for this.
>                                                                               
>                   ok deraadt@
> ----------------------------

I do not recall specifics but 82575/82576 introduce new style
descriptors closer to ix.  We use the old descriptor format.
I would not be surprised if some of the offload features require using
the newer descriptor format to work.

Sometimes problems with offloading don't show until using things like
ospf and nfs or forcing fragmentation with large mtu values.

> 
> You are best placed to tell whether it matters for your system. Is it fast
> enough already? Bandwidth doesn't matter all that much, packets-per-second is
> more important.
> 
> 

Reply via email to