On 1/22/2021 9:47 AM, Jiawen Wu wrote:
Add VLAN filter, offload and strip set support to VF driver.

Signed-off-by: Jiawen Wu <jiawe...@trustnetic.com>

<...>

+static int
+txgbevf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+{
+       struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+       struct txgbe_vfta *shadow_vfta = TXGBE_DEV_VFTA(dev);
+       uint32_t vid_idx = 0;
+       uint32_t vid_bit = 0;
+       int ret = 0;
+
+       PMD_INIT_FUNC_TRACE();
+
+       /* vind is not used in VF driver, set to 0, check txgbe_set_vfta_vf */
+       ret = hw->mac.set_vfta(hw, vlan_id, 0, !!on, false);
+       if (ret) {
+               PMD_INIT_LOG(ERR, "Unable to set VF vlan");
+               return ret;
+       }
+       vid_idx = (uint32_t)((vlan_id >> 5) & 0x7F);
+       vid_bit = (uint32_t)(1 << (vlan_id & 0x1F));
+
+       /* Save what we set and retore it after device reset */

s/retore/restore

Reply via email to