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 DF2F642C91; Mon, 12 Jun 2023 04:24:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE8F642D0C; Mon, 12 Jun 2023 04:24:48 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2134.outbound.protection.outlook.com [40.107.244.134]) by mails.dpdk.org (Postfix) with ESMTP id 87B9142C76; Mon, 12 Jun 2023 04:24:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tx/k20M1LYUEykyT427U6t3TJYsUmkLvFEn+YQqoBd1SWl/ELMwHI0+GxyV+3p+G+w++RQZ+5cC4TqqfnCzHCGeGJmNvaTW9iWyePRDvZN560eofBqq7N41naf2+y2pwZlWimrlBfItuSi5ct8JW8oNZs7BzwjyA+RrndWGnAHSHw571EywOWTv7A7Iel63PQcQb0MMQxG0iV+B/5R35CCMLh2fknu6lPLrKbsVtd3acJIbbNld1g2oie2p5nopVq83q8hvGN8xrX5CZybPiilBwr/xi1iJNAmBYY/deMQRtH70Puu/wdju8IKTcFxrM2+liRbpr/rwQteXLOsmZBQ== 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=iuHfkRyoH4i+BQ/vfn+eoo4nSDLcZ+6j21iAf4ShRYE=; b=YbbQx061n3MV1DXMpwKKmBJ4SB0F5z1hy6MGZ7PDjSMTgf277Z5gbbNX2CqqvThonU2wtslx6nvrZHmDRcB5WMlS3sn7BK6xWrWoZtZ/yLB1v454xd9sLGw/I403Hy1PPPOZARqbLSFzRs8qUnj4ax/L9szEuA1k4DeeRFRSd/0l1nHPaX46bUivIb88YLjVBYYCIlFMyjFif6DgH9Y02GIDBRkz4LKxb4CzvmShr6fFlpEItK81SHDbcRHtj3sF7kfHm4St7Ev0YD9tHCm/MMwYyjjPxVC0f4RZcXOKptp2biscktsiHRXfW93XdKIA0tpjaTmD7iS5Rx6doC/zUQ== 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=iuHfkRyoH4i+BQ/vfn+eoo4nSDLcZ+6j21iAf4ShRYE=; b=cwKOpynfgz0fzJV0tt8oB3oTELH8X84hOCq8kH2Pxbv/qpTJdMdPsIRgvXWJcB54oUkbxTmH3ac2Ks9WbT5VPEoNk/8v9Nq0OsskBw6ShDLXRyKJaF9KH9dDHLq/edunsGPy4TbfE1f17nXsLwR6CbyD7LdSryQZMorhZop0EQY= 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 MW3PR13MB4010.namprd13.prod.outlook.com (2603:10b6:303:54::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Mon, 12 Jun 2023 02:24:43 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::d2cb:a650:e1ce:2174]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::d2cb:a650:e1ce:2174%3]) with mapi id 15.20.6455.045; Mon, 12 Jun 2023 02:24:43 +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] net/nfp: fix set IPv6 flow action can't get right address Date: Mon, 12 Jun 2023 10:24:24 +0800 Message-Id: <20230612022424.1831291-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230609061919.1307911-1-chaoyong.he@corigine.com> References: <20230609061919.1307911-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BY3PR03CA0024.namprd03.prod.outlook.com (2603:10b6:a03:39a::29) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MW3PR13MB4010:EE_ X-MS-Office365-Filtering-Correlation-Id: c44223e1-f86f-48ab-3d86-08db6aec2e80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9DsPvQXrAp0Q2lIDFiFfqSSy1vIUywsYWyLpQKGcuTSHE7lBhVFKQnALXBirXKdSNP+R3bd1wnyYa+es9pOPmpHQy+7y77GvMZV24ty0grg83cGHqCru0+uUOQhIj1lKQB5EYGJm0qp+d5qu6yuWyB7BUKk1wXV6mjsrR4gGOaaLOt8E3zTgvqoRZZPLSmF30+m4XhBnXD7RKtvcv+0mukOlfiGHjcBm6BI2Z5LsUy6m4x9j1bfpyIzY1Kt68drR2SBG9NcK/YBn7D5CETf8gZt3prZxwSxGzsl+3O0nU7cwp2SpG9jYJYQ1wq8liKnQ8BzeKlznP/n8Y9+JT0BLCt0xYAt+rOIDl8ooAZc4aH0nBTqFn2tMAXmAYL5cyQaZXCAtly58Y+PgH8MHiSRUbxBy9I8jWFbZhUciC04w5+niKlKILPnoD7o/wUqnussRY2c91KqZwm8KX0LYyeFuuZDgaH6BeSFFYJKleOI1HvdcEt8x5I2QQEOndHK7y5KTPoxrjBjoxbSI5Xk2sDkEuLqsua9ab0l2eD03VZgDXm4YOTUPC1KyCuDe5N65yB1ca4d/grUu7ESsVjhwMpwvAc5zpriAA69X493LFVbWjcCy3y2SbCwnabF9m5rlzDnk 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:(13230028)(4636009)(376002)(136003)(346002)(366004)(39830400003)(396003)(451199021)(5660300002)(4326008)(66946007)(66556008)(6916009)(8936002)(8676002)(44832011)(41300700001)(316002)(186003)(2906002)(478600001)(450100002)(66476007)(6666004)(52116002)(6486002)(1076003)(6506007)(6512007)(26005)(83380400001)(66574015)(36756003)(86362001)(2616005)(38100700002)(38350700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YmZ0RG9KVGM1Uk8ydjk5UThaUENCVGkwSjBRSlVkZWE1OVNlNC9GY0RWbkho?= =?utf-8?B?Q1VGdUY3QTV2TEpZcGhaVGROQWpyVEF2clJGWkpmZExlMXdTSTdlNkV5QXVO?= =?utf-8?B?bjFrOGRTREFmSWpTWkZHSXdUcmRMcE5wVlpyV3JGT3h1TDg5enE0K0QzYzhs?= =?utf-8?B?UHhzZXFVMDhSdG9vcHd2TEJQb3paR2cxV3V3MEpydUdvTUJQK3prZ1ZGTUc4?= =?utf-8?B?cnJQN0hqeW9iU245L3E4SHJKbVFtMm9aeldhUTBhODFjcW51Mi83TzNNcGZK?= =?utf-8?B?N3NJeTEzek9WeFdYRXBvWWM1U1FRdkhtVEdKSnRoL3JWVTdvZk54R2JDR2R2?= =?utf-8?B?RjJKT0pWSm9XOFFFK29QNCtHbEVIWFozMVRQVHhheHY3QTdzNFFMSzRTbGI5?= =?utf-8?B?ZmFiMGNsN2tsc3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f86f-48ab-3d86-08db6aec2e80 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2023 02:24:43.3178 (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: XLsKy1iwTR9KnI6dyzPZhWEF1OlIyMo3bWtyRnKf1nUQGgF7b93CNwNSiBDs8T2oH4MFa7WQdeRIT38Hevg5qEWOm8m4s4jz5rfFetqnVTs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR13MB4010 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The former logic of set IPv6 source/destination address flow action can't get the right IPV6 address, a 32 bit big endian value is expected while a 8 bit value is provided. This caused the offloaded packets don't have the right IPv6 address as expected. Fixes: 596ae2217214 ("net/nfp: support IPv6 source flow action") Fixes: 51384f79b264 ("net/nfp: support IPv6 destination flow action") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- v2: * Solve the compile warning about 'strict-aliasing'. --- drivers/net/nfp/nfp_flow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 14749f03a2..4ba49a9b49 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -2164,6 +2164,7 @@ nfp_flow_action_set_ipv6(char *act_data, bool ip_src_flag) { int i; + rte_be32_t tmp; size_t act_size; struct nfp_fl_act_set_ipv6_addr *set_ip; const struct rte_flow_action_set_ipv6 *set_ipv6; @@ -2181,7 +2182,8 @@ nfp_flow_action_set_ipv6(char *act_data, set_ip->reserved = 0; for (i = 0; i < 4; i++) { - set_ip->ipv6[i].exact = set_ipv6->ipv6_addr[i * 4]; + rte_memcpy(&tmp, &set_ipv6->ipv6_addr[i * 4], 4); + set_ip->ipv6[i].exact = tmp; set_ip->ipv6[i].mask = RTE_BE32(0xffffffff); } } -- 2.39.1