[dpdk-dev] [PATCH v1 09/20] net/txgbe: add VLAN handle support to VF driver
Ferruh Yigit
ferruh.yigit at intel.com
Tue Feb 2 18:52:33 CET 2021
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 <jiawenwu at 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
More information about the dev
mailing list