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 29646A0542 for ; Fri, 11 Nov 2022 11:34:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 24C4540150; Fri, 11 Nov 2022 11:34:50 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 650864014F for ; Fri, 11 Nov 2022 11:34:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668162887; 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=RXCyAUrGwvSCHosuOYfGj1jx2YFrfjK0xExX8Jwchto=; b=dozJIid7e1R2soev+bAvxqBdEe7togWPeHiMQUOe+cmzJCN5wPNJ6sSSEwEnQkpXDlUYO3 sUAxDeGBhpIDjKz9eDiw2vswr4WJ0x6bwNur7aoHWbZwCHH8XXdPyWQjLrJaYQbBWrGccf DTzPDdPVwbk0Qfo+uCOSEcp6NodsOK4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-466-jmNYjsjwMQOV1nMtG1A9dA-1; Fri, 11 Nov 2022 05:34:44 -0500 X-MC-Unique: jmNYjsjwMQOV1nMtG1A9dA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E52498339CC; Fri, 11 Nov 2022 10:34:43 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA1962022EA2; Fri, 11 Nov 2022 10:34:42 +0000 (UTC) From: Kevin Traynor To: Radu Nicolau Cc: Qi Zhang , dpdk stable Subject: patch 'net/iavf: fix IPsec flow create error check' has been queued to stable release 21.11.3 Date: Fri, 11 Nov 2022 10:33:16 +0000 Message-Id: <20221111103337.307408-26-ktraynor@redhat.com> In-Reply-To: <20221111103337.307408-1-ktraynor@redhat.com> References: <20221111103337.307408-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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.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/4b23fc4005294403a031f6d44640bf264004e5ed Thanks. Kevin --- >From 4b23fc4005294403a031f6d44640bf264004e5ed Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Tue, 11 Oct 2022 10:44:21 +0100 Subject: [PATCH] net/iavf: fix IPsec flow create error check [ upstream commit dd4c04ff61d38657b8e9cbfcc6fbd6a8267383a6 ] Fix an error check where the return code was assigned to a unsigned integer which can hide negative error codes. Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto") Signed-off-by: Radu Nicolau Acked-by: Qi Zhang --- drivers/net/iavf/iavf_ipsec_crypto.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c index 1d465b4419..5537c35ac1 100644 --- a/drivers/net/iavf/iavf_ipsec_crypto.c +++ b/drivers/net/iavf/iavf_ipsec_crypto.c @@ -1864,4 +1864,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, { struct iavf_ipsec_flow_item *ipsec_flow = meta; + int flow_id = -1; if (!ipsec_flow) { rte_flow_error_set(error, EINVAL, @@ -1872,6 +1873,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, if (ipsec_flow->is_ipv4) { - ipsec_flow->id = - iavf_ipsec_crypto_inbound_security_policy_add(ad, + flow_id = iavf_ipsec_crypto_inbound_security_policy_add(ad, ipsec_flow->spi, 1, @@ -1882,6 +1882,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, ipsec_flow->udp_hdr.dst_port); } else { - ipsec_flow->id = - iavf_ipsec_crypto_inbound_security_policy_add(ad, + flow_id = iavf_ipsec_crypto_inbound_security_policy_add(ad, ipsec_flow->spi, 0, @@ -1893,5 +1892,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, } - if (ipsec_flow->id < 1) { + if (flow_id < 1) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, @@ -1900,4 +1899,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, } + ipsec_flow->id = flow_id; flow->rule = ipsec_flow; -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 10:32:17.706923035 +0000 +++ 0026-net-iavf-fix-IPsec-flow-create-error-check.patch 2022-11-11 10:32:17.080300793 +0000 @@ -1 +1 @@ -From dd4c04ff61d38657b8e9cbfcc6fbd6a8267383a6 Mon Sep 17 00:00:00 2001 +From 4b23fc4005294403a031f6d44640bf264004e5ed Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit dd4c04ff61d38657b8e9cbfcc6fbd6a8267383a6 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index afd7f8f467..b50149c0ce 100644 +index 1d465b4419..5537c35ac1 100644 @@ -22 +23 @@ -@@ -1852,4 +1852,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, +@@ -1864,4 +1864,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, @@ -28 +29 @@ -@@ -1860,6 +1861,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, +@@ -1872,6 +1873,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, @@ -36 +37 @@ -@@ -1870,6 +1870,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, +@@ -1882,6 +1882,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, @@ -44 +45 @@ -@@ -1881,5 +1880,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, +@@ -1893,5 +1892,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, @@ -51 +52 @@ -@@ -1888,4 +1887,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad, +@@ -1900,4 +1899,5 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad,