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 D325543C8E; Tue, 12 Mar 2024 09:04:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82FF5410E6; Tue, 12 Mar 2024 09:04:08 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2129.outbound.protection.outlook.com [40.107.94.129]) by mails.dpdk.org (Postfix) with ESMTP id 2BFF940F16; Tue, 12 Mar 2024 09:04:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V4xenhH4DjtxVxWACGDT3tBYNB1p2m+trI/Hbib2mU2nN+lcD9fzbgsawh9Hslq6zrZaMhbD1B0ID/w+Gi6pPT3yiDMdKR8VYEDi14991C3B5w6X599+JbrqVEB+qpaZuletRM2oZ07WUTFhX/tEee3ufMF2lz8MkAQaBOssxDzo0hyRsuZKuX9ACVBfxfM2AhckfpvxN3gIdBsrB34I2YVxTMMRs01HHa2OViGTzW+1uxpuiFPsFOlrhDwclpG0LdbGOilkWJIbsw4rRIaJU/j1YUg2t/J26ZX92a9JgWYjiVPEvnRta9V6/YBS6bwYlzC25gEYrx9+pFEmatiaVQ== 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=QyZ3zXClykfsMSXau0Jw9TfmgW+y3X+Alu3XxuH/yVM=; b=iKEYu1TDv41KniSGEnQYS9Nv6exEkXN9i38PCSD9VvoRR32r8TgRws718e70JQZIcWvtK/GvZV94g+mfIgWwHRK8UF7eH843kLmkMhFsJUQlDo6wfKJLX9hyi667J3XQ3jT+uyhHAqfXcCTIwJDAExUrwBFbAzL7FEnrmpaYezz6M4b+wjoTcgg+zlnfbFi3jQj2WwPBV1NuTOqX5/RPOZXEJdzdIg6e1Qd5N5V46JMSNR4khtlfogbB5V2v3vasrxKSJnPndTCJcypW5zcPGqnwbJj7K+3cV7pXq102uv0LDnpGDbVzZUCydm6x72cQiBfvfYj9vtnFpk+cNKL4Bw== 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=QyZ3zXClykfsMSXau0Jw9TfmgW+y3X+Alu3XxuH/yVM=; b=K2ljrhb3OMVAhjm/NjGF8ZShjOV2Fet22AV2uqinxDw1tekA/0vGNE9lti3X8UiNrMBXkdZeQevFGRREQ72yPJBXdIbIUUVmmfUoSfLwn1GXowGiaIZwiPNFVP2pTFGi2nXtpYc4N2MFlDBe4G5LKUDzr3fT8/o/AGTAuW5p/VU= 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 PH0PR13MB4987.namprd13.prod.outlook.com (2603:10b6:510:75::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.36; Tue, 12 Mar 2024 08:04:04 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e%5]) with mapi id 15.20.7362.035; Tue, 12 Mar 2024 08:04:04 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , Chaoyong He , stable@dpdk.org Subject: [PATCH 1/2] net/nfp: fix IP flow rule failed Date: Tue, 12 Mar 2024 16:02:44 +0800 Message-Id: <20240312080245.2783410-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240312080245.2783410-1-chaoyong.he@corigine.com> References: <20240312080245.2783410-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR07CA0099.namprd07.prod.outlook.com (2603:10b6:a03:12b::40) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH0PR13MB4987:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a630de6-d62c-4198-18a2-08dc426afbd8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3Txqs+Ynv6mKQS9gIZWXb69YoOYozFplAYvberNNo9PbacWWjaJ7D/uSxP021bRStQrzlv3kSnKlL/S+OtJVvF3Vy23OEKNN1Bg9Efc/5pJZKOQifbr45TcKqOdKfaOf0ZYe3UtpQSak5acRdD97QLjhu1ToMWfPZ6WDV2tb1+95mD6VWz7Fhj2fm5yxzaOPuuDI44PlJ2Hz0FbHLop96fF6bMPxQb9HinhHsIfUOm/Qeavibi6w5I1wQ2f0BPWIInDsnR3apJxWpXIfZJMmuLctj53qvoaUt6unlaGduRsIAzCFm3VTFWmm0pRSt55QbIzOI5DWQx7a/DOkAFAQM9/+/AS7RCdN67SznT8bJQSO71NctrCWXdfA/QeKSEY5ESwx9KPFLQ8kthjAHXrHQwTjw59I1BVDukTgemJH+JqTnQJW35TaLxixrclNODGonzUwQVm78cljSakdSlNcfTZxfXKnjnJLo5unHem7wx90qCzr4OUhwlfpKq3jvaDRpj3WuTqGOtDwBWt8aQRVeZkS45+YzBwU4zY2pndfVEoehCLJPvpb9yrC/KnCkUwqN2MUQGdNaGuBm042CcDilHI3N2drtu2mk5X3XsCVh5jPH1z87rDooMAQHQsRmFzEmqxoceyZsFLASjpg7ccrMx44HxMP/6u6QmD1DCFqEqFgy2MX2RsuKA7+Erd9KYnyeCkhsqE0kJ+nwG0ieQAR9orYyxBQcv2PxqtBmpuEu2U= 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:(13230031)(52116005)(1800799015)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/apCMSmXKHBtC/PRROIPTvGvdddHe3a7UAzEu2T3Nvnv7yTO6Pi4J21lnoLF?= =?us-ascii?Q?3mrExpR28z+t47grU0fYHe0jZ0fP4C8Q9xbkPeOzjinrW26rxg8JJnpk1mI5?= =?us-ascii?Q?RdNkyHGhpSlaRbhNwF9yamCeB9GJy0zf3niOLwykVVcFQ9ivfLq7ULOK6HZI?= =?us-ascii?Q?U9p3RPVxVCSlFB4cx9/YfSao+3L3w7G0PvGFnd1YKUdCuyINofk5uIks7RSu?= =?us-ascii?Q?sKWJl4vHEIfQBwhW4a2BSsDpk4fU7INxUPV8czhWjthKeKRXkO414Ed4TeoD?= =?us-ascii?Q?Ome2cg9YLjFb7WiGEneI7x0oJ1+dQIs+cSoLLMnlnH8k6nhX3hfM/QCxX+SP?= =?us-ascii?Q?NfF54XXB0oklS7oWQUYp087C65l5yMEYUlr3dNCCAxaSiApopFQYAvmc0MRJ?= =?us-ascii?Q?03Tzy6kI3DTsU92ldaf9Zg5Y/EG6lwbo41pzvPDFOShC+B4D4eA8j+1XB/Wp?= =?us-ascii?Q?/gSgzsXNIe3ZLP34BcZ+bAFEtn+H5BjX0reN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?8VEdf6n84l+v84I5rvr/qSzMv9mnzzw/+FloZR8H5rrUcnIxwBlnu30mtQsr?= =?us-ascii?Q?jxRDGHbQLF24lDv7Tj/x3e5TxB7JbzxsTPW9dftGlxLhhLJvqEFsrk3jtCIU?= =?us-ascii?Q?Y7BmSpVp87dtpos9zgBsLXp0v6YL14AGcAI2IiMBOO5cjGwXqjiHHZ1qImGB?= =?us-ascii?Q?/Q82mMiLRoPFyzObaBRIXOV4uv12g/qNo/bQugv5qL6CEOA8yD3flaPIcU1H?= =?us-ascii?Q?+g=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a630de6-d62c-4198-18a2-08dc426afbd8 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2024 08:04:04.1722 (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: akElfNUxsFxJFOFyiTtR7Br2yX3T4rHt8SQ3t0goX/fGhXaYmJYtjS+btTsW5U53o6Bsjui5FxkHCafMSKZK7XTphOcv2RvJgib42iKtDWw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR13MB4987 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 From: Long Wu If the flow rule dose not have 'spec' in IP layer, NFP will set all IP flow control message type to 0. Move up the IP flow control message setting code to fix it. Fixes: 42eabda06b0f ("net/nfp: support IPv4 flow item") Fixes: 9f27cb889246 ("net/nfp: support IPv6 flow item") Cc: Chaoyong He Cc: stable@dpdk.org Signed-off-by: Long Wu Reviewed-by: Chaoyong He --- drivers/net/nfp/nfp_net_flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c index 3b33f3b6e9..bd983aaf6a 100644 --- a/drivers/net/nfp/nfp_net_flow.c +++ b/drivers/net/nfp/nfp_net_flow.c @@ -237,6 +237,8 @@ nfp_net_flow_merge_ipv4(struct rte_flow *nfp_flow, const struct rte_flow_item_ipv4 *mask; const struct rte_flow_item_ipv4 *spec; + nfp_flow->payload.cmsg_type = NFP_NET_CFG_MBOX_CMD_FS_ADD_V4; + spec = item->spec; if (spec == NULL) { PMD_DRV_LOG(DEBUG, "NFP flow merge ipv4: no item->spec!"); @@ -245,7 +247,6 @@ nfp_net_flow_merge_ipv4(struct rte_flow *nfp_flow, mask = (item->mask != NULL) ? item->mask : proc->mask_default; - nfp_flow->payload.cmsg_type = NFP_NET_CFG_MBOX_CMD_FS_ADD_V4; ipv4 = (struct nfp_net_cmsg_match_v4 *)nfp_flow->payload.match_data; ipv4->l4_protocol_mask = mask->hdr.next_proto_id; @@ -269,6 +270,8 @@ nfp_net_flow_merge_ipv6(struct rte_flow *nfp_flow, const struct rte_flow_item_ipv6 *mask; const struct rte_flow_item_ipv6 *spec; + nfp_flow->payload.cmsg_type = NFP_NET_CFG_MBOX_CMD_FS_ADD_V6; + spec = item->spec; if (spec == NULL) { PMD_DRV_LOG(DEBUG, "NFP flow merge ipv6: no item->spec!"); @@ -277,7 +280,6 @@ nfp_net_flow_merge_ipv6(struct rte_flow *nfp_flow, mask = (item->mask != NULL) ? item->mask : proc->mask_default; - nfp_flow->payload.cmsg_type = NFP_NET_CFG_MBOX_CMD_FS_ADD_V6; ipv6 = (struct nfp_net_cmsg_match_v6 *)nfp_flow->payload.match_data; ipv6->l4_protocol_mask = mask->hdr.proto; -- 2.39.1