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 DFF2EA054C for ; Fri, 14 Feb 2020 18:06:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D8E9E11A4; Fri, 14 Feb 2020 18:06:32 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 3D9B111A4 for ; Fri, 14 Feb 2020 18:06:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581699990; 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=ifMxVKCARytTb9ZqRHEPzbG+qWF59h+LlXVZUJpVTwA=; b=JyK6YURspdgdr/mIF6+/dXGky4NmkibuUF3uZ4ZwEp0jzSr7t6rP3ue7Dsd5UakNe/Uh3r 7DdD3RHgos04SjzoFLNZRc1vXICYzSB16OYiLRX18NTsUixF5mo0w8qnA8z95o5zgothFh Eqn00U9+2sfJFO/0oyaGZ91TlUmVnCk= 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-413-aDTgECneM1-4G6AK1-zSfA-1; Fri, 14 Feb 2020 12:06:25 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 45231107ACC4; Fri, 14 Feb 2020 17:06:24 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 70A7489F3C; Fri, 14 Feb 2020 17:06:19 +0000 (UTC) From: Kevin Traynor To: Archana Muniganti Cc: Anoob Joseph , dpdk stable Date: Fri, 14 Feb 2020 17:03:34 +0000 Message-Id: <20200214170337.25093-40-ktraynor@redhat.com> In-Reply-To: <20200214170337.25093-1-ktraynor@redhat.com> References: <20200214170337.25093-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: aDTgECneM1-4G6AK1-zSfA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' has been queued to LTS release 18.11.7 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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/20. 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/0059d95c55496ccc64= cfe8d2d7b8c9ba35ee3b00 Thanks. Kevin. --- >From 0059d95c55496ccc64cfe8d2d7b8c9ba35ee3b00 Mon Sep 17 00:00:00 2001 From: Archana Muniganti Date: Wed, 5 Feb 2020 18:46:17 +0530 Subject: [PATCH] common/cpt: fix component for empty IOV buffer [ upstream commit 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 ] fill_sg_comp_from_iov() prepares gather components for i/p IOV buffers and extra buf. This API is failing to create a gather component for extra_buf when IOV buf len is zero. Though there is enough space to accommodate extra_buf, because of pre-decrementing of extra_buf length from aggregate size, this issue is seen. Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption") Signed-off-by: Archana Muniganti Signed-off-by: Anoob Joseph --- drivers/common/cpt/cpt_ucode.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.= h index 67f19bd379..f47c96d934 100644 --- a/drivers/common/cpt/cpt_ucode.h +++ b/drivers/common/cpt/cpt_ucode.h @@ -378,5 +378,5 @@ fill_sg_comp_from_iov(sg_comp_t *list, =09int32_t j; =09uint32_t extra_len =3D extra_buf ? extra_buf->size : 0; -=09uint32_t size =3D *psize - extra_len; +=09uint32_t size =3D *psize; =09buf_ptr_t *bufs; =20 @@ -387,7 +387,4 @@ fill_sg_comp_from_iov(sg_comp_t *list, =09=09sg_comp_t *to =3D &list[i >> 2]; =20 -=09=09if (!bufs[j].size) -=09=09=09continue; - =09=09if (unlikely(from_offset)) { =09=09=09if (from_offset >=3D bufs[j].size) { @@ -421,4 +418,5 @@ fill_sg_comp_from_iov(sg_comp_t *list, =09=09=09} =20 +=09=09=09extra_len =3D RTE_MIN(extra_len, size); =09=09=09/* Insert extra data ptr */ =09=09=09if (extra_len) { @@ -426,11 +424,11 @@ fill_sg_comp_from_iov(sg_comp_t *list, =09=09=09=09to =3D &list[i >> 2]; =09=09=09=09to->u.s.len[i % 4] =3D -=09=09=09=09=09rte_cpu_to_be_16(extra_buf->size); +=09=09=09=09=09rte_cpu_to_be_16(extra_len); =09=09=09=09to->ptr[i % 4] =3D =09=09=09=09=09rte_cpu_to_be_64(extra_buf->dma_addr); - -=09=09=09=09/* size already decremented by extra len */ +=09=09=09=09size -=3D extra_len; =09=09=09} =20 +=09=09=09next_len =3D RTE_MIN(next_len, size); =09=09=09/* insert the rest of the data */ =09=09=09if (next_len) { --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-14 17:02:39.274872102 +0000 +++ 0040-common-cpt-fix-component-for-empty-IOV-buffer.patch=092020-02-14 1= 7:02:37.060405664 +0000 @@ -1 +1 @@ -From 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 Mon Sep 17 00:00:00 2001 +From 0059d95c55496ccc64cfe8d2d7b8c9ba35ee3b00 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 081249cd7b..c310ea7cb4 100644 +index 67f19bd379..f47c96d934 100644 @@ -25 +26 @@ -@@ -374,5 +374,5 @@ fill_sg_comp_from_iov(sg_comp_t *list, +@@ -378,5 +378,5 @@ fill_sg_comp_from_iov(sg_comp_t *list, @@ -32 +33 @@ -@@ -383,7 +383,4 @@ fill_sg_comp_from_iov(sg_comp_t *list, +@@ -387,7 +387,4 @@ fill_sg_comp_from_iov(sg_comp_t *list, @@ -40 +41 @@ -@@ -417,4 +414,5 @@ fill_sg_comp_from_iov(sg_comp_t *list, +@@ -421,4 +418,5 @@ fill_sg_comp_from_iov(sg_comp_t *list, @@ -46 +47 @@ -@@ -422,11 +420,11 @@ fill_sg_comp_from_iov(sg_comp_t *list, +@@ -426,11 +424,11 @@ fill_sg_comp_from_iov(sg_comp_t *list,