[dpdk-stable] patch 'event/octeontx: fix partial Rx packet handling' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Wed Dec 11 22:26:59 CET 2019


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 12/17/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/d19f921b996ef410b3eac80e5f5cf0229c2faf78

Thanks.

Kevin.

---
>From d19f921b996ef410b3eac80e5f5cf0229c2faf78 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula at marvell.com>
Date: Wed, 27 Nov 2019 18:06:47 +0530
Subject: [PATCH] event/octeontx: fix partial Rx packet handling

[ upstream commit 4a2121667445280e9966b4dbe673d4eca18d50a2 ]

When net/octeontx is connected to event/octeontx as an event Rx adapter,
PKI aka 'net/octeontx' can forward packets directly to SSO aka
'event/octeontx'.
When pumping traffic to PKI if flow control is disabled internal FIFOs
might be overrun causing partial l2 packets to be enqueued.
SSO receives <31:0> TAG tag calculated by PKI, in normal cases <31:28>
is always 0 which signifies RTE_EVENT_TYPE_ETHDEV. But in case of
partial received packets PKI sets the <31:0> TAG as 0xFFFFFFFF which
is an invalid event type.

Add a check to see if TAG is 0xFFFFFFFF and free the partial receive
packet.

Fixes: d0d654986018 ("net/octeontx: support event Rx adapter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/event/octeontx/ssovf_worker.h | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h
index d1d3a52ae..c4f886d63 100644
--- a/drivers/event/octeontx/ssovf_worker.h
+++ b/drivers/event/octeontx/ssovf_worker.h
@@ -31,6 +31,5 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_info)
 
 	/* Get mbuf from wqe */
-	mbuf = (struct rte_mbuf *)((uintptr_t)wqe -
-			OCTTX_PACKET_WQE_SKIP);
+	mbuf = (struct rte_mbuf *)((uintptr_t)wqe - OCTTX_PACKET_WQE_SKIP);
 	rte_prefetch_non_temporal(mbuf);
 	mbuf->packet_type =
@@ -47,4 +46,14 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_info)
 }
 
+static __rte_always_inline void
+ssovf_octeontx_wqe_free(uint64_t work)
+{
+	octtx_wqe_t *wqe = (octtx_wqe_t *)(uintptr_t)work;
+	struct rte_mbuf *mbuf;
+
+	mbuf = (struct rte_mbuf *)((uintptr_t)wqe - OCTTX_PACKET_WQE_SKIP);
+	rte_pktmbuf_free(mbuf);
+}
+
 static __rte_always_inline uint16_t
 ssows_get_work(struct ssows *ws, struct rte_event *ev)
@@ -60,7 +69,11 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev)
 	sched_type_queue = sched_type_queue << 38;
 	ev->event = sched_type_queue | (get_work0 & 0xffffffff);
+
 	if (get_work1 && ev->event_type == RTE_EVENT_TYPE_ETHDEV) {
 		ev->mbuf = ssovf_octeontx_wqe_to_pkt(get_work1,
 				(ev->event >> 20) & 0x7F);
+	} else if (unlikely((get_work0 & 0xFFFFFFFF) == 0xFFFFFFFF)) {
+		ssovf_octeontx_wqe_free(get_work1);
+		return 0;
 	} else {
 		ev->u64 = get_work1;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:17.916179004 +0000
+++ 0067-event-octeontx-fix-partial-Rx-packet-handling.patch	2019-12-11 21:24:12.755649399 +0000
@@ -1 +1 @@
-From 4a2121667445280e9966b4dbe673d4eca18d50a2 Mon Sep 17 00:00:00 2001
+From d19f921b996ef410b3eac80e5f5cf0229c2faf78 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4a2121667445280e9966b4dbe673d4eca18d50a2 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list