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 4CA26A0A0E for ; Mon, 10 May 2021 18:11:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F36F40F35; Mon, 10 May 2021 18:11:26 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2061.outbound.protection.outlook.com [40.107.92.61]) by mails.dpdk.org (Postfix) with ESMTP id A18E640F35 for ; Mon, 10 May 2021 18:11:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GqJqd1Mv19zwOaEYx4nI+nRcAwTZACt5ihUCuGAuGWHSyuuRDH33itz9a1LZxN+XSjJNVPD1J1HHzkRoyeSw/gShE2fXbFV1rROwxmjJG6mu/TVgBPg+JkqC/MzqYMQloHNbre55zCFj/gC+x27UAyTv/z9SKIH+/GLL3JCaNsT0XBBu225S9m0ntjv8NUc/06z6kaLrvnGzxYhtIH76djaueQpXLrUugT2uuiulsfxboVh5ifN1a9mCNZQ8N3K0Wqprvs7RbLlKM2OTGFFGrCgJT3ErzlVRezyW8mtwY1vhmxSBYZpElWnbc3wkrrR891qTw92JIwOb0j1UvdvBaw== 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=zEl5hYhr7d+BmoIhU3Vn8Oy1eTyXFvzf1VLO4dSqzCM=; b=LJ5g+JpnvYjr+rydrQ1hHWn7z9t6hU0al3KP7Ss8kW3cjx0Vfr3Da8sXwvu93EuhdBaln2LAbn80zJGgNj2Kv/1vHSvlO2DSsgXA//Gvuj0foLeFhEZJoE0lN/FmOrKK6nCawqrAbBQ/xVDinOlFAOFMJL+yl6WSGAhtI7+iheI5dMWKZLC8H03cot5bzT0YT8H6w1VA3NpUxYOR9rP6QLh0LMAnhtA/yjeVozdW/Xy+QJULRKbdGeqv4C/JqtcFh4DTTlmro0c1/ZPM6cEkwAmCaXsyCF7CfY+zHw+KyUcWdzHw2KrmF3RVyEv5NeJ6wPBvKdkdEe95vnIjLj7JhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org 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=zEl5hYhr7d+BmoIhU3Vn8Oy1eTyXFvzf1VLO4dSqzCM=; b=LmH4asLj6wN8sZqJ497UMmhMlkVW7yKdD0mJjBYzWtBVC2Qnxjuh9Dd3WsJML0xcYYB6shWyOkM4CjdJFM3DAKxsBOjHsjHlVXzZrMaalzHCPu07Sov5zRr/G9jfsdfFElxk8z4BqaIGykOQ9t62OPik3WixR5jvyDlcQxpQZ2D4nbxFgyY4+Hk7ETpo0uRbxpZoAnSyxrrtI3ZuUq6HJltWz6Lg26kT0U0TRLXsFjyXSfWbEk0yUOySPBTqrH/MCgMlT70gm7dK6f3aOcF9enCfEhk4sXqeWJL7ozl2N9Yu/qn51Xwnk673MxwxdHRdg6SUi6iEu4W0y3DENcNsiw== Received: from MW4PR03CA0047.namprd03.prod.outlook.com (2603:10b6:303:8e::22) by BN6PR1201MB2497.namprd12.prod.outlook.com (2603:10b6:404:b3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:11:23 +0000 Received: from CO1NAM11FT059.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8e:cafe::ae) by MW4PR03CA0047.outlook.office365.com (2603:10b6:303:8e::22) 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:11:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; 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 CO1NAM11FT059.mail.protection.outlook.com (10.13.174.160) 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:11:22 +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:11:20 +0000 From: Xueming Li To: Cristian Dumitrescu CC: Luca Boccassi , dpdk stable Date: Tue, 11 May 2021 00:00:30 +0800 Message-ID: <20210510160258.30982-81-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: 5ff50d6a-296c-463e-fe6c-08d913ce4138 X-MS-TrafficTypeDiagnostic: BN6PR1201MB2497: 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: a6hHtiUNFwMtniUNKFhv96dLSor+R0UtiXEPxpb7PfCrKmqvv89/u1DTQevodxCfl6zxZ/hOGX4VFIMAETgJCgGA04FQ7T3+OH4R82hP2248Ap8UIl2aBhgtiEe97CO4dkb7eIRvmzQmaToUIoLJ1nBcwjtJfLB2MD26Bqr+TOOxH5UPk+SJPSS/fmaM54KJz/RR6QPiN1tkU7msqhAQudo3Mn4/gi5Ay28v16I8dcj4Zhdfh6e5IUEsjTwGeQHwyR7a8MZQ2X9nsns4MkGbmQeNFojLv5ze7SHVp5nmiNZSWFXgp3RsAvjMCCA71b5x9D0WHy7CCDv+ybjp8uuDF9BClhAEcyGX73J1848FaTcok09EBlIUABsCXZQQXkIdl6DiFaeFyguYx0EA5k/PSOQ6RwJNi0d370Vcgw9lQH01XfOTo15wPEMGuVKHLb5ABnhkP6vH9O96BYU6C2FE0/+zvLdgWT/eWc45JE3Nq0TUFODUMCFCpFCeHasCeOd1TuQZMYUy0zWzi8kwhX21Vg4MDJSh1vpCc1wt9oVuwbylylJCqleBnmUdPHLATcAHDFgwxcN03mDoqAB/vUcfxd6oYa3Y82z+SPIxwioOHuby81AyTBHXmpCaO69Cm2UXYOD3Jg75DoYHQrJPRGYp4AuYlZJ4V3ePxPWHyXIqbSEn8GiM2ehyeTLcQvE5f+9K7asK2ijBQXEsG8wcd9+Cc9GVZ1GwEOSPHp2KGK33nTgXLlWzqIPr874F+BV8pqaD13MG0D2Ewj/WELPI53ngbg== 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)(346002)(396003)(39860400002)(136003)(36840700001)(46966006)(55016002)(336012)(356005)(8676002)(7636003)(1076003)(6666004)(70206006)(7696005)(6916009)(86362001)(36860700001)(70586007)(8936002)(47076005)(186003)(6286002)(53546011)(966005)(478600001)(16526019)(82740400003)(2906002)(4326008)(316002)(5660300002)(2616005)(83380400001)(36906005)(426003)(26005)(82310400003)(54906003)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:11:22.6971 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ff50d6a-296c-463e-fe6c-08d913ce4138 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: CO1NAM11FT059.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB2497 Subject: [dpdk-stable] patch 'pipeline: fix instruction translation' 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/7c0c4418262554b90f8b5a8ce0ea034703f19a39 Thanks. Xueming Li --- >From 7c0c4418262554b90f8b5a8ce0ea034703f19a39 Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Wed, 24 Mar 2021 11:36:03 +0000 Subject: [PATCH] pipeline: fix instruction translation Cc: Luca Boccassi [ upstream commit d366a48f467a973c7453ef1729e97a9d46a380ef ] The SWX pipeline instructions work with operands of different types: header fields (h.header.field), packet meta-data (m.field), extern object mailbox field (e.obj.field), extern function (f.field), action data read from table entries (t.field), or immediate values; hence the HMEFTI acronym. For some pipeline instructions (add/sub, srl/shr, jmplt/jmpgt), only the H, M and I cases were handled, while the E, F and T cases were disregarded. This is what we fix here. Fixes: baf7999303d0 ("pipeline: introduce SWX add instruction") Fixes: c88c62943818 ("pipeline: introduce SWX subtract instruction") Fixes: b09ba6d0a3c2 ("pipeline: introduce SWX SHL instruction") Fixes: e0f51638b715 ("pipeline: introduce SWX SHR instruction") Fixes: b3947e25bed4 ("pipeline: introduce SWX jump and return instructions") Signed-off-by: Cristian Dumitrescu --- lib/librte_pipeline/rte_swx_pipeline.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c index eaaed7a0a9..bc619ca533 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.c +++ b/lib/librte_pipeline/rte_swx_pipeline.c @@ -3475,9 +3475,9 @@ instr_alu_add_translate(struct rte_swx_pipeline *p, fsrc = struct_field_parse(p, action, src, &src_struct_id); if (fsrc) { instr->type = INSTR_ALU_ADD; - if (dst[0] == 'h' && src[0] == 'm') + if (dst[0] == 'h' && src[0] != 'h') instr->type = INSTR_ALU_ADD_HM; - if (dst[0] == 'm' && src[0] == 'h') + if (dst[0] != 'h' && src[0] == 'h') instr->type = INSTR_ALU_ADD_MH; if (dst[0] == 'h' && src[0] == 'h') instr->type = INSTR_ALU_ADD_HH; @@ -3528,9 +3528,9 @@ instr_alu_sub_translate(struct rte_swx_pipeline *p, fsrc = struct_field_parse(p, action, src, &src_struct_id); if (fsrc) { instr->type = INSTR_ALU_SUB; - if (dst[0] == 'h' && src[0] == 'm') + if (dst[0] == 'h' && src[0] != 'h') instr->type = INSTR_ALU_SUB_HM; - if (dst[0] == 'm' && src[0] == 'h') + if (dst[0] != 'h' && src[0] == 'h') instr->type = INSTR_ALU_SUB_MH; if (dst[0] == 'h' && src[0] == 'h') instr->type = INSTR_ALU_SUB_HH; @@ -3658,9 +3658,9 @@ instr_alu_shl_translate(struct rte_swx_pipeline *p, fsrc = struct_field_parse(p, action, src, &src_struct_id); if (fsrc) { instr->type = INSTR_ALU_SHL; - if (dst[0] == 'h' && src[0] == 'm') + if (dst[0] == 'h' && src[0] != 'h') instr->type = INSTR_ALU_SHL_HM; - if (dst[0] == 'm' && src[0] == 'h') + if (dst[0] != 'h' && src[0] == 'h') instr->type = INSTR_ALU_SHL_MH; if (dst[0] == 'h' && src[0] == 'h') instr->type = INSTR_ALU_SHL_HH; @@ -3711,9 +3711,9 @@ instr_alu_shr_translate(struct rte_swx_pipeline *p, fsrc = struct_field_parse(p, action, src, &src_struct_id); if (fsrc) { instr->type = INSTR_ALU_SHR; - if (dst[0] == 'h' && src[0] == 'm') + if (dst[0] == 'h' && src[0] != 'h') instr->type = INSTR_ALU_SHR_HM; - if (dst[0] == 'm' && src[0] == 'h') + if (dst[0] != 'h' && src[0] == 'h') instr->type = INSTR_ALU_SHR_MH; if (dst[0] == 'h' && src[0] == 'h') instr->type = INSTR_ALU_SHR_HH; @@ -4906,9 +4906,9 @@ instr_jmp_lt_translate(struct rte_swx_pipeline *p, fb = struct_field_parse(p, action, b, &b_struct_id); if (fb) { instr->type = INSTR_JMP_LT; - if (a[0] == 'h' && b[0] == 'm') + if (a[0] == 'h' && b[0] != 'h') instr->type = INSTR_JMP_LT_HM; - if (a[0] == 'm' && b[0] == 'h') + if (a[0] != 'h' && b[0] == 'h') instr->type = INSTR_JMP_LT_MH; if (a[0] == 'h' && b[0] == 'h') instr->type = INSTR_JMP_LT_HH; @@ -4963,9 +4963,9 @@ instr_jmp_gt_translate(struct rte_swx_pipeline *p, fb = struct_field_parse(p, action, b, &b_struct_id); if (fb) { instr->type = INSTR_JMP_GT; - if (a[0] == 'h' && b[0] == 'm') + if (a[0] == 'h' && b[0] != 'h') instr->type = INSTR_JMP_GT_HM; - if (a[0] == 'm' && b[0] == 'h') + if (a[0] != 'h' && b[0] == 'h') instr->type = INSTR_JMP_GT_MH; if (a[0] == 'h' && b[0] == 'h') instr->type = INSTR_JMP_GT_HH; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:28.729110900 +0800 +++ 0082-pipeline-fix-instruction-translation.patch 2021-05-10 23:59:26.440000000 +0800 @@ -1 +1 @@ -From d366a48f467a973c7453ef1729e97a9d46a380ef Mon Sep 17 00:00:00 2001 +From 7c0c4418262554b90f8b5a8ce0ea034703f19a39 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit d366a48f467a973c7453ef1729e97a9d46a380ef ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org