patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Xiao Zhang <xiao.zhang@intel.com>
Cc: Beilei Xing <beilei.xing@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/i40e: fix VF runtime queues RSS config' has been queued to LTS release 18.11.6
Date: Fri, 22 Nov 2019 14:40:50 +0000	[thread overview]
Message-ID: <20191122144131.21231-4-ktraynor@redhat.com> (raw)
In-Reply-To: <20191122144131.21231-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/29/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/87a7d973dc3bab38be39a6abd0c611ff549594b0

Thanks.

Kevin.

---
From 87a7d973dc3bab38be39a6abd0c611ff549594b0 Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang@intel.com>
Date: Wed, 14 Aug 2019 06:17:45 +0800
Subject: [PATCH] net/i40e: fix VF runtime queues RSS config

[ upstream commit 2da3ba7467955bce812f5f2c79c6c57859689bb6 ]

I40evf queue can not work properly with kernel pf driver for X722 vf.
Eg. when configure 8 queues pair, only 4 queues can receive packets,
and half packets will be lost if using 2 queues pair.

This issue is caused by misconfiguration of look up table, the original
code of LUT configuration did not work for X722 vf, use aq command to
setup the LUT to make it work properly.

Fixes: cea7a51c1750 ("i40evf: support RSS")

Acked-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 32 +++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 49bdeb329..0f7aa5a72 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2527,5 +2527,8 @@ i40evf_config_rss(struct i40e_vf *vf)
 	struct rte_eth_rss_conf rss_conf;
 	uint32_t i, j, lut = 0, nb_q = (I40E_VFQF_HLUT_MAX_INDEX + 1) * 4;
+	uint32_t rss_lut_size = (I40E_VFQF_HLUT1_MAX_INDEX + 1) * 4;
 	uint16_t num;
+	uint8_t *lut_info;
+	int ret;
 
 	if (vf->dev_data->dev_conf.rxmode.mq_mode != ETH_MQ_RX_RSS) {
@@ -2537,10 +2540,27 @@ i40evf_config_rss(struct i40e_vf *vf)
 	num = RTE_MIN(vf->dev_data->nb_rx_queues, I40E_MAX_QP_NUM_PER_VF);
 	/* Fill out the look up table */
-	for (i = 0, j = 0; i < nb_q; i++, j++) {
-		if (j >= num)
-			j = 0;
-		lut = (lut << 8) | j;
-		if ((i & 3) == 3)
-			I40E_WRITE_REG(hw, I40E_VFQF_HLUT(i >> 2), lut);
+	if (!(vf->flags & I40E_FLAG_RSS_AQ_CAPABLE)) {
+		for (i = 0, j = 0; i < nb_q; i++, j++) {
+			if (j >= num)
+				j = 0;
+			lut = (lut << 8) | j;
+			if ((i & 3) == 3)
+				I40E_WRITE_REG(hw, I40E_VFQF_HLUT(i >> 2), lut);
+		}
+	} else {
+		lut_info = rte_zmalloc("i40e_rss_lut", rss_lut_size, 0);
+		if (!lut_info) {
+			PMD_DRV_LOG(ERR, "No memory can be allocated");
+			return -ENOMEM;
+		}
+
+		for (i = 0; i < rss_lut_size; i++)
+			lut_info[i] = i % vf->num_queue_pairs;
+
+		ret = i40evf_set_rss_lut(&vf->vsi, lut_info,
+					 rss_lut_size);
+		rte_free(lut_info);
+		if (ret)
+			return ret;
 	}
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-11-22 14:36:55.434465970 +0000
+++ 0004-net-i40e-fix-VF-runtime-queues-RSS-config.patch	2019-11-22 14:36:55.116151017 +0000
@@ -1 +1 @@
-From 2da3ba7467955bce812f5f2c79c6c57859689bb6 Mon Sep 17 00:00:00 2001
+From 87a7d973dc3bab38be39a6abd0c611ff549594b0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2da3ba7467955bce812f5f2c79c6c57859689bb6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 308fb9835..c77b30c54 100644
+index 49bdeb329..0f7aa5a72 100644
@@ -27 +28 @@
-@@ -2599,5 +2599,8 @@ i40evf_config_rss(struct i40e_vf *vf)
+@@ -2527,5 +2527,8 @@ i40evf_config_rss(struct i40e_vf *vf)
@@ -36 +37 @@
-@@ -2609,10 +2612,27 @@ i40evf_config_rss(struct i40e_vf *vf)
+@@ -2537,10 +2540,27 @@ i40evf_config_rss(struct i40e_vf *vf)


  parent reply	other threads:[~2019-11-22 14:41 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 14:40 [dpdk-stable] patch 'net/bonding: fix out of bound access in LACP mode' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/bonding: fix LACP fast queue Rx handler' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/bonding: fix unicast packets filtering' " Kevin Traynor
2019-11-22 14:40 ` Kevin Traynor [this message]
2019-11-22 14:40 ` [dpdk-stable] patch 'ethdev: fix doc reference to FDIR disabled mode' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/af_packet: fix stale sockets' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'app/testpmd: remove duplicated Rx offload commands' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/atlantic: remove double function declaration' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/mlx4: fix build on ppc64' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/i40e: remove memory barrier from NEON Rx' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/i40e: remove compiler " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/ixgbe: remove memory " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/ixgbe: remove redundant assignment' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/vmxnet3: remove IP checksum from capabilities' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'ethdev: fix typos for ENOTSUP' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: fix queue interrupt for X552/557' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: enable new PF host mbox version' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: fix VF RSS offloads configuration' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/virtio: remove remaining simple Tx related stuff' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix typo in virtio in-order Rx function name' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix format in virtio guide' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'build: remove redundant libs from pkgconfig' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx: fix meson build with custom dependency path' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx: fix build with make and recent gcc' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'test/interrupt: account for race with callback' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'bus/pci: fix Intel IOMMU sysfs access check' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix unchecked return value' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix access to freed packet' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'security: fix doxygen fields' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/qat: fix digest length in XCBC capability' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix IOVA table' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/octeontx: enable unbinding' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix AESNI-GCM limitations in crypto guide' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/fips_validation: fix null dereferences' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'cryptodev: fix initialization on multi-process' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'drivers/crypto: remove some invalid comments' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/i40e: downgrade error log' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx5: fix Rx CQ doorbell synchronization on aarch64' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: refactor Rx and Tx queue setup' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: fix odd number of queues usage in 100G mode' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: fix RSS configuration as per new allocation method' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: fix stats flow " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'ci: add missing dependencies for documentation' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/e1000: fix i219 hang on reset/close' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/e1000: fix memory barrier usage in Tx' " Kevin Traynor

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=20191122144131.21231-4-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=beilei.xing@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiao.zhang@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).