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 95C5CA0543 for ; Tue, 21 Jun 2022 10:07:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90C7F42B6D; Tue, 21 Jun 2022 10:07:47 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2087.outbound.protection.outlook.com [40.107.101.87]) by mails.dpdk.org (Postfix) with ESMTP id 3608742905 for ; Tue, 21 Jun 2022 10:07:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GidKK+JHo3Qr7G1AVY/dgvPlnTnr/hl6LRJ8EY8B3LumLTmk4QfDCVoVJkwSf+rSF408KJTPz/7mcheGnHGM1qsQY/zVER43TSvicUzWQIw3Bmng+fgDiPxyx4coLZB+89RROk4YjUxhiasMj0Fmz9L0QwBIejTqj6lsGDgTMzBqUs3JmxGoYbHuYScy0+H5VTPCJhyJEZkUoTHmU8+BzyplgyN2XK6FG7fidKf8ErH5C9TOY1XNHW3jf0OLABgGjm16QLqSx5XdFKCb12PS0zoxB6uy+q9WAVcBWfmDGETiQB1nyLZ/fuXvGEvHzwFu/ktZYKLy82Yx/MEazH/q+Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jvCQUMbjFaoQ06lpr/xZ7/RXkwhspecJltOrbh/G85Q=; b=Jw3sE8bhnk8NZWOgUFtGzUF30ZudDqHVXRIyGog6tbajP/g7OgvvZm6aCpB53u8+slIK3mbQHVSh5DrlkmNSkjsQjfP1jkey4LVx1vRhxKxSiJ1s8MQO+bPUsUkJp0ygb8u5p5IsqE5a1LkeuqqjyKFwUtP3jzcJj4Sbwqyrom/nqkZcvnKphmrBdPmvLIp1D8szDaLYQe41Ug4wa2r9+bOQMb/P2uQ4i9FEtflDwXVeeLNTym6ywW6zchawzVcsgyZMDxgo2i+puykEHavP7RLJknrAK+lIyXMuvvmr5RrEWExx1B+RKX9BXFEyjhj0w+xBGk6zqDo//Gi+EFkMWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=jvCQUMbjFaoQ06lpr/xZ7/RXkwhspecJltOrbh/G85Q=; b=T39rb9vKPh2BFbaIONj+OpyfUplQXu5AU+heuojSqGuVDDdKbjIoFRhPMwEJYmOqSpB+4D9KWFw/Ln67eaHixchQk0fzokHmKBxH13J8/Xyfc4oRtworjHkFJKgawb24PNDL9Gg9pFzqQkRoxdWplBZxX0pBtPeqa5BNNxcqYqiYZo7UBmFbwSTVqG6nnwcyCLKIzs9COMy4fjNBl9HmbMBAXf/AKWbsbT/T0rfAKy2FetpQsu1rmngChqy8+hg+bO5UsdvnfxdZyy3UPGqRb79HaSwsuSgGVEbB2qM5C5gFGDwqmueELsovswUlSYhavZyj9SNm+sHZrJNeONBkpw== Received: from MWHPR10CA0016.namprd10.prod.outlook.com (2603:10b6:301::26) by BN8PR12MB3027.namprd12.prod.outlook.com (2603:10b6:408:64::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.17; Tue, 21 Jun 2022 08:07:44 +0000 Received: from CO1NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:301:0:cafe::3a) by MWHPR10CA0016.outlook.office365.com (2603:10b6:301::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:07:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT036.mail.protection.outlook.com (10.13.174.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:07:43 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:07:43 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:07:41 -0700 From: Xueming Li To: Stanislaw Kardach CC: David Marchand , dpdk stable Subject: patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:00 +0300 Message-ID: <20220621080301.2315720-55-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46a17e0c-e009-4704-ac55-08da535d1eb8 X-MS-TrafficTypeDiagnostic: BN8PR12MB3027:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QDmTEJbdxraiP7J7udH4pjQ9isTVUs7I8qiVXrBrBW0eeAFJ0vNcJq5Bjism5CIWoStnRkEDmKEmVAlKV2VH2HzpSrO55qepdnkzppVdLoAbRzF4etxhuCsGqtUVetCzgjXzNbuFvy5ibOBmBy9CJcbduq5c8B7dFFjWO1vvtCDHaHNyoOLsFSHlPTpFThdozF19DwE4OAN+n7C3T9MoWcvOFAOtmDfOEdRSXBQDsZ5SU3KK9zEGgNHS6odAwnzLn/Cl+XcE79MxayOhlJ5u4o60dPqxFzTJQB+I0Kb2uuVKhMnwrlsj6eeEWbcyhZZVYArLk6BNT7H7H4n08s+3Vs2UD00IrGrWs7QTCptZ1jZ/McXLs4Yt3FRW9zxM2PmtBVCx6o4WC3H0E4I9leFYbT+PORbMeeHj9fbjKaVMhmhm+cU8h9hRFMqDr7mbcxdKUJIP35AY4jJnTMVHPr/jmzTznP8P+vd6tl/6jBNK1Tjf+bG8pQ35mrukFSaVqCnmuMGrjOE85z4YBn4pPcIeTHxB01R6qYWAfqhZJ62JKw5e8qEF7C4W7VkjIB3Rpc+ypoo3hiuQxJbZvr/xQ0kKsuRrY3FgHP56fI//pSpHVOGPzeKBM4abbCp+VxFO8T/t9i3WmH4NZkIfBOwL3CzH1bWPWFDt1vfx83XTKsCgOppYi5bjSA33ojCiEqpPC+F0diceFY97VqDbtyCaJb8vjSxjjh1kO8o2RIizaRO4mtusMuj4E7H+7QRHmOZy1f+f9VZV99YvNg/0vdH5eZfBeiflyTFdzi373WzQ7sRVC9qAtr352hIjwm+UZ4EXWuYRVIdJvftGcFV2DDkt58B6ErmANRj1fYNKb8x91lWTd/8= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(396003)(346002)(39860400002)(376002)(36840700001)(40470700004)(46966006)(16526019)(336012)(426003)(47076005)(7696005)(81166007)(186003)(1076003)(82740400003)(40460700003)(83380400001)(8936002)(40480700001)(55016003)(36860700001)(82310400005)(356005)(6666004)(2906002)(53546011)(70206006)(316002)(6916009)(966005)(54906003)(6286002)(41300700001)(2616005)(26005)(86362001)(70586007)(478600001)(8676002)(5660300002)(4326008)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:07:43.7735 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46a17e0c-e009-4704-ac55-08da535d1eb8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3027 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 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/597718802f0aff211828287a5b2f04fd79a33c7f Thanks. Xueming Li --- >From 597718802f0aff211828287a5b2f04fd79a33c7f Mon Sep 17 00:00:00 2001 From: Stanislaw Kardach Date: Wed, 11 May 2022 16:56:50 +0200 Subject: [PATCH] examples/l3fwd: fix scalar LPM Cc: Xueming Li [ upstream commit a137eb2b2512c202eb01ba96bb592a24cffc72c8 ] The lpm_process_event_pkt() can either process a packet using an architecture specific (defined for X86/SSE, ARM/Neon and PPC64/Altivec) path or a scalar one. The choice is however done using an ifdef pre-processor macro. Because of that the scalar version was apparently not widely exercised/compiled. Due to some copy/paste errors, the scalar logic in lpm_process_event_pkt() retained a "continue" statement where it should utilize rfc1812_process() and return the port/BAD_PORT. Fixes: 99fc91d18082 ("examples/l3fwd: add event lpm main loop") Signed-off-by: Stanislaw Kardach Reviewed-by: David Marchand --- examples/l3fwd/l3fwd_lpm.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index 1cfaf36572..40f3366adc 100644 --- a/examples/l3fwd/l3fwd_lpm.c +++ b/examples/l3fwd/l3fwd_lpm.c @@ -28,6 +28,7 @@ #include #include "l3fwd.h" +#include "l3fwd_common.h" #include "l3fwd_event.h" struct ipv4_l3fwd_lpm_route { @@ -272,30 +273,17 @@ lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf) struct rte_ether_hdr *eth_hdr = rte_pktmbuf_mtod(mbuf, struct rte_ether_hdr *); -#ifdef DO_RFC_1812_CHECKS - struct rte_ipv4_hdr *ipv4_hdr; - if (RTE_ETH_IS_IPV4_HDR(mbuf->packet_type)) { - /* Handle IPv4 headers.*/ - ipv4_hdr = rte_pktmbuf_mtod_offset(mbuf, - struct rte_ipv4_hdr *, - sizeof(struct rte_ether_hdr)); - - if (is_valid_ipv4_pkt(ipv4_hdr, mbuf->pkt_len) - < 0) { - mbuf->port = BAD_PORT; - continue; - } - /* Update time to live and header checksum */ - --(ipv4_hdr->time_to_live); - ++(ipv4_hdr->hdr_checksum); - } -#endif + /* dst addr */ *(uint64_t *)ð_hdr->d_addr = dest_eth_addr[mbuf->port]; /* src addr */ rte_ether_addr_copy(&ports_eth_addr[mbuf->port], ð_hdr->s_addr); + + rfc1812_process(rte_pktmbuf_mtod_offset(mbuf, struct rte_ipv4_hdr *, + sizeof(struct rte_ether_hdr)), + &mbuf->port, mbuf->packet_type); #endif return mbuf->port; } -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.773151153 +0800 +++ 0054-examples-l3fwd-fix-scalar-LPM.patch 2022-06-21 15:37:49.074451382 +0800 @@ -1 +1 @@ -From a137eb2b2512c202eb01ba96bb592a24cffc72c8 Mon Sep 17 00:00:00 2001 +From 597718802f0aff211828287a5b2f04fd79a33c7f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit a137eb2b2512c202eb01ba96bb592a24cffc72c8 ] @@ -24 +27 @@ -index 501fc5db5e..d1b850dd5b 100644 +index 1cfaf36572..40f3366adc 100644 @@ -34,2 +37,2 @@ - #include "lpm_route_parse.c" -@@ -237,30 +238,17 @@ lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf) + struct ipv4_l3fwd_lpm_route { +@@ -272,30 +273,17 @@ lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf) @@ -59 +62 @@ - *(uint64_t *)ð_hdr->dst_addr = dest_eth_addr[mbuf->port]; + *(uint64_t *)ð_hdr->d_addr = dest_eth_addr[mbuf->port]; @@ -63 +66 @@ - ð_hdr->src_addr); + ð_hdr->s_addr);