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 66A1D41CFC for ; Tue, 21 Feb 2023 11:35:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B5FC431C2; Tue, 21 Feb 2023 11:35:39 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2093.outbound.protection.outlook.com [40.107.95.93]) by mails.dpdk.org (Postfix) with ESMTP id A75E0431BF; Tue, 21 Feb 2023 11:35:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VgRcAhx/vXSTZcqr/8KKvyievnqeUzBCyK2ZRy7Go+oNw3aOr2sNuMvGx4iKAKZ6BbyrM3owgr4jB8z30Vq5DwQSPqI5rhErIDNAprPgfIUjvwBBENaXNbWRrSELevhJXYtDl2k0RuZODSt5C95jx7/K3kHBLwi4DSstHntxFV5G/2jh/d6xK62s5HDKFqyxNL7praD899Dn5EZojHyfFzQUITvJcKRMyQZKCb2ScUMSsyAm5TtCZa/qzdmDJVroSJlD4U2xDC6yIGthJw0nDb91An9vvmbzUj/IawvjTCHM7+X3Z7ZWfAmsjffiWCN0iiMeBev6xU6J6uiz/MjNfg== 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=wspGSCkYs5t536mMdZWzrpuZxnz0X1pOXyGsHWpIElU=; b=ZZdQGPYE7lqiz9d7Jp7p9p822JSvTdJTm6WUBl17vLbCHaQuMx3b85fmznpKnlULeTbnazyyq9eXLlXlw/8tPG1lDPPIMdrlKczBQc325Lc+kjc5llzphmXB1io2HksDNatJcBC6JJUV0slkV3Hg6Yfu/s0OuglLDeiWWhXfNwrXbn1B0ynsWYo2dvdyl/gnPcBgNZgLDF4MaooWb3yjp/epZLgUVMI7wibrBBjgXf4qWlJBvte0xgzTuWTLrihRXAfNGTci8HfINKmRwXkcxNRZy0nUZhCkpL6gpeOhbeVParJjM8OVr/PI5YPSCjBFEfLBVEe+MUlabhTZMdFypQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wspGSCkYs5t536mMdZWzrpuZxnz0X1pOXyGsHWpIElU=; b=ZWcaL7B5BQ/vjrkjrA0ElBWvPzg+I6CUpYKGBfMPvty8fjWtBCaDmcyF2sF7avveyK2H4BdIawJwHS9rdZ19yj47uk4ZBdv/bZ8CEASc/YrcDT8N0Pt65UpPx6ujcIsUGsqS5sGuizMZArlMbPhG56AwJ0YOE2SvyKpv78oBiz8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH0PR13MB5616.namprd13.prod.outlook.com (2603:10b6:510:12b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.21; Tue, 21 Feb 2023 10:35:35 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d%7]) with mapi id 15.20.6111.021; Tue, 21 Feb 2023 10:35:35 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He , stable@dpdk.org Subject: [PATCH v2 2/6] net/nfp: fix the set IPv4 flow action Date: Tue, 21 Feb 2023 18:35:09 +0800 Message-Id: <20230221103513.412-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20230221103513.412-1-chaoyong.he@corigine.com> References: <20230221064930.3399-1-chaoyong.he@corigine.com> <20230221103513.412-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2P153CA0038.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::7) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH0PR13MB5616:EE_ X-MS-Office365-Filtering-Correlation-Id: 19bbeea5-3555-43a5-73c4-08db13f75d53 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sbY1yBokdEvOUa8te0zSIYM8waMBTaAAaJnAr8+b+5KNDz2RjsC7lFF6CgIIbAONqu+PB0Ed75VytcbQv6+mNM07ImgKv4LvTgabLUrrVk0Zp/G7U6c54+HXJqzmx1neQILbMO8vWS89GF9kZA50tMDHVXL0OTz1Gs2QNdAStSJLHeU3UAcekrna2oP/KqeNeGnMhGElztQjsFjlDs885v4/fX+gg8zJFlA3LLftcakXuJpfYr3qpJdnIOEszxKu047pfcSfKvl4GqzE5dq4nw7tjiuV7qXhREE+UvaQtYaluGk+YnxppeJtxzl6ubLdFIZYvQDRdxGbVjcWNuGVN4pxnKSYj3ROX7KHpP0WeZviOImretVaB7if28Awsc1dgp2aATrn88ECotX5jn3mwR9JatD2swNG5SXJZpC1PoEXZBFixXHzdmHjjSEmvvNaf/2Msw2w0+Ud7it4QszdDLQDblL2UAzzM2iFgl5bf1QGJdXrDveMlF809O7ZBDhNrdiVGRSk+FPvxqkoUiphFkZKf7tdu31Jeyg0u99Qx82Rah4g5Nj5T9MHH5GICqEB1R6DJQaVp/2n07nAlkWrxj54G68SHWRCPmY/LR6uQIGzTQqiF1mMm6GjRSgBa+T686kE+a1Tqql9ATCfB+fjbeU5mDYmiv9uJAcGKZC3WlWjfso+TL42TDSjBjO4RvDBKESevgM/97DeV3fGJUfiDQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(376002)(396003)(346002)(366004)(39840400004)(136003)(451199018)(83380400001)(450100002)(66476007)(66556008)(26005)(8676002)(66946007)(478600001)(316002)(4326008)(6916009)(6506007)(6666004)(6512007)(186003)(1076003)(36756003)(38100700002)(38350700002)(86362001)(6486002)(2906002)(41300700001)(8936002)(44832011)(5660300002)(52116002)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aFZLcktvaTg1TFNwVWtKZGJrZTgwblAyWUVkOFp4eldmRGJQRkJiT2NHbEIr?= =?utf-8?B?bCtRdFBMZ1BWVFdoc0tTS3RoR2pCWks0dmsyaSt6elBRM29rUm83QUdMM0Vt?= =?utf-8?B?RUEzQ3Yvd0pHTEdyU2QvRUpTdVl5elYrVDRBMDJKWVhmakF3MTFDY2RzQi81?= =?utf-8?B?endCU0FMQk93RDg0RytWK3V6amVKNEtxZ1VvTmpTMWFUUVY2SkxraHZEQXlI?= =?utf-8?B?UWZxak5YeG51TXJWcVJNMVp5MGlRWFVlamMxQy9zYkwydHI4K0M2UWVMOVV0?= =?utf-8?B?RzFOS285eVlPU3d3NUVqTlF3bGFKamhYWnZUUzFsaVpFekMyQ0pUMEVBRW9q?= =?utf-8?B?QzZ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OUlNRLzhMa2paSTllT0dKaGRv?= =?utf-8?B?bnc9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19bbeea5-3555-43a5-73c4-08db13f75d53 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2023 10:35:35.0718 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KU9lfInodlAKAcp+oVmDgHigXXu5OoVMLACNtla1M0UMA7LGgVwdy9Q3GFUezCL5egyZxTsZnM9ONpq84gzBIxPkvtzXbFdjxwRnlE5mgX0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR13MB5616 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 The former logic of set IPv4 source/destination address flow action don't consider the mask filed of control message passed to the firmware. This caused the firmware skip the set action logic, and the offloaded packets don't have the right IPv4 address as expected. Fixes: ab80975b0a14 ("net/nfp: support IPv4 source flow action") Fixes: f85c1e05bff3 ("net/nfp: support IPv4 destination flow action") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/nfp_flow.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index f373171d7e..39493ce98d 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -2132,10 +2132,13 @@ nfp_flow_action_set_ip(char *act_data, set_ip->reserved = 0; set_ipv4 = (const struct rte_flow_action_set_ipv4 *)action->conf; - if (ip_src_flag) + if (ip_src_flag) { set_ip->ipv4_src = set_ipv4->ipv4_addr; - else + set_ip->ipv4_src_mask = RTE_BE32(0xffffffff); + } else { set_ip->ipv4_dst = set_ipv4->ipv4_addr; + set_ip->ipv4_dst_mask = RTE_BE32(0xffffffff); + } } static void -- 2.29.3