What exactly do the rx-vlan-offload and tx-vlan-offload ethtool options do?
Asked Answered
B

1

7

The ethtool manpage only gives a nebulous explanation:

   rxvlan on|off
          Specifies whether RX VLAN acceleration should be enabled

   txvlan on|off
          Specifies whether TX VLAN acceleration should be enabled

What exactly do the options accomplish, assuming you can enable them?

Bizarre answered 20/12, 2016 at 23:33 Comment(0)
D
9

Apparently, rxvlan and txvlan are aliases for the kernel features rx-vlan-hw-parse and tx-vlan-hw-insert respectively (see ethtool.c).

In the kernel they are translated to the netdev features NETIF_F_HW_VLAN_CTAG_RX_BIT and NETIF_F_HW_VLAN_CTAG_TX_BIT. (See net/core/ethtool.c)

To the best of my knowledge, the TX_BIT allows the NIC to add the VLAN tag during transmission without explicitly placing it in the packet. See the relevant code in the VLAN driver.

Similarly, when the RX_BIT is enabled, the NIC can strip the VLAN tag from incoming packets and let the driver place the information from the VLAN tag in the relevant skb.

Distant answered 29/6, 2017 at 7:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.