* [PATCH] net/bonding: avoid RSS reta update in flow-isolation mode
@ 2025-07-03 11:59 madhuker.mythri
2025-07-03 16:23 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: madhuker.mythri @ 2025-07-03 11:59 UTC (permalink / raw)
To: chas3; +Cc: dev, Madhuker Mythri
From: Madhuker Mythri <madhuker.mythri@oracle.com>
In bonding PMD, member_start() function checks whether RSS(mq_mode) is
enabled and then calling the RSS rte_eth_dev_rss_reta_update() API, which
is returning error in-case of device configured in flow isolation-mode.
When the device configured with flow isolation mode RSS reta update is not
required and the API was not supported. For example in-case of mlx5 PMD,
RSS reta update API was not supported, when the device is configured in
flow isolation-mode.
So, added check to verify if the device is configured in flow-isolation
mode, then do not call the rte_eth_dev_rss_reta_update() API.
Signed-off-by: Madhuker Mythri <madhuker.mythri@oracle.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 83339bae3d..b8fecb85d2 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1904,12 +1904,11 @@ member_start(struct rte_eth_dev *bonding_eth_dev,
}
}
- /* If RSS is enabled for bonding, synchronize RETA */
- if (bonding_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) {
+ /* If flow-isolation is not enabled, then check whether RSS is enabled for
+ * bonding, synchronize RETA */
+ if (internals->flow_isolated_valid == 0 &&
+ (bonding_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS)) {
int i;
- struct bond_dev_private *internals;
-
- internals = bonding_eth_dev->data->dev_private;
for (i = 0; i < internals->member_count; i++) {
if (internals->members[i].port_id == member_port_id) {
--
2.39.5 (Apple Git-154)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/bonding: avoid RSS reta update in flow-isolation mode
2025-07-03 11:59 [PATCH] net/bonding: avoid RSS reta update in flow-isolation mode madhuker.mythri
@ 2025-07-03 16:23 ` Stephen Hemminger
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2025-07-03 16:23 UTC (permalink / raw)
To: madhuker.mythri; +Cc: chas3, dev
On Thu, 3 Jul 2025 17:29:03 +0530
madhuker.mythri@oracle.com wrote:
> From: Madhuker Mythri <madhuker.mythri@oracle.com>
>
> In bonding PMD, member_start() function checks whether RSS(mq_mode) is
> enabled and then calling the RSS rte_eth_dev_rss_reta_update() API, which
> is returning error in-case of device configured in flow isolation-mode.
> When the device configured with flow isolation mode RSS reta update is not
> required and the API was not supported. For example in-case of mlx5 PMD,
> RSS reta update API was not supported, when the device is configured in
> flow isolation-mode.
>
> So, added check to verify if the device is configured in flow-isolation
> mode, then do not call the rte_eth_dev_rss_reta_update() API.
>
> Signed-off-by: Madhuker Mythri <madhuker.mythri@oracle.com>
Should have fixes tag
> ---
> drivers/net/bonding/rte_eth_bond_pmd.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 83339bae3d..b8fecb85d2 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -1904,12 +1904,11 @@ member_start(struct rte_eth_dev *bonding_eth_dev,
> }
> }
>
> - /* If RSS is enabled for bonding, synchronize RETA */
> - if (bonding_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) {
> + /* If flow-isolation is not enabled, then check whether RSS is enabled for
> + * bonding, synchronize RETA */
Comment needs to be split to satisfy the style guidelines.
> + if (internals->flow_isolated_valid == 0 &&
> + (bonding_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS)) {
> int i;
> - struct bond_dev_private *internals;
> -
> - internals = bonding_eth_dev->data->dev_private;
This code looks like it was always redundant. The new definition of internals
duplicates same variable earlier in function. Why is the compiler not flagging this?
Is there some warning that DPDK is disabling?
>
> for (i = 0; i < internals->member_count; i++) {
> if (internals->members[i].port_id == member_port_id) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] net/bonding: avoid RSS reta update in flow-isolation mode
@ 2025-07-03 11:37 madhuker.mythri
0 siblings, 0 replies; 3+ messages in thread
From: madhuker.mythri @ 2025-07-03 11:37 UTC (permalink / raw)
To: chas3; +Cc: dev, Madhuker Mythri
From: Madhuker Mythri <madhuker.mythri@oracle.com>
In bonding PMD, member_start() function checks whether RSS(mq_mode) is enabled
and then calling the RSS rte_eth_dev_rss_reta_update() API, which is returning
error in-case of device configured in flow isolation-mode. When the device
configured with flow isolation mode RSS reta update is not required and the API
was not supported. For example in-case of mlx5 PMD, RSS reta update API was not
supported, when the device is configured in flow isolatio-mode.
So, added check to verify if the device is configured in flow isolation-mode
then, do not call the rte_eth_dev_rss_reta_update() API.
Signed-off-by: Madhuker Mythri <madhuker.mythri@oracle.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 83339bae3d..d312720869 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1904,12 +1904,11 @@ member_start(struct rte_eth_dev *bonding_eth_dev,
}
}
- /* If RSS is enabled for bonding, synchronize RETA */
- if (bonding_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) {
+ /* If flow-isolation is not enabled, then check whether RSS is enabled for
+ * bonding, synchronize RETA */
+ if ((internals->flow_isolated_valid == 0) &&
+ (bonding_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS)) {
int i;
- struct bond_dev_private *internals;
-
- internals = bonding_eth_dev->data->dev_private;
for (i = 0; i < internals->member_count; i++) {
if (internals->members[i].port_id == member_port_id) {
--
2.39.5 (Apple Git-154)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-03 16:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-03 11:59 [PATCH] net/bonding: avoid RSS reta update in flow-isolation mode madhuker.mythri
2025-07-03 16:23 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2025-07-03 11:37 madhuker.mythri
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).