| 426 | } |
| 427 | |
| 428 | static int |
| 429 | ngbe_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 | |
| 446 | static int |
| 447 | ngbe_set_vf_lpe(struct rte_eth_dev *eth_dev, |
no test coverage detected