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 EAEF641CF8 for ; Tue, 21 Feb 2023 07:49:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E72E54317C; Tue, 21 Feb 2023 07:49:56 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2126.outbound.protection.outlook.com [40.107.243.126]) by mails.dpdk.org (Postfix) with ESMTP id F035E43157; Tue, 21 Feb 2023 07:49:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FSrOAe2GIAvWj9K56rFXjb3q6biTN7tCkBxpOCLszqJmdt2RrP6+yk3SlNl4H3p53ON6BvtZC1CZg0My4n04mgRA5l/osgc+d3DTo0ERXaD+gEMxhaMlL9vdqinqvNSSDgeog+0NlZKxAY2Nb6b5hamsmxImCEBA7h9ripi8kDvED9fyebRi2ZNxfbBuFfseAz4vGiOOGS+dVTerLIMwjFka/H9HCity32UPbcZ+dGLtJ+R9YwoYlTz1K0OmPfMR7cIThBk1mN2ppSWNguTlwLcNgtPufQmGqG8TVOib8nLKIrrX+BBpAYf/z9aV4jFVkuQzsF63Ya/RcOifbeaetg== 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=pr3Uu3+nnFy1Bw7famyLt7Po46TSxwTd3aayVNWvKlI=; b=d8XNkGCTNTnlghYw8OTuuCy63be5xXhtGO0JIPdZhWF/3WneIoppwq+VbakUu5cRrkyzDmR+P+oa3ajBfLY+02/V/W7pkf1u5kU5vFrG1p73x9+g7iW0gRVyg5APQBIgOpzLyg/1i67yqdcX6Yc1C5LeBPOVJ9RORIg9mpB6+dXyHbVUyZZzmybwQLbj+eGMBmkwVsPZ9WxTGOuPdoodg9P9BjMZzGtpuVbZjaDmpDUHNKe+eia9KsO8HAfMzGhUDGZR2Bp+BlGQQl/MFZVPCNYmdzkpHDLfM0dMmPDaoddD//LpNILrJHXnmYZsZewu3PferoOP/jAc3T4VuInEHw== 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=pr3Uu3+nnFy1Bw7famyLt7Po46TSxwTd3aayVNWvKlI=; b=UCj7C1Pwg2tDEnK2vB/WRu/KfeHmPrmjAS/NCMbFvKubvNiBz32b1GMHx1iNxb8g/o5GerxWJTWDsv+2Eohy/lwighAaMwjE4PLMabL2+QIuoNMSDgz3sbYO1nTmhJ33apjbGTseBr2bprg5rUJ2at9oiVEM27Rt15PmDqsZU/U= 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 PH7PR13MB5455.namprd13.prod.outlook.com (2603:10b6:510:139::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.15; Tue, 21 Feb 2023 06:49:50 +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 06:49:49 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He , stable@dpdk.org Subject: [PATCH 1/6] net/nfp: fix the set MAC flow action Date: Tue, 21 Feb 2023 14:49:25 +0800 Message-Id: <20230221064930.3399-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20230221064930.3399-1-chaoyong.he@corigine.com> References: <20230221064930.3399-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:196::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_|PH7PR13MB5455:EE_ X-MS-Office365-Filtering-Correlation-Id: 453ed114-ece7-46af-303d-08db13d7d3c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XO7Hn5wI3pj6NMe7wIrE81SMzUtZeARBM/GzsE+ppLTFYTIYkFciFHgnwP9Pl/hZumUkH+bKGgrWR27fUgfFP38eN1WI2UlF5DbXJQw+gk9J25UJrTZMwFKiIsRuYmoHvhZgEgwuow6M2ilCqj4Q/qywPnFdPFnmneo+Mz6958wm0hevfGPHCtRetsjr99NKOkMLRc/fgYElNzninEQ+UuKZ7f65KIH/WBQXUIHiAxxLsgTne9Nn0jmgEf+rrljGZ5gxZQKbZAz4J6o//WTN4NJXsOVZznupm1S4JQoALlbpB0pKcKG16vF5cD1sHl0YXiC2pGBXFqJq/Z06VvhbmUu9Ly4KnrmCAhll978NkbVVQGmt0dMb87hnAZVzAUArP0OSojoTXMfhM/m1QL8MVRwKf3snFBC3f/ZWWhMwJ4HoXOMlO2xiLIW0CBFuj/O8CBO5R/opqxPAU15ZI6u4TQDtO+45/YF0CoqotCcOlE34AUCFEX1jLR4QR8mPeIah4i5uybrHFNu+EUFZBZiXeRBN7nOMrjCAcKXSFIFcOdA5JLwzXb2jJbHVUxsugBF9j0SJ2RryNYKsOQeut4x68wi58r/ULop2XN3kivxMgHD0N79K6ixxllcWJ353lOThPWg2oMuAah7HEQSNrTspEhn4BAlgkBE1DWoxMbWlE3lr7mB/tVPQ8sgJVURmoMtsAtO5vLj9cSJFR7VizuW/Nw== 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)(366004)(39840400004)(376002)(136003)(396003)(346002)(451199018)(6512007)(41300700001)(450100002)(2616005)(66556008)(66946007)(316002)(8676002)(4326008)(5660300002)(8936002)(6666004)(6916009)(66476007)(26005)(478600001)(52116002)(6486002)(6506007)(186003)(83380400001)(36756003)(1076003)(86362001)(44832011)(2906002)(38100700002)(38350700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aW9FUWFJWGMwOGUrSDVTWUY4eXliVUdTTFF4U0p4ejFubGFvWXJQR0UxYmRI?= =?utf-8?B?em9WUkMvdlZWWUJIWWxya3IveHg0ZmM1Ni92d0htak5rbmRlcmtyMXpDU3N2?= =?utf-8?B?SHM2WE9qWEQ4NjBwY1pEUVExeC81c1FmZnhodGlRVjBHWTZIc0lPcFpaZWlq?= =?utf-8?B?SmJVZjQrT0ErT3FEMCs3azNLY0p1a1QwaEd3VlpFTU1pWmhYREJ1cU1Zbkg0?= =?utf-8?B?b3FzaytrZVdCOUNhdVd5QnBwejhxa2JOOHloVDB4MC9XTm5HV3o4b0k1dHRO?= =?utf-8?B?MXBxa3NrTnkxc2x4UUhaakI0NHdtMW1PRHAvd2lGWHRrMERHd0h4MFVTR0tq?= =?utf-8?B?QU1RSVRHM2wranFHVFBjSHR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9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 453ed114-ece7-46af-303d-08db13d7d3c7 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2023 06:49:49.7655 (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: YbOZVSkx1RJkWSv3xyNV0zdeF0gdpItBgpAH9CEtvQiTNf/ME5gCmEoJjcpBq/C0j3wrLNaq2h1PyxqIiWLwAVZWZbO6E28/Uxz3+DKIFl0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5455 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 MAC 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 MAC address as expected. Fixes: 4f6983154570 ("net/nfp: support MAC source flow action") Fixes: eecc7ca3088a ("net/nfp: support MAC destination flow action") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/nfp_flow.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 0c38925701..f373171d7e 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -2066,6 +2066,7 @@ nfp_flow_action_set_mac(char *act_data, bool mac_src_flag, bool mac_set_flag) { + uint8_t i; size_t act_size; struct nfp_fl_act_set_eth *set_eth; const struct rte_flow_action_set_mac *set_mac; @@ -2084,9 +2085,13 @@ nfp_flow_action_set_mac(char *act_data, if (mac_src_flag) { rte_memcpy(&set_eth->eth_addr[RTE_ETHER_ADDR_LEN], set_mac->mac_addr, RTE_ETHER_ADDR_LEN); + for (i = 0; i < RTE_ETHER_ADDR_LEN; i++) + set_eth->eth_addr_mask[RTE_ETHER_ADDR_LEN + i] = 0xff; } else { rte_memcpy(&set_eth->eth_addr[0], set_mac->mac_addr, RTE_ETHER_ADDR_LEN); + for (i = 0; i < RTE_ETHER_ADDR_LEN; i++) + set_eth->eth_addr_mask[i] = 0xff; } } -- 2.29.3