DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yanglong Wu <yanglong.wu@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, wei.dai@intel.com,
	Yanglong Wu <yanglong.wu@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix VLAN strip setting fail for per port
Date: Fri, 18 May 2018 15:23:41 +0800	[thread overview]
Message-ID: <20180518072341.27051-1-yanglong.wu@intel.com> (raw)
In-Reply-To: <20180517055205.58766-1-yanglong.wu@intel.com>

rxq->offload should synchronize with dev_conf

Fixes: 860a94d3c692 ("net/ixgbe: support VLAN strip per queue offloading in VF")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
v2:
rework as comments asked
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f5006bc94..94d28878a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2114,6 +2114,14 @@ ixgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			rxq = dev->data->rx_queues[i];
 			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx));
+
+			/* rxq->offload should synchronize with dev_conf*/
+			if (dev->data->dev_conf.rxmode.offloads &
+					DEV_RX_OFFLOAD_VLAN_STRIP)
+				rxq->offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
+			else
+				rxq->offloads &= ~DEV_RX_OFFLOAD_VLAN_STRIP;
+
 			if (rxq->offloads & DEV_RX_OFFLOAD_VLAN_STRIP) {
 				ctrl |= IXGBE_RXDCTL_VME;
 				on = TRUE;
@@ -5230,6 +5238,14 @@ ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	if (mask & ETH_VLAN_STRIP_MASK) {
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			rxq = dev->data->rx_queues[i];
+
+			/* rxq->offload should synchronize with dev_conf*/
+			if (dev->data->dev_conf.rxmode.offloads &
+						DEV_RX_OFFLOAD_VLAN_STRIP)
+				rxq->offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
+			else
+				rxq->offloads &= ~DEV_RX_OFFLOAD_VLAN_STRIP;
+
 			on = !!(rxq->offloads &	DEV_RX_OFFLOAD_VLAN_STRIP);
 			ixgbevf_vlan_strip_queue_set(dev, i, on);
 		}
-- 
2.11.0

  parent reply	other threads:[~2018-05-18  7:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17  5:52 [dpdk-dev] [PATCH] " Yanglong Wu
2018-05-17 15:49 ` Zhang, Qi Z
2018-05-18  7:16 ` [dpdk-dev] [DPDK] " Yanglong Wu
2018-05-18  7:23 ` Yanglong Wu [this message]
2018-05-18  7:45   ` [dpdk-dev] [PATCH v2] " Zhang, Qi Z
2018-05-18 11:06     ` Dai, Wei
2018-05-18 12:36       ` Zhang, Qi Z
2018-05-18 14:08         ` Ferruh Yigit
2018-05-18 15:05         ` Dai, Wei
2018-05-18 16:10           ` Dai, Wei
2018-05-18 15:43   ` [dpdk-dev] [PATCH v3] net/ixgbe: config VLAN strip on the fly Wei Dai
2018-05-18 16:08     ` [dpdk-dev] [PATCH v4] " Wei Dai
2018-05-19  0:19       ` Zhang, Qi Z
2018-05-19 10:32         ` Dai, Wei
2018-05-19 10:11       ` [dpdk-dev] [PATCH v5] net/ixgbe: fix to " Wei Dai
2018-05-21  1:15         ` Zhang, Helin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180518072341.27051-1-yanglong.wu@intel.com \
    --to=yanglong.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=wei.dai@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).