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

Function igbvf_set_vfta

dpdk/drivers/net/e1000/igb_ethdev.c:3608–3635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3606}
3607
3608static 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
3633mbx_err:
3634 return err;
3635}
3636
3637static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on)
3638{

Callers 2

igbvf_set_vfta_allFunction · 0.85
igbvf_vlan_filter_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected