| 530 | } |
| 531 | |
| 532 | static int |
| 533 | ixgbe_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 | |
| 551 | static int |
| 552 | ixgbe_set_vf_lpe(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) |
no outgoing calls
no test coverage detected