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 84D93A0A0E for ; Mon, 10 May 2021 18:21:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FBD641109; Mon, 10 May 2021 18:21:18 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2047.outbound.protection.outlook.com [40.107.93.47]) by mails.dpdk.org (Postfix) with ESMTP id 4EAAD40F35 for ; Mon, 10 May 2021 18:21:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aJxPhJE8TMKXoA4QGJJIhmZk49i/9DSG1FeSuqhVZgxbbrC6MhqoSrOv8eSX7gemYIiIYKBnZWXxEWobDsPhsVCoTwI9WbnTXeIZEGY3j/IjwGcuJ0CCUcWAogmX7qeKtc7lmUB3MGERkBTyQS5Yo+3zIHubdwuxG1E/XBajlJ8NCuq15ub7JT8UyfxaLdWHICyIJ1FMZTxf04OFI+OI0XA8wOnpnAqex6lyvRrAq8R0VCWXlG6ZlKFBP/1hetHGFezrokoQ7+BNebmUfdtIAdlOg6tF3c2nOpYvZ53mIDoZaj3eVc8vfgpHmsdbO5vrITpqXM8Wc1vlIuT5ZuRF9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QAW8gHeckPItiEF+nue3IbOSlktaMnKckmh/K0JytZA=; b=OZEcXEWAfeDWphb+c9nmpXDbOZhWbOFeu7in5lBerUk/S0WQEW0HJjPTC8hZtfF7AD3TdpzIuMtrz2kEW3n6TB/zBK9dotB0NSmGyYNH8dNGWrMoh21hmWF2EyymTpwcQVCccrMQNN3sWud9Q04kFQqIYju28eKe3VJnmUSqDnduXQ3G0LOQrXJcrmkQY+Qyb9zicmso0k218LHG/HRj8lhaFj+OzOYhZmq0E1bzJYtZXsBPZl/P5R5MDq5/8Sdr3nqDnRHa/B0kOTxiI37jOfOhK8xn8VzUeyShatdhSB5bS9VzcX4LCQFMHYIdqrVto2j7YnxNOeYK/8Uo62dLtA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=marvell.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QAW8gHeckPItiEF+nue3IbOSlktaMnKckmh/K0JytZA=; b=R8Z2TQMetPoRvVscwDbEArCq2t6ubIbigM7HTMlg9LXWE4fQ7ywK9Mo77s6OFXfBgV4qtenm020toNnhK2Za5Ih4RZukqZbB4/8VBuQ3h2lMoZBRdEaA7vg9UJUCHDPhuL5NxczHEYv7nMJ40h43VVzr0mFbSAG3yNWH6P0+0bSMEPr72OTgqYrWc4oI/Z4woP/gbSt8LxU8DjAf2QwMWJtJTT8bbnZzlY6+Rn26lFjID6Av0kNZXqNUQMiCHDjEyYKeF9imcZ90FiMO+PJfPo8kxz1l3T4pKpf/AygB/FIBAIPrRi+dmwxlp2BSOsuwxWjq5CYeX4bVOhR0nB7Dvg== Received: from BN9PR03CA0141.namprd03.prod.outlook.com (2603:10b6:408:fe::26) by CH2PR12MB5548.namprd12.prod.outlook.com (2603:10b6:610:6d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.31; Mon, 10 May 2021 16:21:16 +0000 Received: from BN8NAM11FT059.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fe:cafe::96) by BN9PR03CA0141.outlook.office365.com (2603:10b6:408:fe::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:21:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT059.mail.protection.outlook.com (10.13.177.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:21:15 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:20:24 +0000 From: Xueming Li To: Rohit Raj CC: Luca Boccassi , Akhil Goyal , "dpdk stable" Date: Tue, 11 May 2021 00:02:03 +0800 Message-ID: <20210510160258.30982-174-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7abad27a-ea56-45c1-3d04-08d913cfa2e5 X-MS-TrafficTypeDiagnostic: CH2PR12MB5548: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IsKzXAG9T+5enyLG11sZ6a4jdQxl/BxRV42PYS8hnTCYSlvtwCXVjS1SqV9ISlhJlQzFUBZJM2vyuQkOlAbQGJOElAl8Zk9s94Dt1zW6gtOr3x7utFCx+/muEjgmozFZVKE6dtHmKJ7vGL12k05gmolDOkHYVbALzYzyLLLMoFxyFyL8eHlw3NZ+oQwspkLC498I7oxHT56uqX+tnfl0GyI7uVX35N5PERp5D7n8zk+N8sl1mlG3ouuSBbUdbw57B6mf+sgCMxOTwcu0d3WZoDR3iLjYY9y1oaO056WzBK+sIiU69D15YEBN/i/7Pm8Iw2YpKy7Up3FZXYKnTkbmGf665haUUF2Wb6D1DYSqhaQc4KTaBcCNqtVJyIJRkE14UYAnULgXc4ym/SpW8gYAGLWBUye2ZnUPJa4j7I8Yz32NCWPRaGZxrKlk6Hjk4vzBoq2m91T5UH82Gn6sWLFYenPIRYGPm85gcZeUaucasVhQWJqihfGX1m8fjtDKWoX04ArUHyyIzSNfWwzjgP0fuBxXcsj7uQFP4Wcw+RHSczpmGtyOLwWd5u8lRnRh8FSEVizsXGKQPiDB2Ju7NB7aJDWKwhbfBP6edOVcXn9DaxD6KE60srIKiWaTKdzl315u11HwYJbQXrbv226atJTo+JuFSWBHdXgtx35xkHCFntKhSH870zh8oN6gi/QtyGSsG9tNCe0j2H9sr2+Kd86oPkcPb2mKSN97a9NLcIsmriDhDCfgzbtFxbSRD41XbOqRUE3nY9hLKF0EQyKlqL/mEw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(39860400002)(396003)(136003)(346002)(46966006)(36840700001)(478600001)(8936002)(8676002)(82310400003)(6286002)(26005)(336012)(47076005)(83380400001)(55016002)(70206006)(36906005)(53546011)(36756003)(7696005)(86362001)(1076003)(70586007)(186003)(4326008)(316002)(36860700001)(2616005)(6916009)(426003)(7636003)(6666004)(82740400003)(356005)(2906002)(16526019)(54906003)(5660300002)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:21:15.9977 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7abad27a-ea56-45c1-3d04-08d913cfa2e5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT059.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5548 Subject: [dpdk-stable] patch 'examples/l2fwd-crypto: fix packet length while decryption' has been queued to stable release 20.11.2 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 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/ce88f40d2cef248653987021a49e156fd3ca7d57 Thanks. Xueming Li --- >From ce88f40d2cef248653987021a49e156fd3ca7d57 Mon Sep 17 00:00:00 2001 From: Rohit Raj Date: Fri, 9 Apr 2021 18:44:59 +0530 Subject: [PATCH] examples/l2fwd-crypto: fix packet length while decryption Cc: Luca Boccassi [ upstream commit 62c0b4484c455e9ba03d04dcf8403fef17e7d22d ] There were some padding left when a packet gets decrypted. This patch removes those padding. This patch also removes the padding left after verifying auth of the packet. Fixes: e2cdfbd07c8a ("examples/l2fwd-crypto: fix port id type") Signed-off-by: Rohit Raj Acked-by: Akhil Goyal --- examples/l2fwd-crypto/main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 12bd1812f5..656b140368 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -616,12 +616,26 @@ l2fwd_simple_forward(struct rte_mbuf *m, uint16_t portid, struct l2fwd_crypto_options *options) { uint16_t dst_port; + uint32_t pad_len; + struct rte_ipv4_hdr *ip_hdr; + uint32_t ipdata_offset = sizeof(struct rte_ether_hdr); + ip_hdr = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(m, char *) + + ipdata_offset); dst_port = l2fwd_dst_ports[portid]; if (options->mac_updating) l2fwd_mac_updating(m, dst_port); + if (options->auth_xform.auth.op == RTE_CRYPTO_AUTH_OP_VERIFY) + rte_pktmbuf_trim(m, options->auth_xform.auth.digest_length); + + if (options->cipher_xform.cipher.op == RTE_CRYPTO_CIPHER_OP_DECRYPT) { + pad_len = m->pkt_len - rte_be_to_cpu_16(ip_hdr->total_length) - + ipdata_offset; + rte_pktmbuf_trim(m, pad_len); + } + l2fwd_send_packet(m, dst_port); } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:31.093932100 +0800 +++ 0175-examples-l2fwd-crypto-fix-packet-length-while-decryp.patch 2021-05-10 23:59:26.610000000 +0800 @@ -1 +1 @@ -From 62c0b4484c455e9ba03d04dcf8403fef17e7d22d Mon Sep 17 00:00:00 2001 +From ce88f40d2cef248653987021a49e156fd3ca7d57 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 62c0b4484c455e9ba03d04dcf8403fef17e7d22d ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 1016ceb841..23a398043e 100644 +index 12bd1812f5..656b140368 100644