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 A0F62A0524 for ; Thu, 4 Feb 2021 12:37:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8858B24075A; Thu, 4 Feb 2021 12:37:23 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 6D5AA24075A for ; Thu, 4 Feb 2021 12:37:22 +0100 (CET) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7cws-0005fH-6I; Thu, 04 Feb 2021 11:37:22 +0000 From: Christian Ehrhardt To: Gagandeep Singh Cc: Akhil Goyal , dpdk stable Date: Thu, 4 Feb 2021 12:29:11 +0100 Message-Id: <20210204112954.2488123-96-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> References: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test/ipsec: fix result code for not supported' has been queued to stable release 19.11.7 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/3b08e23c300e4168ddbb581c759eb755c62501e8 Thanks. Christian Ehrhardt --- >From 3b08e23c300e4168ddbb581c759eb755c62501e8 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Mon, 25 Jan 2021 16:15:33 +0800 Subject: [PATCH] test/ipsec: fix result code for not supported [ upstream commit 8dda080a0938e527c95ace0f3203a239edec48f5 ] During SA creation, if the required algorithm is not supported, drivers can return ENOTSUP. But in most of the IPsec test cases, if the SA creation does not success, it just returns TEST_FAILED. This patch fixes this issue by returning the actual return values from the driver to the application, so that it can make decisions whether the test case is passed, failed or unsupported. Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test") Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- app/test/test_ipsec.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index 79d00d7e02..6a4bd12f7f 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -743,7 +743,7 @@ create_sa(enum rte_security_session_action_type action_type, ut->ss[j].type = action_type; rc = create_session(ut, &ts->qp_conf, ts->valid_dev, j); if (rc != 0) - return TEST_FAILED; + return rc; rc = rte_ipsec_sa_init(ut->ss[j].sa, &ut->sa_prm, sz); rc = (rc > 0 && (uint32_t)rc <= sz) ? 0 : -EINVAL; @@ -1246,7 +1246,7 @@ test_ipsec_crypto_inb_burst_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate test mbuf data */ @@ -1348,7 +1348,7 @@ test_ipsec_crypto_outb_burst_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate input mbuf data */ @@ -1457,7 +1457,7 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate inbound mbuf data */ @@ -1535,7 +1535,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate inbound mbuf data */ @@ -1643,7 +1643,7 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate test mbuf data */ @@ -1721,7 +1721,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate test mbuf data */ @@ -1797,7 +1797,7 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate test mbuf data */ @@ -1910,7 +1910,7 @@ test_ipsec_replay_inb_inside_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate inbound mbuf data */ @@ -2003,7 +2003,7 @@ test_ipsec_replay_inb_outside_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate test mbuf data */ @@ -2103,7 +2103,7 @@ test_ipsec_replay_inb_repeat_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate test mbuf data */ @@ -2204,7 +2204,7 @@ test_ipsec_replay_inb_inside_burst_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* Generate inbound mbuf data */ @@ -2337,7 +2337,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa 0 failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* create second rte_ipsec_sa */ @@ -2347,7 +2347,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i) if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa 1 failed, cfg %d\n", i); destroy_sa(0); - return TEST_FAILED; + return rc; } /* Generate test mbuf data */ @@ -2423,7 +2423,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i) test_cfg[i].replay_win_sz, test_cfg[i].flags, 0); if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa 0 failed, cfg %d\n", i); - return TEST_FAILED; + return rc; } /* create second rte_ipsec_sa */ @@ -2433,7 +2433,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i) if (rc != 0) { RTE_LOG(ERR, USER1, "create_sa 1 failed, cfg %d\n", i); destroy_sa(0); - return TEST_FAILED; + return rc; } /* Generate test mbuf data */ -- 2.30.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-04 12:04:31.987764091 +0100 +++ 0096-test-ipsec-fix-result-code-for-not-supported.patch 2021-02-04 12:04:28.102789798 +0100 @@ -1 +1 @@ -From 8dda080a0938e527c95ace0f3203a239edec48f5 Mon Sep 17 00:00:00 2001 +From 3b08e23c300e4168ddbb581c759eb755c62501e8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8dda080a0938e527c95ace0f3203a239edec48f5 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 9ad07a1790..d18220a885 100644 +index 79d00d7e02..6a4bd12f7f 100644 @@ -28 +29 @@ -@@ -744,7 +744,7 @@ create_sa(enum rte_security_session_action_type action_type, +@@ -743,7 +743,7 @@ create_sa(enum rte_security_session_action_type action_type, @@ -37 +38 @@ -@@ -1247,7 +1247,7 @@ test_ipsec_crypto_inb_burst_null_null(int i) +@@ -1246,7 +1246,7 @@ test_ipsec_crypto_inb_burst_null_null(int i) @@ -46 +47 @@ -@@ -1349,7 +1349,7 @@ test_ipsec_crypto_outb_burst_null_null(int i) +@@ -1348,7 +1348,7 @@ test_ipsec_crypto_outb_burst_null_null(int i) @@ -55 +56 @@ -@@ -1458,7 +1458,7 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) +@@ -1457,7 +1457,7 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) @@ -64 +65 @@ -@@ -1536,7 +1536,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) +@@ -1535,7 +1535,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) @@ -73 +74 @@ -@@ -1644,7 +1644,7 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) +@@ -1643,7 +1643,7 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) @@ -82 +83 @@ -@@ -1722,7 +1722,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) +@@ -1721,7 +1721,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) @@ -91 +92 @@ -@@ -1798,7 +1798,7 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i) +@@ -1797,7 +1797,7 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i) @@ -100 +101 @@ -@@ -1911,7 +1911,7 @@ test_ipsec_replay_inb_inside_null_null(int i) +@@ -1910,7 +1910,7 @@ test_ipsec_replay_inb_inside_null_null(int i) @@ -109 +110 @@ -@@ -2004,7 +2004,7 @@ test_ipsec_replay_inb_outside_null_null(int i) +@@ -2003,7 +2003,7 @@ test_ipsec_replay_inb_outside_null_null(int i) @@ -118 +119 @@ -@@ -2104,7 +2104,7 @@ test_ipsec_replay_inb_repeat_null_null(int i) +@@ -2103,7 +2103,7 @@ test_ipsec_replay_inb_repeat_null_null(int i) @@ -127 +128 @@ -@@ -2205,7 +2205,7 @@ test_ipsec_replay_inb_inside_burst_null_null(int i) +@@ -2204,7 +2204,7 @@ test_ipsec_replay_inb_inside_burst_null_null(int i) @@ -136 +137 @@ -@@ -2338,7 +2338,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i) +@@ -2337,7 +2337,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i) @@ -145 +146 @@ -@@ -2348,7 +2348,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i) +@@ -2347,7 +2347,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i) @@ -154 +155 @@ -@@ -2424,7 +2424,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i) +@@ -2423,7 +2423,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i) @@ -163 +164 @@ -@@ -2434,7 +2434,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i) +@@ -2433,7 +2433,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)