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

Function ixgbe_vf_set_vlan

dpdk/drivers/net/ixgbe/ixgbe_pf.c:532–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532static int
533ixgbe_vf_set_vlan(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
534{
535 int add, vid;
536 struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
537 struct ixgbe_vf_info *vfinfo =
538 *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
539
540 add = (msgbuf[0] & IXGBE_VT_MSGINFO_MASK)
541 >> IXGBE_VT_MSGINFO_SHIFT;
542 vid = (msgbuf[1] & IXGBE_VLVF_VLANID_MASK);
543
544 if (add)
545 vfinfo[vf].vlan_count++;
546 else if (vfinfo[vf].vlan_count)
547 vfinfo[vf].vlan_count--;
548 return hw->mac.ops.set_vfta(hw, vid, vf, (bool)add, false);
549}
550
551static int
552ixgbe_set_vf_lpe(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)

Callers 1

ixgbe_rcv_msg_from_vfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected