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

Function txgbe_set_vfta_vf

dpdk/drivers/net/txgbe/base/txgbe_vf.c:388–405  ·  view source on GitHub ↗

* txgbe_set_vfta_vf - Set/Unset vlan filter table address * @hw: pointer to the HW structure * @vlan: 12 bit VLAN ID * @vind: unused by VF drivers * @vlan_on: if true then set bit, else clear bit * @vlvf_bypass: boolean flag indicating updating default pool is okay * * Turn on/off specified VLAN in the VLAN filter table. **/

Source from the content-addressed store, hash-verified

386 * Turn on/off specified VLAN in the VLAN filter table.
387 **/
388s32 txgbe_set_vfta_vf(struct txgbe_hw *hw, u32 vlan, u32 vind,
389 bool vlan_on, bool vlvf_bypass)
390{
391 u32 msgbuf[2];
392 s32 ret_val;
393 UNREFERENCED_PARAMETER(vind, vlvf_bypass);
394
395 msgbuf[0] = TXGBE_VF_SET_VLAN;
396 msgbuf[1] = vlan;
397 /* Setting the 8 bit field MSG INFO to TRUE indicates "add" */
398 msgbuf[0] |= vlan_on << TXGBE_VT_MSGINFO_SHIFT;
399
400 ret_val = txgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 2);
401 if (!ret_val && (msgbuf[0] & TXGBE_VT_MSGTYPE_ACK))
402 return 0;
403
404 return ret_val | (msgbuf[0] & TXGBE_VT_MSGTYPE_NACK);
405}
406
407/**
408 * txgbe_get_mac_addr_vf - Read device MAC address

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected