From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 56AB61322C for ; Thu, 22 Mar 2018 04:41:38 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2018 20:41:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,342,1517904000"; d="scan'208";a="30186773" Received: from dw2.bj.intel.com ([172.16.117.110]) by fmsmga002.fm.intel.com with ESMTP; 21 Mar 2018 20:41:36 -0700 From: Wei Dai To: konstantin.ananyev@intel.com, wenzhuo.lu@intel.com Cc: dev@dpdk.org, Wei Dai Date: Thu, 22 Mar 2018 11:41:01 +0800 Message-Id: <20180322034103.25734-3-wei.dai@intel.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180322034103.25734-1-wei.dai@intel.com> References: <1521443063-57722-1-git-send-email-wei.dai@intel.com> <20180322034103.25734-1-wei.dai@intel.com> Subject: [dpdk-dev] [PATCH v4 2/4] net/ixgbe: support VLAN strip per queue offloading in VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 03:41:39 -0000 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 --- drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 73755d2..8bb67ba 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5215,15 +5215,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; -- 2.9.5