patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: Alvin Zhang <alvinx.zhang@intel.com>
Cc: Beilei Xing <beilei.xing@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/i40e: fix VF RSS configuration' has been queued to stable release 19.11.9
Date: Thu, 10 Jun 2021 14:06:11 +0200	[thread overview]
Message-ID: <20210610120641.885862-23-christian.ehrhardt@canonical.com> (raw)
In-Reply-To: <20210610120641.885862-1-christian.ehrhardt@canonical.com>

Hi,

FYI, your patch has been queued to stable release 19.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/12/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/24c9081923c3cbe139849f60bf7dc74a2a462b13

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 24c9081923c3cbe139849f60bf7dc74a2a462b13 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 12 May 2021 17:23:11 +0800
Subject: [PATCH] net/i40e: fix VF RSS configuration

[ upstream commit 7594f2dac4489cde35f7088a46b8133fd4738a4a ]

The kernel driver supports VF RSS configuration message
"VIRTCHNL_OP_GET_RSS_HENA_CAPS and VIRTCHNL_OP_SET_RSS_HENA",
this patch adds PMD support for these messages.

Fixes: b81295c474b0 ("net/i40e: add user callback for VF to PF message")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_pf.c | 61 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 50c9930198..842f5c281f 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -29,6 +29,28 @@
 
 #define I40E_CFG_CRCSTRIP_DEFAULT 1
 
+/* Supported RSS offloads */
+#define I40E_DEFAULT_RSS_HENA ( \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_SCTP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_L2_PAYLOAD))
+
+#define I40E_DEFAULT_RSS_HENA_EXPANDED (I40E_DEFAULT_RSS_HENA | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
+
 static int
 i40e_pf_host_switch_queues(struct i40e_pf_vf *vf,
 			   struct virtchnl_queue_select *qsel,
@@ -1288,6 +1310,37 @@ i40e_pf_host_process_cmd_request_queues(struct i40e_pf_vf *vf, uint8_t *msg)
 				(u8 *)vfres, sizeof(*vfres));
 }
 
+static void
+i40e_pf_host_process_cmd_get_rss_hena(struct i40e_pf_vf *vf)
+{
+	struct virtchnl_rss_hena vrh = {0};
+	struct i40e_pf *pf = vf->pf;
+
+	if (pf->adapter->hw.mac.type == I40E_MAC_X722)
+		vrh.hena = I40E_DEFAULT_RSS_HENA_EXPANDED;
+	else
+		vrh.hena = I40E_DEFAULT_RSS_HENA;
+
+	i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HENA_CAPS,
+				    I40E_SUCCESS, (uint8_t *)&vrh, sizeof(vrh));
+}
+
+static void
+i40e_pf_host_process_cmd_set_rss_hena(struct i40e_pf_vf *vf, uint8_t *msg)
+{
+	struct virtchnl_rss_hena *vrh =
+		(struct virtchnl_rss_hena *)msg;
+	struct i40e_hw *hw = &vf->pf->adapter->hw;
+
+	i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(0, vf->vf_idx),
+			  (uint32_t)vrh->hena);
+	i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(1, vf->vf_idx),
+			  (uint32_t)(vrh->hena >> 32));
+
+	i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_SET_RSS_HENA,
+				    I40E_SUCCESS, NULL, 0);
+}
+
 void
 i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
 			   uint16_t abs_vf_id, uint32_t opcode,
@@ -1458,6 +1511,14 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
 		PMD_DRV_LOG(INFO, "OP_REQUEST_QUEUES received");
 		i40e_pf_host_process_cmd_request_queues(vf, msg);
 		break;
+	case VIRTCHNL_OP_GET_RSS_HENA_CAPS:
+		PMD_DRV_LOG(INFO, "OP_GET_RSS_HENA_CAPS received");
+		i40e_pf_host_process_cmd_get_rss_hena(vf);
+		break;
+	case VIRTCHNL_OP_SET_RSS_HENA:
+		PMD_DRV_LOG(INFO, "OP_SET_RSS_HENA received");
+		i40e_pf_host_process_cmd_set_rss_hena(vf, msg);
+		break;
 
 	/* Don't add command supported below, which will
 	 * return an error code.
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-10 14:04:59.150812012 +0200
+++ 0023-net-i40e-fix-VF-RSS-configuration.patch	2021-06-10 14:04:58.050024525 +0200
@@ -1 +1 @@
-From 7594f2dac4489cde35f7088a46b8133fd4738a4a Mon Sep 17 00:00:00 2001
+From 24c9081923c3cbe139849f60bf7dc74a2a462b13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7594f2dac4489cde35f7088a46b8133fd4738a4a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9804ed4253..e2d8b2b5f7 100644
+index 50c9930198..842f5c281f 100644

  parent reply	other threads:[~2021-06-10 12:07 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 12:05 [dpdk-stable] patch 'app/testpmd: fix NVGRE encap " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'Revert "kni: fix compilation on SLES15-SP3"' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'bus/fslmc: remove unused debug macro' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'raw/skeleton: add missing check after setting attribute' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'ipc: use monotonic clock' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'examples/timer: fix time interval' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'test/timer: check memzone allocation' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'power: fix sanity checks for guest channel read' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'event/dpaa2: remove unused macros' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'app/eventdev: fix lcore parsing skipping last core' " Christian Ehrhardt
2021-06-10 12:05 ` [dpdk-stable] patch 'net/ice/base: fix memory allocation wrapper' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/ena: switch memcpy to optimized version' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/ena/base: fix type conversions by explicit casting' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/ena: remove endian swap functions' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/nfp: fix reporting of RSS capabilities' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/hns3: return error on PCI config write failure' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/hns3: clear hash map on flow director clear' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/hns3: fix querying flow director counter for out param' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/hns3: fix secondary process request start/stop Rx/Tx' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/hns3: fix ordering in secondary process initialization' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/iavf: fix Tx context descriptor' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/ice: fix VSI array out of bounds access' " Christian Ehrhardt
2021-06-10 12:06 ` Christian Ehrhardt [this message]
2021-06-10 12:06 ` [dpdk-stable] patch 'net/bnx2x: fix build with GCC 11' " Christian Ehrhardt
2021-06-10 12:06 ` Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/ice/base: " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/tap: " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/mlx4: fix secondary process initialization ordering' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/mlx5: " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'crypto/qat: fix null authentication request' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'app/crypto-perf: check memory allocation' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'examples/rxtx_callbacks: fix port ID format specifier' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'examples/flow_classify: fix NUMA check of port and core' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'examples/l2fwd-cat: " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'examples/skeleton: " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test: check flow classifier creation' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test/power: fix CPU frequency check' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test/power: add turbo mode to " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test/power: fix low frequency test when turbo enabled' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test/power: fix turbo test' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test/table: fix build with GCC 11' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'examples/l3fwd-power: fix empty poll thresholds' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test: fix division by zero' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test/crypto: fix build with GCC 11' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/mlx4: fix leak when configured repeatedly' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/mlx5: " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/hns3: fix requested FC mode rollback' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/hns3: remove meaningless packet buffer " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/hns3: fix DCB reconfiguration' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'common/sfc_efx/base: limit reported MCDI response length' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'net/memif: fix Tx bps statistics for zero-copy' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test: fix build with GCC 11' " Christian Ehrhardt
2021-06-10 12:06 ` [dpdk-stable] patch 'test/cmdline: silence clang 12 warning' " Christian Ehrhardt

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=20210610120641.885862-23-christian.ehrhardt@canonical.com \
    --to=christian.ehrhardt@canonical.com \
    --cc=alvinx.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=stable@dpdk.org \
    /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).