From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Long Wu <long.wu@corigine.com>,
Chaoyong He <chaoyong.he@corigine.com>,
James Hershaw <james.hershaw@corigine.com>,
Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH v5 05/14] net/bonding: support checking valid bonding port ID
Date: Tue, 26 Dec 2023 10:37:36 +0800 [thread overview]
Message-ID: <20231226023745.3144143-6-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20231226023745.3144143-1-chaoyong.he@corigine.com>
From: Long Wu <long.wu@corigine.com>
Add API to support checking if the port id is a bonding
port id.
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: James Hershaw <james.hershaw@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/bonding/rte_eth_bond.h | 13 +++++++++++++
drivers/net/bonding/rte_eth_bond_api.c | 7 +++++++
drivers/net/bonding/version.map | 1 +
3 files changed, 21 insertions(+)
diff --git a/drivers/net/bonding/rte_eth_bond.h b/drivers/net/bonding/rte_eth_bond.h
index 84dd39b12f..62af9bbd99 100644
--- a/drivers/net/bonding/rte_eth_bond.h
+++ b/drivers/net/bonding/rte_eth_bond.h
@@ -427,6 +427,19 @@ __rte_experimental
int
rte_eth_bond_fw_create_get(uint16_t bonding_port_id, uint16_t member_port_id);
+/**
+ * Check whether bonding port id is valid.
+ *
+ * @param port_id
+ * Port ID of bonding device.
+ *
+ * @return
+ * true means the port is a bonding device, false means not.
+ */
+__rte_experimental
+bool
+rte_eth_bond_is_valid_port(uint16_t port_id);
+
#ifdef __cplusplus
}
#endif
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 32fa761baf..5e9437c786 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -1212,3 +1212,10 @@ rte_eth_bond_fw_create_get(uint16_t bonding_port_id, uint16_t member_port_id)
return member_dev->dev_ops->bond_fw_create_get(member_dev, bonding_dev);
}
+
+
+bool
+rte_eth_bond_is_valid_port(uint16_t port_id)
+{
+ return (valid_bonding_port_id(port_id) == 0);
+}
diff --git a/drivers/net/bonding/version.map b/drivers/net/bonding/version.map
index 12589f61b0..cd27c43092 100644
--- a/drivers/net/bonding/version.map
+++ b/drivers/net/bonding/version.map
@@ -33,6 +33,7 @@ EXPERIMENTAL {
rte_eth_bond_8023ad_member_info;
rte_eth_bond_active_members_get;
rte_eth_bond_fw_create_get;
+ rte_eth_bond_is_valid_port;
rte_eth_bond_member_add;
rte_eth_bond_member_remove;
rte_eth_bond_members_get;
--
2.39.1
next prev parent reply other threads:[~2023-12-26 2:38 UTC|newest]
Thread overview: 80+ 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 ` Chaoyong He [this message]
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 ` [PATCH v6 07/14] net/bonding: create new rte flow header file Chaoyong He
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
2024-09-22 22:30 ` [PATCH v6 00/14] Enhance the bond framework to support offload Ferruh Yigit
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=20231226023745.3144143-6-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).