From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6D9A5A04F5 for ; Wed, 11 Dec 2019 22:29:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6204D1F5; Wed, 11 Dec 2019 22:29:33 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id B85E61F5 for ; Wed, 11 Dec 2019 22:29:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y8vt6WF00hZBcmP1NONItRpltdjjgoBnhF2slJvaXpc=; b=WhVmzmWhKEIBzZvGpoBbCNkkE6emIENbdj/KeBgI6kAaklHgs7NuthpKrF12EphHvlBmt3 hHgwCIRfWw2taVn7X0sdEiQPKCoaNlu9d+hTo7fnz4tL7skNttTcy5B2X4HvPP16Le4yVt IiowXVVJ0MutM+mNRE8nSfUsnZJFjzM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-418-3c7vZJYXOlC3qZJK6dUs6Q-1; Wed, 11 Dec 2019 16:29:27 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC5C7100551B; Wed, 11 Dec 2019 21:29:26 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 00D5110013A1; Wed, 11 Dec 2019 21:29:25 +0000 (UTC) From: Kevin Traynor To: Pavan Nikhilesh Cc: Jerin Jacob , dpdk stable Date: Wed, 11 Dec 2019 21:26:59 +0000 Message-Id: <20191211212702.27851-67-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: 3c7vZJYXOlC3qZJK6dUs6Q-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'event/octeontx: fix partial Rx packet handling' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 rebasi= ng (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/d19f921b996ef410b3= eac80e5f5cf0229c2faf78 Thanks. Kevin. --- >From d19f921b996ef410b3eac80e5f5cf0229c2faf78 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh 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 Acked-by: Jerin Jacob --- 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_in= fo) =20 =09/* Get mbuf from wqe */ -=09mbuf =3D (struct rte_mbuf *)((uintptr_t)wqe - -=09=09=09OCTTX_PACKET_WQE_SKIP); +=09mbuf =3D (struct rte_mbuf *)((uintptr_t)wqe - OCTTX_PACKET_WQE_SKIP); =09rte_prefetch_non_temporal(mbuf); =09mbuf->packet_type =3D @@ -47,4 +46,14 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_i= nfo) } =20 +static __rte_always_inline void +ssovf_octeontx_wqe_free(uint64_t work) +{ +=09octtx_wqe_t *wqe =3D (octtx_wqe_t *)(uintptr_t)work; +=09struct rte_mbuf *mbuf; + +=09mbuf =3D (struct rte_mbuf *)((uintptr_t)wqe - OCTTX_PACKET_WQE_SKIP); +=09rte_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) =09sched_type_queue =3D sched_type_queue << 38; =09ev->event =3D sched_type_queue | (get_work0 & 0xffffffff); + =09if (get_work1 && ev->event_type =3D=3D RTE_EVENT_TYPE_ETHDEV) { =09=09ev->mbuf =3D ssovf_octeontx_wqe_to_pkt(get_work1, =09=09=09=09(ev->event >> 20) & 0x7F); +=09} else if (unlikely((get_work0 & 0xFFFFFFFF) =3D=3D 0xFFFFFFFF)) { +=09=09ssovf_octeontx_wqe_free(get_work1); +=09=09return 0; =09} else { =09=09ev->u64 =3D get_work1; --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:17.916179004 +0000 +++ 0067-event-octeontx-fix-partial-Rx-packet-handling.patch=092019-12-11 2= 1: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@dpdk.org