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 6623A426E6; Sun, 8 Oct 2023 03:52:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6AC340A6D; Sun, 8 Oct 2023 03:51:40 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2114.outbound.protection.outlook.com [40.107.237.114]) by mails.dpdk.org (Postfix) with ESMTP id 01B32406FF for ; Sun, 8 Oct 2023 03:51:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AST9ggReqDrqhpHLny3y1UXm2qJeNbXMGhPxJJZcOXWCVkrnl4tHVULohZbS61vYjjd6la4TKV8I1tiQH6CRyVck6vwXZgMiJzAWzN4jQQCTXby/zoiQ9amWo1yUDZWpIbzoiyE7DtM/LYUPoyjsu8uC85nmHBrUQrJTJOnsafBAmW2K747e/Ig9AMgxN6Va1aKbMnzTTCkaK4LAOdTQYYQ61JJm97KndJHEmwJ6BfhlcySwsovYk3/5gOpXpK3WJlom5VcpuDCEt8mYrGpkWNYV+E/sqe8/fQuF8hSRYi/8Ws6jAecFv5QsrPgjvltZkGejWaSx/QtNaRa53B3RcA== 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=IlP1JuggrDivwsWn4UQFb+b+QNzbAC+1THtyguQpxsA=; b=jTH3+b5mdXeowJySD8vWgBJZ2UTn9n0uu8zIYdwT5UAXlNuJj9/nAoB3uWBaNmILl5F2XL7Wte04z6XiDAekfB+Xs1zFrAqMAL91MXrKss8WqJ2CjSaxTJceoQuSetWtBSdEulJkDpwwVVD8dcaEy+O2NzMaq6nAg5C+kCTSJ/6N8ODtF0TQTRTZj2rJvbUjM80NMVl3q9zYh9T71em3aodiOSTpkp7Xqu0fJcOGcNvhPyPBJhdxU8Tlc5yurU9G9G8DylLiztToDSz8cmkPrg36D4Dx3Ov0LtIa/Ovsdge23TaE8XwcClhVcG+OrUQHPS8T8Ch796fEdclSaE2jrw== 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=IlP1JuggrDivwsWn4UQFb+b+QNzbAC+1THtyguQpxsA=; b=H8u2dk19cPGldl7XTR3j1RauT3h5nk53k/ACKiGX3yFEw5f6Zb1HY9VzRpJHM+IiHpBVDKjJDy0A0JLat7i+zo88fEXjUO0WMROFR2yhXDmgxHIVLZruwrClF5moCRHUFrdc4cpxVf2u2V+WbCBT3LB2d//DSHlxIKhr+gG5AfI= 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 BLAPR13MB4579.namprd13.prod.outlook.com (2603:10b6:208:327::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.41; Sun, 8 Oct 2023 01:51:37 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::28c0:63e2:ecd1:9314]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::28c0:63e2:ecd1:9314%4]) with mapi id 15.20.6813.027; Sun, 8 Oct 2023 01:51:37 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , James Hershaw , Chaoyong He Subject: [PATCH v3 6/8] net/bonding: create new rte flow header file Date: Sun, 8 Oct 2023 09:50:39 +0800 Message-Id: <20231008015041.1551165-7-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231008015041.1551165-1-chaoyong.he@corigine.com> References: <20231007013440.1309422-1-chaoyong.he@corigine.com> <20231008015041.1551165-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR05CA0173.namprd05.prod.outlook.com (2603:10b6:a03:339::28) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BLAPR13MB4579:EE_ X-MS-Office365-Filtering-Correlation-Id: a0d09e0d-31a2-402a-3467-08dbc7a11bbc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j+yW1cATiivU4ZZmQExhdE2Tsz/PODCZd5Drx6fWbADrxzCvODL86jntFPWgg0PwSW3nZtkKSPdOpi9IXtSlEZyMCMKezu0XirgC9IIOTAmr56O5NjKVg/ALTFp7lGtVM4Dy9HdZ26I+376ujMzG3J6tIhCRtXoSYx1llFG9Rum24OkW90Y5UwPsOWnajJlS+xB91PvajbHHg69XrDIQmD4SkhrsBplY7MX9ncEjxqmYEMkCa0CZ08eawAPTg+ZM57DYHSkuV6vkTThmMwpbFjrWUBmqvZBqqckRG1Y7AVUzf2apcbaXEtGZWqB88YTIt/S6awuDL0Jm4ogU14tfiVvC2CiyIs8e+xPR0kRkuwQLrMAOfzsTwzQkx9FOdju8twV9VmUDtBprpD+bEB5Yu/e8yqYLbx0YsxwA0tl4hulot18cYqglx0lInoF9vYtvB3/jw7vTIE/5UEJvGcKidiAwolphokaRCEW/ef3kWVJdEieucd0YcuN060smIjoTAHGQq1WYmwhfZCsOObHr5q01u8pp0jsMUCVmRX13GrogZ7PUhdrS4I8BknmcFBpfNFFTheeiPHpQSUh5c3JNySs12y2O8pLj2JQCvW3S/IJODqcJEPWz2C9vS+RlA3tvfRjotaEEv2szV/l/V5dWW9VEEvVor+EQS1OO0X7YlOg= 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)(39830400003)(376002)(396003)(366004)(136003)(346002)(230922051799003)(451199024)(186009)(64100799003)(1800799009)(41300700001)(1076003)(107886003)(2616005)(316002)(6916009)(66556008)(66946007)(54906003)(66476007)(36756003)(5660300002)(44832011)(83380400001)(38350700002)(38100700002)(86362001)(2906002)(26005)(8676002)(8936002)(4326008)(478600001)(6486002)(6506007)(52116002)(6512007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9RimnpQRISG1KfRFQdp2WfytoHvY+ucr/+a6w0PKIsZTeK7VOEQ/ppc6c7yK?= =?us-ascii?Q?I44eK0Z9fNtiUvaK5CrOS1FbtzN3zLlBOubsOoD9OH5ujJ5MMxoE5x4R3Nby?= =?us-ascii?Q?pM+QwOlqxY937RV7MWCfU3yAOVBMdppXMlq4dNv+z3+weM9+CmjLmwUSpSiS?= =?us-ascii?Q?y5p0GClN4wdvYI6MCegDoIWpVjhZgtDCVFb0bZ5DT4oL2+vRLQ1ZF3ajDGIw?= =?us-ascii?Q?pQRZypGID7HWSLSIQdcrAkQpy7klDzRk3c/Ylhfn/HG9z4Ut8LiYfAkBm0qI?= =?us-ascii?Q?5B0et9YD3Vr3TMIY8IUS+He7qOEkSGliZ3M+2wVyFXN3itr2nCO7MbEIpquM?= =?us-ascii?Q?ZN7bwdZBbCKN5hqOG9IW5EN+9OM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ascii?Q?g9Tj+x9p5xsMr3WPaWBzU1kfzKqbOF0hyYLSiRfvNVBBn92sHbxWlhelcGJQ?= =?us-ascii?Q?shO7CZNy36PyMs0K/oYBu2dLzj/MPHXji2IgnSyF0xNmO0g8vqqzzPzIeBlg?= =?us-ascii?Q?jSAWO1t0dCOgTFY7xL/B6lqh8V2f6ZVckxmo/74EUuklSqX3yCwaotAu6ndW?= =?us-ascii?Q?UbiNMbgc/OqKTHlFV0oYw9TBoM40UWcz6CichxTWovK9dqKYurcZ98mOU1jZ?= =?us-ascii?Q?kWK+HujvG6Z7460YGEIcN0ufkRlSXi+d0cdzxc4dka0tg4EambbuvRLOSYp1?= =?us-ascii?Q?tiaOYgwBm6D+yaZOuvGCWKA8xjfSdxTPrDZN+SzOe3cj1R6gjkYzk7s2n6Qu?= =?us-ascii?Q?/w=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0d09e0d-31a2-402a-3467-08dbc7a11bbc X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2023 01:51:37.4789 (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: Rcry8IQbhVqQQxkZHFmnoDDND5LDZiEV2NyH02GbAb712Qh4iSDeT+A7/lZXagfd72aiAUrpk/mlZQvUCcUzPlt8tORp+V/Y8i3Z3dQLu8I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR13MB4579 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 Move the flow code to a new head file to make flow related code more clean and make the code architecture more reasonable in the future. There is no functional change, just moving verbatim code around. Signed-off-by: Long Wu Reviewed-by: James Hershaw Reviewed-by: Chaoyong He --- drivers/net/bonding/eth_bond_private.h | 13 ------------- drivers/net/bonding/rte_eth_bond_api.c | 1 + drivers/net/bonding/rte_eth_bond_flow.c | 1 + drivers/net/bonding/rte_eth_bond_flow.h | 22 ++++++++++++++++++++++ drivers/net/bonding/rte_eth_bond_pmd.c | 1 + 5 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 drivers/net/bonding/rte_eth_bond_flow.h diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h index f9603a0f6b..4373465d8d 100644 --- a/drivers/net/bonding/eth_bond_private.h +++ b/drivers/net/bonding/eth_bond_private.h @@ -9,10 +9,8 @@ #include #include -#include #include #include -#include #include "rte_eth_bond.h" #include "eth_bond_8023ad_private.h" @@ -47,8 +45,6 @@ extern const char *pmd_bond_init_valid_arguments[]; extern struct rte_vdev_driver pmd_bond_drv; -extern const struct rte_flow_ops bond_flow_ops; - /** Port Queue Mapping Structure */ struct bond_rx_queue { uint16_t queue_id; @@ -94,15 +90,6 @@ struct bond_member_details { uint16_t reta_size; }; -struct rte_flow { - TAILQ_ENTRY(rte_flow) next; - /* Members flows */ - struct rte_flow *flows[RTE_MAX_ETHPORTS]; - /* Flow description for synchronization */ - struct rte_flow_conv_rule rule; - uint8_t rule_data[]; -}; - typedef void (*burst_xmit_hash_t)(struct rte_mbuf **buf, uint16_t nb_pkts, uint16_t member_count, uint16_t *members); diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index a042f05a4c..0113dfdc16 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -12,6 +12,7 @@ #include #include "rte_eth_bond.h" +#include "rte_eth_bond_flow.h" #include "eth_bond_private.h" #include "eth_bond_8023ad_private.h" diff --git a/drivers/net/bonding/rte_eth_bond_flow.c b/drivers/net/bonding/rte_eth_bond_flow.c index 71a91675f7..e6c7ce5362 100644 --- a/drivers/net/bonding/rte_eth_bond_flow.c +++ b/drivers/net/bonding/rte_eth_bond_flow.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright 2018 Mellanox Technologies, Ltd */ +#include "rte_eth_bond_flow.h" #include #include diff --git a/drivers/net/bonding/rte_eth_bond_flow.h b/drivers/net/bonding/rte_eth_bond_flow.h new file mode 100644 index 0000000000..7394e0e2e1 --- /dev/null +++ b/drivers/net/bonding/rte_eth_bond_flow.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2023 Corigine, Inc. + */ + +#ifndef _RTE_ETH_BOND_FLOW_H_ +#define _RTE_ETH_BOND_FLOW_H_ + +#include +#include + +extern const struct rte_flow_ops bond_flow_ops; + +struct rte_flow { + TAILQ_ENTRY(rte_flow) next; + struct rte_flow *flows[RTE_MAX_ETHPORTS]; + /**< Member ports flows */ + struct rte_flow_conv_rule rule; + /**< Flow description for synchronization */ + uint8_t rule_data[]; +}; + +#endif /* _RTE_ETH_BOND_FLOW_H_ */ diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 1ebeb270c8..630afc3740 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -21,6 +21,7 @@ #include #include "rte_eth_bond.h" +#include "rte_eth_bond_flow.h" #include "eth_bond_private.h" #include "eth_bond_8023ad_private.h" -- 2.39.1