MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ixgbe_vlan_offload_config

Function ixgbe_vlan_offload_config

dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:2208–2232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2206}
2207
2208static int
2209ixgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
2210{
2211 struct rte_eth_rxmode *rxmode;
2212 rxmode = &dev->data->dev_conf.rxmode;
2213
2214 if (mask & RTE_ETH_VLAN_STRIP_MASK)
2215 ixgbe_vlan_hw_strip_config(dev);
2216
2217 if (mask & RTE_ETH_VLAN_FILTER_MASK) {
2218 if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER)
2219 ixgbe_vlan_hw_filter_enable(dev);
2220 else
2221 ixgbe_vlan_hw_filter_disable(dev);
2222 }
2223
2224 if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
2225 if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
2226 ixgbe_vlan_hw_extend_enable(dev);
2227 else
2228 ixgbe_vlan_hw_extend_disable(dev);
2229 }
2230
2231 return 0;
2232}
2233
2234static int
2235ixgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)

Callers 2

ixgbe_vlan_offload_setFunction · 0.85
ixgbe_dev_startFunction · 0.85

Tested by

no test coverage detected