Bug 269418 - ice(4): strips VLAN headers with netmap
Summary: ice(4): strips VLAN headers with netmap
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.4-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2023-02-08 19:53 UTC by Brian Poole
Modified: 2023-04-25 13:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Poole 2023-02-08 19:53:58 UTC
Hello,

I am testing the E810 NIC on FreeBSD 12.4 using netmap and observe VLAN headers are stripped from incoming packets. I have -vlanhwtag set on the interface (though below I show why this doesn't matter). I tested this scenario with the same server, OS, and capture file using the e1000, ixgbe, and ixl drivers and all three kept the VLAN headers when using netmap with -vlanhwtag set on the interface.

A quick look at ice_set_default_vsi_ctx() shows ICE_AQ_VSI_INNER_VLAN_EMODE_STR_BOTH is set in all cases. There are no conditionals using IFCAP_VLAN_HWTAGGING in the ice driver. I would expect the code to check for that capability and set ICE_AQ_VSI_INNER_VLAN_EMODE_NOTHING if -vlanhwtag like ixl does in ixl_initialize_vsi().

I tried adding a conditional check but ran into the next issue. ixl_initialize_vsi() is called from ixl_if_init() so it reinitializes the VLAN setting every time iflib_if_ioctl() is run. On the ice driver, ice_initialize_vsi() is called from ice_if_attach_post() and ice_rebuild() but not ice_if_init(). So changing the VLAN capabilities using ifconfig doesn't appear to change the driver settings.

I would like the ice driver to preserve VLAN headers when using netmap just like the other Intel iflib drivers. I have experimented with adding a call to ice_initialize_vsi() inside ice_if_init(), but there are other changes needed and I am looking for a solution with no side effects. Thank you for your time and your help!