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 9289143795; Tue, 26 Dec 2023 08:29:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BAD54064C; Tue, 26 Dec 2023 08:29:00 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2121.outbound.protection.outlook.com [40.107.212.121]) by mails.dpdk.org (Postfix) with ESMTP id 273674069F for ; Tue, 26 Dec 2023 08:28:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XLdwY0eg5fHa8bzht/zM8WAxRirWrt6Cptpe/kzYVvkuXnd8Gm7EhNBLkfEo6aWzFUklnIPIrYSrencGofLjSuoospMyY9s766CTowdd3BEb8CAVc5EyUgMLAgYsQZ6hv0A8PF+fRTXoBLwzCrpAI6iVMyBzA7QPqKRs2FhNucFIfevWYoRbOC1+g99VQqugDjxz8py21a0lzb7uOZhq66zYh61h5M5T/xWWe/ZAnCXA+ssrPAcGKOjP+K0s3yZj/9Nm1Ve8bt1f5Yc+TE+BQ8o5FSwWxgZXU4rGOnFK7nRZuW4jC6qfH8U7Qt28quWxZDh3ccFg7iySvH07vY76Uw== 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=ay42Mj9pScJ3eg2gkluZFIB/6v8xPu0SfLnUziHD8AyhhtvdUPAae7PmxixlUcdpaVxUR5lyAyqJp7v+pQ5aFoIeWZyfGCfK7HReJc/i0p5TucI/OZxlGUAJgw4qytonsGVE/r33ktLlabm8iCD3Hxx6pt8NzxpBBw3UHJZznltmEyt9DmKOT6CacstuZSaP7HPc077fkvB1F4QDmMxcCXP0EqNy0LdJlzEI4RQVtgWz9y+Cfru0kEWxsj5HJC0sjNlKBjCbsEQ3//TmEbir2hubSYC+W8Lc75TpF/F5Su4pRuVwqiqWSofQNVL3nrrSfrNQ4cZFHwrh2gbG6wVckw== 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=skX0lZCFOasQh2uPA50rhIq14n6661tWCj884rLpiXSqsaH77Roli/fMCXeExKxdXS7VDYAgo492pK2fKXdh6DGNgG0HP3sq0xu+7Q1g7afc9pYvXVKHqpEgdT1rSFFZhbBoKbiCQ0X7PiZ+nqdTiXG1GbTGd4+pje04e+CtrDM= 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 CH3PR13MB6506.namprd13.prod.outlook.com (2603:10b6:610:1a3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Tue, 26 Dec 2023 07:28:57 +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.027; Tue, 26 Dec 2023 07:28:57 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , James Hershaw , Chaoyong He , Peng Zhang Subject: [PATCH v6 07/14] net/bonding: create new rte flow header file Date: Tue, 26 Dec 2023 15:28:17 +0800 Message-Id: <20231226072824.3163121-8-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231226072824.3163121-1-chaoyong.he@corigine.com> References: <20231226023745.3144143-1-chaoyong.he@corigine.com> <20231226072824.3163121-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0239.namprd03.prod.outlook.com (2603:10b6:a03:39f::34) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CH3PR13MB6506:EE_ X-MS-Office365-Filtering-Correlation-Id: d33c3367-2704-42a6-43e5-08dc05e4527f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CrqhSWNui3v/l+csu9tEZqRe6CBnyoZSZ4WU6J2nLMPmx3XEm/H70Yxuv4f71CWdK3BSUSXAi716FE6aRE8+cAgonG7Qh9v1H7X5WfvXAgZJj1HW5PEEphfWfjoyYSqfd/A7hOpEBPAE7gu4U2sxnrSkcptPytmGiodqswoa4pLDMPqYpnWRHQasrAB1I+7sQJWmN918g7VRanAmJnKylJe3ms2jYsOYl1lSMNDvk96F3epwg3Zl1s2F2wqFepFffgL2sG1xMrowusBf6ZxgwbyF/S19uYIkGsVc1LZQkgOGwm5Kk8CeoXmOYY/8EEH9RwDG0a6fV/Tg/qJ53spJ+2AFytvHxvB5IjQoUo+KnFlQVnxUVNtOIcwudhtEm7hKgQWjqODYYzXJ6E1B4gFb+Q1skCUcL3zJlick8V+ocBs1fAA3FTunoBUUJJbFnky+X6Jlcmm83rllUUK7vRCqajoEeLfHbNUDusk3Yn1sqECR6EpwZRuw+WBkIprZUbFeSNGjZn1TL9pk/g8ixYjgnCI0LvU4+vRq8arjlsCT/EP7DMPMkbJLLBsCOcMzbgwdEZED8itvB+vFp7IB8h+xePLS89GAK3pOBP/2RHlj6QQINCVPxgfvZj4UzSHz//O/G55szg8GqvzDzxqWvir64uSzesHPCZvQ8QmeGMxDD2w= 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)(376002)(346002)(136003)(396003)(366004)(39840400004)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(107886003)(26005)(1076003)(52116002)(6666004)(2616005)(6512007)(83380400001)(5660300002)(44832011)(4326008)(8676002)(41300700001)(2906002)(8936002)(6486002)(478600001)(316002)(6916009)(54906003)(66476007)(66556008)(66946007)(6506007)(86362001)(36756003)(38100700002)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IGnRGveS/RXjQC8QlWksT31RQkGpASbleJLbHRZervaT55PP1CLa6nhWRYxB?= =?us-ascii?Q?6oT8IANPdQ4jNOZy+BkViG1eInnIJRH+AyOAS/sPbFJ3Lo1fGsXGKlE/reLF?= =?us-ascii?Q?uQpLsCchG09O+WW/+NmKAfgvXvukS6eutb37ZLO5Q/6/xYDI4PxOALiN0tr6?= =?us-ascii?Q?luQpsQaBsLjrJB4ASImqyoTTNpaRg9LN8xY3r7QgYyCb02dsLiJ3fOKsix8u?= =?us-ascii?Q?tp9S43xqbC6e27h0wRB07lHfg4Wttm5f5bU6z44Zn/uFC+L/Qzf9mn3Y9sta?= =?us-ascii?Q?gYwqhvTsgrU2FfDZ3NhozqNVeYWIt7MUSYSdYZyCpOEkMUpePTm8SIg7naZP?= =?us-ascii?Q?p3Zvq1ofCQgBSR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ascii?Q?+Dd4MKoNb8+uq45K9PKQBa2BBVLFqkU6cKRugReReJwQa0a5b+drLGgle3x4?= =?us-ascii?Q?sk5PPauJFqk5+jikaRm2Pd2mGGac7F/jAEPokBljqqoA4KxSNJIx+iqIh7OQ?= =?us-ascii?Q?CveWS9ifq5SeeY6AIVpOaTD1OzNRhGnw6Yro7LO2A4NjdmookkUvNXE2vGH+?= =?us-ascii?Q?o0qeQVY5vyqoSajFVjBGCdOFt75VhUj7dCZXNR43oMltml1TdRpNCglDrx1T?= =?us-ascii?Q?X0WkgQs60peFWr0DOL3xGLgsIil9lzdARhkkqgMB79sgdC5QiSZy93gL8MI9?= =?us-ascii?Q?L19Tc+aNZjyDGgNt6QguC47uQgQFUKkAvM2IpIMT9AGT4O3eS5E+F05jlLhc?= =?us-ascii?Q?9w=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: d33c3367-2704-42a6-43e5-08dc05e4527f X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2023 07:28:57.7153 (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: npZndzjUbe2e37+lBpQhmbZTGzqv2AdDDOxflOusN80GFAHNy5HkAnBE4Ic8Ldrv/GiR0G7cROKPiGC9nkPKPsEzYueWnyKi/UqVXPh/+28= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR13MB6506 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