From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A951A034E for ; Mon, 21 Feb 2022 16:37:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8627040E5A; Mon, 21 Feb 2022 16:37:43 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id EDF9E4013F for ; Mon, 21 Feb 2022 16:37:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645457861; 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=lUKag/obK4nNBoVzBZR8J2aKvyDqVPhCdyv8BdCxjd8=; b=WtikzkrdNd6ZIxZP3OVnoCxlzsVzb6bl1dmLA2Ihwmaym1PhbLRe+96XZax6JweTbjgr+D oXitrfJ7HdHuU57uuCtyEaO7sigrJBwQX9eJQsg3CfQgQharBZjNa9P3dv1m1avWBLgaSU 1c3cirJNM7yrY9qU/Q+cBB9FdRAYvGg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-671-G3psH31SM5G2s60u6Z-ckg-1; Mon, 21 Feb 2022 10:37:36 -0500 X-MC-Unique: G3psH31SM5G2s60u6Z-ckg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1C6CA180FD60; Mon, 21 Feb 2022 15:37:35 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 11F197E131; Mon, 21 Feb 2022 15:37:33 +0000 (UTC) From: Kevin Traynor To: Anoob Joseph Cc: Akhil Goyal , dpdk stable Subject: patch 'crypto/cnxk: fix extend tail calculation' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:33:30 +0000 Message-Id: <20220221153625.152324-21-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 21.11.1 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/26/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/7823f355816f9aa3824348ac3951cb8b3af3a4ad Thanks. Kevin --- >From 7823f355816f9aa3824348ac3951cb8b3af3a4ad Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Fri, 17 Dec 2021 14:50:05 +0530 Subject: [PATCH] crypto/cnxk: fix extend tail calculation [ upstream commit c99f673f950ea082df4344348f8b5cae88f245a8 ] If the packet size to be incremented after IPsec processing is less than size of hdr (size incremented before submitting), then extend_tail can become negative. Allow negative values for the variable. Fixes: 67a87e89561c ("crypto/cnxk: add cn9k lookaside IPsec datapath") Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- drivers/crypto/cnxk/cn9k_ipsec_la_ops.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h b/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h index 2dc8913feb..2b0261e057 100644 --- a/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h +++ b/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h @@ -78,7 +78,8 @@ process_outb_sa(struct rte_crypto_op *cop, struct cn9k_ipsec_sa *sa, struct rte_crypto_sym_op *sym_op = cop->sym; struct rte_mbuf *m_src = sym_op->m_src; - uint32_t dlen, rlen, extend_tail; struct roc_ie_on_outb_sa *out_sa; struct roc_ie_on_outb_hdr *hdr; + uint32_t dlen, rlen; + int32_t extend_tail; out_sa = &sa->out_sa; @@ -89,5 +90,6 @@ process_outb_sa(struct rte_crypto_op *cop, struct cn9k_ipsec_sa *sa, extend_tail = rlen - dlen; if (unlikely(extend_tail > rte_pktmbuf_tailroom(m_src))) { - plt_dp_err("Not enough tail room"); + plt_dp_err("Not enough tail room (required: %d, available: %d", + extend_tail, rte_pktmbuf_tailroom(m_src)); return -ENOMEM; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:45.120010134 +0000 +++ 0021-crypto-cnxk-fix-extend-tail-calculation.patch 2022-02-21 15:22:44.044704019 +0000 @@ -1 +1 @@ -From c99f673f950ea082df4344348f8b5cae88f245a8 Mon Sep 17 00:00:00 2001 +From 7823f355816f9aa3824348ac3951cb8b3af3a4ad Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c99f673f950ea082df4344348f8b5cae88f245a8 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org