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>
Subject: [PATCH v4 4/6] net/bonding: support add port by data name
Date: Wed, 18 Oct 2023 15:48:19 +0800 [thread overview]
Message-ID: <20231018074821.1908906-5-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20231018074821.1908906-1-chaoyong.he@corigine.com>
From: Long Wu <long.wu@corigine.com>
Several ports may share the same PCI address, like nfp representor.
So we cannot add this type of ports to bonding port by "--vdev"
argument in dpdk-testpmd. But the port's data name is unique between
them, we include an option to add such ports to the bonding port.
After adding this feature, we can create a bonding port that member
port is this type of port by "--vdev" in dpdk-testpmd start command.
For example:
dpdk-testpmd -l 2-10 -s 0x8 -a ca:00.0,representor=[0-2]
--vdev 'net_bonding0,member=flower_repr_p0,member=flower_repr_p1,
mode=4,socket_id=1,xmit_policy=l34' -- -i
Note:
1. "ca:00.0" is nfp 4000 card.
2. "flower_repr_p0" and "flower_repr_p1" are nfp phy representor's
data name.
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>
---
drivers/net/bonding/rte_eth_bond_args.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 8a3e4656ef..b320eb3038 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -70,6 +70,9 @@ find_port_id_by_dev_name(const char *name)
if (strcmp(rte_eth_devices[i].device->name, name) == 0)
return i;
+
+ if (strcmp(rte_eth_devices[i].data->name, name) == 0)
+ return i;
}
return -1;
}
--
2.39.1
next prev parent reply other threads:[~2023-10-18 7:49 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 ` Chaoyong He [this message]
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 ` [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=20231018074821.1908906-5-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 \
/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).