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 6AD734378F; Tue, 26 Dec 2023 03:39:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55540402D8; Tue, 26 Dec 2023 03:38:25 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by mails.dpdk.org (Postfix) with ESMTP id F173D40649 for ; Tue, 26 Dec 2023 03:38:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F/yJ5GKczZcgvyNBFVXyHA0DXVL/kZC0kZKbyZ+WwmbXk1iVYQ4WWQ+VgXTopYbdoC8VLeji/IwlaBr6Mu49W9/6i1zmtrKEzpkOQtCIKxhi6Oh3rFM0IQnPhfO1ORVrqv3u1PXd4ilg0vbw6yuby+ZFUMS42GUW7bXSYmi+nNQhVvNucUtOIfUmBi18L/s18VqlYwOgalsLNozbXRsIZ/cpsHu0eXv+M+T8AWGcKdvXx5Qm71MZAbRtOWh3DILrIFQKuEj4Ri+7x4Je0c5NDVGRArGBo+omdbUyri6HZIs6v3ybv0QNscsclstdzHmTctUfDEYgEEpuPADeENPtdQ== 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=jCtT2mfosxG2wodbyBAYQBsHsQWgMLhSVY1UW8HFjqQ=; b=VXEUytrpR2YgJidb13pbm6ZJXAY5Z0M2pgpEiwh2ZvkEVTqxYqd3mJE2jANini2O4hxgfhX1gNcQ9Kcxh7OpBpTioEHT13YAi488SBYUPXyKNmYAriaF7YbOeRBQ0sbAcneUZkwrbANjNc9oVSix7ZD+jE7w//ZLes5mS5qOB0wVjdztLouw9LTeej7acpyNEVWSaap4+vDmNVQR1HSd25T2PIN5HW2VidUO3eIqqM4eLFMhGbBfsnXx9xZCXUeY2K3NmI6ENy4lM/gwsfBA4ufLD50GKJKqYRT8JDadn5Dce/FRfSoJgRJ0r43sV+SFG56g159ILwE0giDMCPt/0w== 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=jCtT2mfosxG2wodbyBAYQBsHsQWgMLhSVY1UW8HFjqQ=; b=X4xABS1gvNY3g9e9Ocbt6k6k35T7fQfnGBNMR0dJxgBC0WSeEAN4I4i8GzRmH1IyOGBMZUenNehYmWyKvpa5FpByB4hq8qwBVUnT+cJCl3bXoCNmrGwD5vz5vDoeBzytvFraMwt6kgAVDMuxfKmgmATCweY+fpLg72bWSZLb1T0= 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 MW4PR13MB5864.namprd13.prod.outlook.com (2603:10b6:303:1b7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.26; Tue, 26 Dec 2023 02:38:22 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.7113.026; Tue, 26 Dec 2023 02:38:22 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , James Hershaw , Chaoyong He , Peng Zhang Subject: [PATCH v5 07/14] net/bonding: create new rte flow header file Date: Tue, 26 Dec 2023 10:37:38 +0800 Message-Id: <20231226023745.3144143-8-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231226023745.3144143-1-chaoyong.he@corigine.com> References: <20231018074821.1908906-1-chaoyong.he@corigine.com> <20231226023745.3144143-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0156.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::36) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MW4PR13MB5864:EE_ X-MS-Office365-Filtering-Correlation-Id: 020147a6-481a-4502-f72d-08dc05bbba68 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9pAxjgB544l9UV01tkINofmwB0CNACNc5uKJ1aC6rWSG0wsjkT3kGgeyWeUnEQZbo9TJ9WLu0+S4zYll2bBmNPcbkzre9lyXKNHKGzcRDK9V8CAi9qfVfASW2SIRld01xrswhmyfdakSov7HhC2srRp11AFIZdq5QfRFbEG+l8X3RU/oe29PN3Y4T8mRDkmfNHf2n/nDgJFw825o2u62I7KBVkkr/+pVfyGEDKSDNOBSskhsAdGIXTQz19o2b7a23eOfNsxqOoYtAktun7KXPV4LT6nKGEMEIH/9tDD79X3scagEEYbQRmS5LjlG7ARoNtWrYvVChCs8KnZe3Rqk3Xw9546yDLHjwhSkbtKy1v24oXPYgSmfbuGdheBdKFaax8jcqbh546149QYc+7Ia0PCdT2b6cnZNG4iejCChTK1ty1TIab60es3co/N/XuegSAEFIPBm6rn67XKSOvZYChFw0p/sigwzkI20BDHBxHR8bJFPN5FnCPlm3lRl4OvJbAeAff+bmZMH946wGoSMbV/jr7aLiGsP5SMA57Fu3TNekaq8AutWYKj2wZJhuQ51sJLfBdXzD2h+5ZOWq5D5IzNiYkfOaBfEcSRIk/ANJJEYTJO44EEA+OcDDz9lZtpZzXbJobX3hRdrVTOU7cidF5fnyaMI8Ft7ZJrlwNaZWAc= 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)(39840400004)(376002)(396003)(366004)(136003)(346002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(83380400001)(41300700001)(2616005)(38100700002)(26005)(107886003)(1076003)(316002)(4326008)(54906003)(8676002)(2906002)(5660300002)(44832011)(8936002)(478600001)(6512007)(6666004)(6506007)(52116002)(66476007)(66556008)(66946007)(6486002)(6916009)(38350700005)(86362001)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1B5fiVY7k9RR9az0y01x7JbkhxqUHDwFGwLyFCxYQTesN0S98lAt/XinUX0S?= =?us-ascii?Q?fZirZkUx2F1LyCBJ63FUCVltCbWWZz5H6/T7rrWv0wfhcmDc1GHV0voRwWE9?= =?us-ascii?Q?1W9WNPUWTKPMQPfyJbDsAENsJfgmiMMAQeS/czuS7zXOf0JWFY/kpLzVia+G?= =?us-ascii?Q?gRrNtFOH1gO6EuSB4aodCCkqSd7Q02bGnmesxRdepbRubXleAuPQeCPulAcZ?= =?us-ascii?Q?irz3Q09cr0NqvhPjKFWpthAsG47LbDhCB7DNueH/Qn8keUV4oGTze7tZYsOs?= =?us-ascii?Q?Qm4Dhd+ioQaTUE5TMP8xLmBC49MEpO0Sgxt/jNtSh6G/NstOZvOYKfFFYZMf?= =?us-ascii?Q?a0jGoafFo4uNTwHZnhB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?us-ascii?Q?Jj/3k7YweuOtNyfCBT/lpR65o0VmsFDE9uOyjltC0snPvMePw0xaRoJnJ9dw?= =?us-ascii?Q?qI3eKSfcNbVYzGB9svEebPiv+LzZJQwHw8D9EXJLSxW+HOywVfjzacSrPF+r?= =?us-ascii?Q?/YH0y4EXoS3TOlVLqM8n356YsFqW6iCHVj+1W3sMmRDpBhUeecXYCbdE6Jai?= =?us-ascii?Q?IRji5y9g92x69/vdUCVc2pgG4V6wQBAYNkDyKvFVnzPTNl7GmFpxPu/A/3Yu?= =?us-ascii?Q?dbmP/4/wM+mGwZtQ+RJ+69512z3Fsv+1sr7moZdA3Es25kETzIgc3N/Kf5IE?= =?us-ascii?Q?B7wifamXR0L+3GIYmyq8TrOh/JbPrexnOKRQOq4ga5EbSE9EB9ctBAp1CeVG?= =?us-ascii?Q?Jw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 020147a6-481a-4502-f72d-08dc05bbba68 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2023 02:38:22.5772 (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: wY/NpJ2km27S/GEKmeTlhoH5p6fjQQ+W8yfUm4kvn8Bh71QLCY4rs5tftUFb+SQyzSoB3QfQaAXy16r717ggdURsm6hQ72Bzz69fPxb8woc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR13MB5864 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 Reviewed-by: Peng Zhang --- 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 5e9437c786..0a296d3894 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 b3a37a36c8..650f8061a2 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