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 0EB6041CFD for ; Tue, 21 Feb 2023 11:35:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00B1C431C2; Tue, 21 Feb 2023 11:35:37 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2116.outbound.protection.outlook.com [40.107.95.116]) by mails.dpdk.org (Postfix) with ESMTP id 48CA4431BA; Tue, 21 Feb 2023 11:35:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AjKow+62754CIR7rPCgbJsK4kUjeqZioRpIASaNCGD4E1ikpbNQHlAKtMQ0YPxPDRSsHB/sM3I5PHo9x8z4yvZYALmNHMfXuEzmltI26HOBh3+mImozp/nUTQsuUfW6ptKtZSkBoLOTaBlZxPPwppQsYY7Hux6dY9H+Ohv5BPN3yJNOUHeFg6xNu/bieTrYtFQEZGPtbN0TYjeO8EUHk2evQTn44Wla0P5D5Zp7lDD6DZww2nxOVjY+jQiCY2z0Fy7wFv1zX1cgHxgqkli/GqeTPwz3eFLKJ5BK8TdnDPMQinF/w5nULu6ns/pmob2cW1i6d+TR4eQcRPr75jing7g== 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=Dd9ww7Za3y/d70zmWcmyd6+tqwUHoXedBDahAsJsxleva5yVh5IzXDSbhi/Z5YZYVgNZl4zjpmYdkvHfF0hfvuuwpaP0/j0PI8Jl/jZ+/qvLgCWhndyXlpF1D3Mzg9Je8zIY8lpqldS+0ZIWqhMxFk0BpLB+LPIqkRA9+/LlphzlVBj30o8xuVfoDlJL+fXAUBo5ma0GHfrWGQkZxclnbjQdRsg5w+QgQRQYr4pvL4f2qw7J/uuTiULwJ7Rj8UEB/yQRG+W9ixn8tihoZsUAPYY1YNoGTd8cmNtB9zOCzWcKVe8V0FjTO84tbxzoryJxQuSby96eazcxWvGjjZBC/A== 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=OSQl77EEJDiBfit0dz1whAGYEgQ5gxBVui5OXl/WTZzNF6cajoqyMXiP4ySq0lnTjdJtLMS4PyOKgZH/a335BVj8WQl2juA++Yk8MCKKlJALf+GaYq71aVxe4sNhiuA/IGQwgbcQZVYxa6eBPkb1kZ9zgCpDjOJkVyiYGB9VB1U= 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:32 +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:32 +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 1/6] net/nfp: fix the set MAC flow action Date: Tue, 21 Feb 2023 18:35:08 +0800 Message-Id: <20230221103513.412-2-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: 97e25a94-f45d-46ec-a016-08db13f75bf9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lh3fZwtfNJAkLyCplzzB/kgYDB8ed6rYGS79xcVU6RZCs5K3YF79DAKLlLjwtvrbOhonAql9z/z1rsfxtnbBdaQC9Wus/JVltLLYzAczQFuoTg0/gmbb5Wrsd8cwPX+wvTpCu55HOcU5Y9yOY8d8Mn+B4FAW6WjtTkmBfpaCS1jmDpTe9zvLC97q8OmKqKrL6/QB7Q8DNZ/L33ko1J6GSk0buLETDTRVdxKRntv7HpXScyJVtGH8SU2H8+05TkxKkVxaNtGxeojUVidz2qKw5m3E47cLP04TBsp7cnUh8LEgbqo6dOap8vvATTqQLE7g76xyplfgeaqP1W8YFJnUGB2IGN8yxK0n91TQsmxuE2+DkKa2PgAYKWcPFmc6uatxjBN1vvoCxBMYFX/rAlEn3KPYNnltOrWpzroYqE5IGop7qm0T9eSRn8+NNK6Evn5qepDRolJShvAPET3am3HJf53/AFkvjsz43R2wUnZuXD+EGrFS/hj8IxukLRMR7x1nlOUZJPuqTY0f/Jn0qQTcHeZuJf4DvjlzHhs01I0Y34hu46D59QGVh4P9k93Xk/MglA+jpSGzBpvCNgGJbsLP6lbngG3gIRt2DaPvjiTY2PYf9oGw7rRTsUgg1D/huDqjDL8CmyqOfhBq2aP7UxtUVg7da1osbx6U2yDWEU4cbm6d/FKY0YnrDUIoiRBTGIfFhum9G87/Wbg3TSQ8XLDRDA== 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?c1ZxT0EzWUhqSVhqZFR5VWUxK3NnZmNMamFIejBKSzdvU0JQOVNCNmJuWWF4?= =?utf-8?B?MGd5TGdQWStudnlLSGtIUFVsWW9FNU1Ea21ZL2F1MjVoUTZyRnd6Wk9sNXF1?= =?utf-8?B?Q3J4cG9aVk1vd2M2b3pWdXk0ZE1zaGw5aWIrM2N1SVFqaTNjZUgvT0toZ1B4?= =?utf-8?B?RjlBL1A4djhVcEFzKzJKS012Ym13MUYySjVoUzRDaGdIRURGMDhPRXVwK1hv?= =?utf-8?B?SFlGRWFuYis2dXRQU0J5QjNWU01uVHJZWnlkRHZOQ3N3YUozM0x4MHdQRlhi?= =?utf-8?B?T1hPUkRVUXcyZnl2WVNnRGRlMlBoMy9S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Z?= =?utf-8?B?aXNrbVJkbjlRY0oxY3Q3YldDdnBLa0o4NHNhZHpPNFYyY25EajkyNDBYeXgw?= =?utf-8?B?OXc9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97e25a94-f45d-46ec-a016-08db13f75bf9 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:32.6805 (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: jmwB00GrGcBCGs1hbOaYT4mYlvhdiHI7rgzbkbJRmxX3DvgZLY5YxZtddhGlbT3LyPOpjfPGBZqR2VgxF2KkchcYrjiqBzl9c0TRHzRsaKs= 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 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