From: Wei Dai Date: Thu, 22 Mar 2018 03:41:01 +0000 (+0800) Subject: net/ixgbe: support VLAN strip per queue offloading in VF X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=860a94d3c692;p=dpdk.git net/ixgbe: support VLAN strip per queue offloading in VF VLAN strip is a per queue offloading in VF. With this patch it can be enabled or disabled on any Rx queue in VF. Signed-off-by: Wei Dai Acked-by: Qi Zhang --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b3b46312d5..fa1315e276 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5166,15 +5166,17 @@ ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + struct ixgbe_rx_queue *rxq; uint16_t i; int on = 0; /* VF function only support hw strip feature, others are not support */ if (mask & ETH_VLAN_STRIP_MASK) { - on = !!(dev->data->dev_conf.rxmode.hw_vlan_strip); - - for (i = 0; i < hw->mac.max_rx_queues; i++) + for (i = 0; i < hw->mac.max_rx_queues; i++) { + rxq = dev->data->rx_queues[i]; + on = !!(rxq->offloads & DEV_RX_OFFLOAD_VLAN_STRIP); ixgbevf_vlan_strip_queue_set(dev, i, on); + } } return 0;