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

Function i40e_vlan_pvid_set

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

Source from the content-addressed store, hash-verified

4072}
4073
4074static int
4075i40e_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
4076{
4077 struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
4078 struct i40e_vsi *vsi = pf->main_vsi;
4079 struct rte_eth_dev_data *data = I40E_VSI_TO_DEV_DATA(vsi);
4080 struct i40e_vsi_vlan_pvid_info info;
4081
4082 memset(&info, 0, sizeof(info));
4083 info.on = on;
4084 if (info.on)
4085 info.config.pvid = pvid;
4086 else {
4087 info.config.reject.tagged =
4088 data->dev_conf.txmode.hw_vlan_reject_tagged;
4089 info.config.reject.untagged =
4090 data->dev_conf.txmode.hw_vlan_reject_untagged;
4091 }
4092
4093 return i40e_vsi_vlan_pvid_set(vsi, &info);
4094}
4095
4096static int
4097i40e_dev_led_on(struct rte_eth_dev *dev)

Callers 1

i40e_dev_init_vlanFunction · 0.85

Calls 2

memsetFunction · 0.85
i40e_vsi_vlan_pvid_setFunction · 0.85

Tested by

no test coverage detected