patch 'net/iavf: fix handling of IPsec events' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Fri Nov 11 11:33:21 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

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/14/22. 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

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

Thanks.

Kevin

---
>From af41fb34eb91687a733fb4edc216dc79e2284d29 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau at intel.com>
Date: Mon, 24 Oct 2022 12:34:47 +0100
Subject: [PATCH] net/iavf: fix handling of IPsec events

[ upstream commit cc9317e2b0b245821180e858a904ceec33388fe1 ]

Verify that the message length is non zero and keep processing
virtual channel messages after the event is received.

Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")

Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 42 ++++++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 16 deletions(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 54c6e39e16..d11b9fc8e3 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -489,20 +489,30 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev)
 						info.msg_len);
 			} else {
-				/* check for inline IPsec events */
-				struct inline_ipsec_msg *imsg =
-					(struct inline_ipsec_msg *)info.msg_buf;
-				struct rte_eth_event_ipsec_desc desc;
-				if (msg_opc ==
-					VIRTCHNL_OP_INLINE_IPSEC_CRYPTO &&
-					imsg->ipsec_opcode ==
-						INLINE_IPSEC_OP_EVENT) {
-					struct virtchnl_ipsec_event *ev =
-							imsg->ipsec_data.event;
-					desc.subtype =
-						RTE_ETH_EVENT_IPSEC_UNKNOWN;
-					desc.metadata = ev->ipsec_event_data;
-					iavf_dev_event_post(dev, RTE_ETH_EVENT_IPSEC,
-							&desc, sizeof(desc));
-					return;
+				/* check for unsolicited messages i.e. events */
+				if (info.msg_len > 0) {
+					switch (msg_opc) {
+					case VIRTCHNL_OP_INLINE_IPSEC_CRYPTO: {
+						struct inline_ipsec_msg *imsg =
+							(struct inline_ipsec_msg *)info.msg_buf;
+						if (imsg->ipsec_opcode
+								== INLINE_IPSEC_OP_EVENT) {
+							struct rte_eth_event_ipsec_desc desc;
+							struct virtchnl_ipsec_event *ev =
+									imsg->ipsec_data.event;
+							desc.subtype =
+									RTE_ETH_EVENT_IPSEC_UNKNOWN;
+							desc.metadata =
+									ev->ipsec_event_data;
+							iavf_dev_event_post(dev,
+								RTE_ETH_EVENT_IPSEC,
+								&desc, sizeof(desc));
+							continue;
+					}
+				}
+						break;
+					default:
+						break;
+					}
+
 				}
 
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-11 10:32:17.815613133 +0000
+++ 0031-net-iavf-fix-handling-of-IPsec-events.patch	2022-11-11 10:32:17.091300837 +0000
@@ -1 +1 @@
-From cc9317e2b0b245821180e858a904ceec33388fe1 Mon Sep 17 00:00:00 2001
+From af41fb34eb91687a733fb4edc216dc79e2284d29 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc9317e2b0b245821180e858a904ceec33388fe1 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 654bc7edb6..f92daf97f2 100644
+index 54c6e39e16..d11b9fc8e3 100644



More information about the stable mailing list