| 3606 | } |
| 3607 | |
| 3608 | static int igbvf_set_vfta(struct e1000_hw *hw, uint16_t vid, bool on) |
| 3609 | { |
| 3610 | struct e1000_mbx_info *mbx = &hw->mbx; |
| 3611 | uint32_t msgbuf[2]; |
| 3612 | s32 err; |
| 3613 | |
| 3614 | /* After set vlan, vlan strip will also be enabled in igb driver*/ |
| 3615 | msgbuf[0] = E1000_VF_SET_VLAN; |
| 3616 | msgbuf[1] = vid; |
| 3617 | /* Setting the 8 bit field MSG INFO to TRUE indicates "add" */ |
| 3618 | if (on) |
| 3619 | msgbuf[0] |= E1000_VF_SET_VLAN_ADD; |
| 3620 | |
| 3621 | err = mbx->ops.write_posted(hw, msgbuf, 2, 0); |
| 3622 | if (err) |
| 3623 | goto mbx_err; |
| 3624 | |
| 3625 | err = mbx->ops.read_posted(hw, msgbuf, 2, 0); |
| 3626 | if (err) |
| 3627 | goto mbx_err; |
| 3628 | |
| 3629 | msgbuf[0] &= ~E1000_VT_MSGTYPE_CTS; |
| 3630 | if (msgbuf[0] == (E1000_VF_SET_VLAN | E1000_VT_MSGTYPE_NACK)) |
| 3631 | err = -EINVAL; |
| 3632 | |
| 3633 | mbx_err: |
| 3634 | return err; |
| 3635 | } |
| 3636 | |
| 3637 | static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on) |
| 3638 | { |
no outgoing calls
no test coverage detected