DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Long Wu <long.wu@corigine.com>,
	James Hershaw <james.hershaw@corigine.com>,
	Chaoyong He <chaoyong.he@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH v6 07/14] net/bonding: create new rte flow header file
Date: Tue, 26 Dec 2023 15:28:17 +0800	[thread overview]
Message-ID: <20231226072824.3163121-8-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20231226072824.3163121-1-chaoyong.he@corigine.com>

From: Long Wu <long.wu@corigine.com>

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 <long.wu@corigine.com>
Reviewed-by: James Hershaw <james.hershaw@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 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 <sys/queue.h>
 
 #include <ethdev_driver.h>
-#include <rte_flow.h>
 #include <rte_spinlock.h>
 #include <rte_bitmap.h>
-#include <rte_flow_driver.h>
 
 #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 <rte_kvargs.h>
 
 #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 <stddef.h>
 #include <string.h>
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 <rte_flow.h>
+#include <rte_flow_driver.h>
+
+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 <rte_string_fns.h>
 
 #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


  parent reply	other threads:[~2023-12-26  7:29 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05  2:40 [PATCH 0/8] Enhance the bond framework to support offload Chaoyong He
2023-10-05  2:40 ` [PATCH 1/8] ethdev: add member notification for bonding port Chaoyong He
2023-10-05  2:40 ` [PATCH 2/8] ethdev: add API to get hardware creation of " Chaoyong He
2023-10-05  2:40 ` [PATCH 3/8] net/bonding: modify interface comment format Chaoyong He
2023-10-05  2:40 ` [PATCH 4/8] net/bonding: add bonding port arguments Chaoyong He
2023-10-05  2:40 ` [PATCH 5/8] net/bonding: support add port by data name Chaoyong He
2023-10-05  2:40 ` [PATCH 6/8] net/bonding: create new rte flow header file Chaoyong He
2023-10-05  2:40 ` [PATCH 7/8] net/bonding: support checking valid bonding port ID Chaoyong He
2023-10-05  2:40 ` [PATCH 8/8] net/bonding: add commands for bonding port notification Chaoyong He
2023-10-07  1:34 ` [PATCH v2 0/8] Enhance the bond framework to support offload Chaoyong He
2023-10-07  1:34   ` [PATCH v2 1/8] ethdev: add member notification for bonding port Chaoyong He
2023-10-07 15:49     ` Stephen Hemminger
2023-10-08  1:37       ` Chaoyong He
2023-10-07  1:34   ` [PATCH v2 2/8] ethdev: add API to get hardware creation of " Chaoyong He
2023-10-07  1:34   ` [PATCH v2 3/8] net/bonding: modify interface comment format Chaoyong He
2023-10-07  1:34   ` [PATCH v2 4/8] net/bonding: add bonding port arguments Chaoyong He
2023-10-07  1:34   ` [PATCH v2 5/8] net/bonding: support add port by data name Chaoyong He
2023-10-07  1:34   ` [PATCH v2 6/8] net/bonding: create new rte flow header file Chaoyong He
2023-10-07  1:34   ` [PATCH v2 7/8] net/bonding: support checking valid bonding port ID Chaoyong He
2023-10-07  1:34   ` [PATCH v2 8/8] net/bonding: add commands for bonding port notification Chaoyong He
2023-10-08  1:50   ` [PATCH v3 0/8] Enhance the bond framework to support offload Chaoyong He
2023-10-08  1:50     ` [PATCH v3 1/8] ethdev: add member notification for bonding port Chaoyong He
2023-10-08  2:49       ` lihuisong (C)
2023-10-09  3:11         ` 回复: " Long Wu
2023-10-17  8:27           ` lihuisong (C)
2023-10-18  2:16             ` Chaoyong He
2023-10-08  1:50     ` [PATCH v3 2/8] ethdev: add API to get hardware creation of " Chaoyong He
2023-10-08  1:50     ` [PATCH v3 3/8] net/bonding: modify interface comment format Chaoyong He
2023-10-08  1:50     ` [PATCH v3 4/8] net/bonding: add bonding port arguments Chaoyong He
2023-10-08  1:50     ` [PATCH v3 5/8] net/bonding: support add port by data name Chaoyong He
2023-10-08  1:50     ` [PATCH v3 6/8] net/bonding: create new rte flow header file Chaoyong He
2023-10-08  1:50     ` [PATCH v3 7/8] net/bonding: support checking valid bonding port ID Chaoyong He
2023-10-17  8:33       ` lihuisong (C)
2023-10-17  9:25         ` Chaoyong He
2023-10-17 11:34           ` lihuisong (C)
2023-10-18  1:53             ` Chaoyong He
2023-10-17 15:56         ` Stephen Hemminger
2023-10-08  1:50     ` [PATCH v3 8/8] net/bonding: add commands for bonding port notification Chaoyong He
2023-10-13  2:22     ` [PATCH v3 0/8] Enhance the bond framework to support offload Chaoyong He
2023-10-13 12:53       ` Ferruh Yigit
2023-10-18  7:48     ` [PATCH v4 0/6] " Chaoyong He
2023-10-18  7:48       ` [PATCH v4 1/6] ethdev: add member notification for bonding port Chaoyong He
2023-10-18  7:48       ` [PATCH v4 2/6] ethdev: add API to get hardware creation of " Chaoyong He
2023-10-18  7:48       ` [PATCH v4 3/6] net/bonding: add bonding port arguments Chaoyong He
2023-10-18  7:48       ` [PATCH v4 4/6] net/bonding: support add port by data name Chaoyong He
2023-10-18  7:48       ` [PATCH v4 5/6] net/bonding: support checking valid bonding port ID Chaoyong He
2023-10-18  7:48       ` [PATCH v4 6/6] net/bonding: add commands for bonding port notification Chaoyong He
2023-11-15 16:01       ` [PATCH v4 0/6] Enhance the bond framework to support offload Ferruh Yigit
2023-11-16  1:45         ` Chaoyong He
2023-12-26  2:37       ` [PATCH v5 00/14] " Chaoyong He
2023-12-26  2:37         ` [PATCH v5 01/14] ethdev: add member notification for bonding port Chaoyong He
2023-12-26  2:37         ` [PATCH v5 02/14] ethdev: add API to get firmware creation of " Chaoyong He
2023-12-26  2:37         ` [PATCH v5 03/14] net/bonding: add bonding port arguments Chaoyong He
2023-12-26  2:37         ` [PATCH v5 04/14] net/bonding: support add port by data name Chaoyong He
2023-12-26  2:37         ` [PATCH v5 05/14] net/bonding: support checking valid bonding port ID Chaoyong He
2023-12-26  2:37         ` [PATCH v5 06/14] net/bonding: add commands for bonding port notification Chaoyong He
2023-12-26  2:37         ` [PATCH v5 07/14] net/bonding: create new rte flow header file Chaoyong He
2023-12-26  2:37         ` [PATCH v5 08/14] net/nfp: add bond firmware creation initialization Chaoyong He
2023-12-26  2:37         ` [PATCH v5 09/14] net/nfp: reset bond configuration of firmware Chaoyong He
2023-12-26  2:37         ` [PATCH v5 10/14] net/nfp: handle link event of bond firmware creation Chaoyong He
2023-12-26  2:37         ` [PATCH v5 11/14] net/nfp: support bond member notification Chaoyong He
2023-12-26  2:37         ` [PATCH v5 12/14] net/nfp: handle bond packets from firmware Chaoyong He
2023-12-26  2:37         ` [PATCH v5 13/14] net/nfp: support getting bond firmware creation Chaoyong He
2023-12-26  2:37         ` [PATCH v5 14/14] net/nfp: support offloading bond-flow Chaoyong He
2023-12-26  7:28         ` [PATCH v6 00/14] Enhance the bond framework to support offload Chaoyong He
2023-12-26  7:28           ` [PATCH v6 01/14] ethdev: add member notification for bonding port Chaoyong He
2023-12-26  7:28           ` [PATCH v6 02/14] ethdev: add API to get firmware creation of " Chaoyong He
2023-12-26  7:28           ` [PATCH v6 03/14] net/bonding: add bonding port arguments Chaoyong He
2023-12-26  7:28           ` [PATCH v6 04/14] net/bonding: support add port by data name Chaoyong He
2023-12-26  7:28           ` [PATCH v6 05/14] net/bonding: support checking valid bonding port ID Chaoyong He
2023-12-26  7:28           ` [PATCH v6 06/14] net/bonding: add commands for bonding port notification Chaoyong He
2023-12-26  7:28           ` Chaoyong He [this message]
2023-12-26  7:28           ` [PATCH v6 08/14] net/nfp: add bond firmware creation initialization Chaoyong He
2023-12-26  7:28           ` [PATCH v6 09/14] net/nfp: reset bond configuration of firmware Chaoyong He
2023-12-26  7:28           ` [PATCH v6 10/14] net/nfp: handle link event of bond firmware creation Chaoyong He
2023-12-26  7:28           ` [PATCH v6 11/14] net/nfp: support bond member notification Chaoyong He
2023-12-26  7:28           ` [PATCH v6 12/14] net/nfp: handle bond packets from firmware Chaoyong He
2023-12-26  7:28           ` [PATCH v6 13/14] net/nfp: support getting bond firmware creation Chaoyong He
2023-12-26  7:28           ` [PATCH v6 14/14] net/nfp: support offloading bond-flow Chaoyong He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231226072824.3163121-8-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=james.hershaw@corigine.com \
    --cc=long.wu@corigine.com \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).