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

Function i40e_dev_init_vlan

dpdk/drivers/net/i40e/i40e_ethdev.c:6158–6184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6156}
6157
6158static int
6159i40e_dev_init_vlan(struct rte_eth_dev *dev)
6160{
6161 struct rte_eth_dev_data *data = dev->data;
6162 int ret;
6163 int mask = 0;
6164
6165 /* Apply vlan offload setting */
6166 mask = RTE_ETH_VLAN_STRIP_MASK |
6167 RTE_ETH_QINQ_STRIP_MASK |
6168 RTE_ETH_VLAN_FILTER_MASK |
6169 RTE_ETH_VLAN_EXTEND_MASK;
6170
6171 ret = i40e_vlan_offload_set(dev, mask);
6172 if (ret) {
6173 PMD_DRV_LOG(INFO, "Failed to update vlan offload");
6174 return ret;
6175 }
6176
6177 /* Apply pvid setting */
6178 ret = i40e_vlan_pvid_set(dev, data->dev_conf.txmode.pvid,
6179 data->dev_conf.txmode.hw_vlan_insert_pvid);
6180 if (ret)
6181 PMD_DRV_LOG(INFO, "Failed to update VSI params");
6182
6183 return ret;
6184}
6185
6186static int
6187i40e_vsi_config_double_vlan(struct i40e_vsi *vsi, int on)

Callers 1

i40e_dev_configureFunction · 0.85

Calls 2

i40e_vlan_offload_setFunction · 0.85
i40e_vlan_pvid_setFunction · 0.85

Tested by

no test coverage detected