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

Function ngbe_vf_set_vlan

dpdk/drivers/net/ngbe/ngbe_pf.c:428–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428static int
429ngbe_vf_set_vlan(struct rte_eth_dev *eth_dev, uint32_t vf, uint32_t *msgbuf)
430{
431 int add, vid;
432 struct ngbe_hw *hw = ngbe_dev_hw(eth_dev);
433 struct ngbe_vf_info *vfinfo = *(NGBE_DEV_VFDATA(eth_dev));
434
435 add = (msgbuf[0] & NGBE_VT_MSGINFO_MASK)
436 >> NGBE_VT_MSGINFO_SHIFT;
437 vid = NGBE_PSRVLAN_VID(msgbuf[1]);
438
439 if (add)
440 vfinfo[vf].vlan_count++;
441 else if (vfinfo[vf].vlan_count)
442 vfinfo[vf].vlan_count--;
443 return hw->mac.set_vfta(hw, vid, vf, (bool)add, false);
444}
445
446static int
447ngbe_set_vf_lpe(struct rte_eth_dev *eth_dev,

Callers 1

ngbe_rcv_msg_from_vfFunction · 0.85

Calls 1

ngbe_dev_hwFunction · 0.85

Tested by

no test coverage detected