patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/bonding: fix flow flush order on bonded device close
@ 2022-09-11 12:22 Ivan Malov
  2022-10-17  8:41 ` Andrew Rybchenko
  2022-10-19 11:18 ` [PATCH v2] " Ivan Malov
  0 siblings, 2 replies; 7+ messages in thread
From: Ivan Malov @ 2022-09-11 12:22 UTC (permalink / raw)
  To: dev
  Cc: stable, Andrew Rybchenko, Chas Williams, Min Hu (Connor),
	Declan Doherty, Matan Azrad

The current code first removes all back-end devices of
the bonded device and then invokes flush operation to
remove flows in such back-end devices, which makes no
sense. Fix that by re-ordering the steps accordingly.

Fixes: 49dad9028e2a ("net/bonding: support flow API")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index a5429f5e97..d01c954296 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2155,6 +2155,10 @@ bond_ethdev_close(struct rte_eth_dev *dev)
 		return 0;
 
 	RTE_BOND_LOG(INFO, "Closing bonded device %s", dev->device->name);
+
+	/* Flush flows in all back-end devices before removing them */
+	bond_flow_ops.flush(dev, &ferror);
+
 	while (internals->slave_count != skipped) {
 		uint16_t port_id = internals->slaves[skipped].port_id;
 
@@ -2172,7 +2176,6 @@ bond_ethdev_close(struct rte_eth_dev *dev)
 			skipped++;
 		}
 	}
-	bond_flow_ops.flush(dev, &ferror);
 	bond_ethdev_free_queues(dev);
 	rte_bitmap_reset(internals->vlan_filter_bmp);
 	rte_bitmap_free(internals->vlan_filter_bmp);
-- 
2.30.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/bonding: fix flow flush order on bonded device close
  2022-09-11 12:22 [PATCH] net/bonding: fix flow flush order on bonded device close Ivan Malov
@ 2022-10-17  8:41 ` Andrew Rybchenko
  2022-10-17 12:34   ` Chas Williams
  2022-10-19 11:18 ` [PATCH v2] " Ivan Malov
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Rybchenko @ 2022-10-17  8:41 UTC (permalink / raw)
  To: Chas Williams, Min Hu (Connor)
  Cc: stable, Declan Doherty, Matan Azrad, Ivan Malov, dev

Chas, Cornor, could you review the patch, please.

Thanks,
Andrew.

On 9/11/22 15:22, Ivan Malov wrote:
> The current code first removes all back-end devices of
> the bonded device and then invokes flush operation to
> remove flows in such back-end devices, which makes no
> sense. Fix that by re-ordering the steps accordingly.
> 
> Fixes: 49dad9028e2a ("net/bonding: support flow API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
>   drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index a5429f5e97..d01c954296 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -2155,6 +2155,10 @@ bond_ethdev_close(struct rte_eth_dev *dev)
>   		return 0;
>   
>   	RTE_BOND_LOG(INFO, "Closing bonded device %s", dev->device->name);
> +
> +	/* Flush flows in all back-end devices before removing them */
> +	bond_flow_ops.flush(dev, &ferror);
> +
>   	while (internals->slave_count != skipped) {
>   		uint16_t port_id = internals->slaves[skipped].port_id;
>   
> @@ -2172,7 +2176,6 @@ bond_ethdev_close(struct rte_eth_dev *dev)
>   			skipped++;
>   		}
>   	}
> -	bond_flow_ops.flush(dev, &ferror);
>   	bond_ethdev_free_queues(dev);
>   	rte_bitmap_reset(internals->vlan_filter_bmp);
>   	rte_bitmap_free(internals->vlan_filter_bmp);


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/bonding: fix flow flush order on bonded device close
  2022-10-17  8:41 ` Andrew Rybchenko
@ 2022-10-17 12:34   ` Chas Williams
  2022-10-19 10:29     ` Andrew Rybchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Chas Williams @ 2022-10-17 12:34 UTC (permalink / raw)
  To: Andrew Rybchenko, Chas Williams, Min Hu (Connor)
  Cc: stable, Declan Doherty, Matan Azrad, Ivan Malov, dev

This appears to be correct, but it needs to be coordinated with the
proposed changes in net/bonding: make bonded device configure method re-entrant


On 10/17/22 04:41, Andrew Rybchenko wrote:
> Chas, Cornor, could you review the patch, please.
> 
> Thanks,
> Andrew.
> 
> On 9/11/22 15:22, Ivan Malov wrote:
>> The current code first removes all back-end devices of
>> the bonded device and then invokes flush operation to
>> remove flows in such back-end devices, which makes no
>> sense. Fix that by re-ordering the steps accordingly.
>>
>> Fixes: 49dad9028e2a ("net/bonding: support flow API")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>> ---
>>   drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c 
>> b/drivers/net/bonding/rte_eth_bond_pmd.c
>> index a5429f5e97..d01c954296 100644
>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>> @@ -2155,6 +2155,10 @@ bond_ethdev_close(struct rte_eth_dev *dev)
>>           return 0;
>>       RTE_BOND_LOG(INFO, "Closing bonded device %s", dev->device->name);
>> +
>> +    /* Flush flows in all back-end devices before removing them */
>> +    bond_flow_ops.flush(dev, &ferror);
>> +
>>       while (internals->slave_count != skipped) {
>>           uint16_t port_id = internals->slaves[skipped].port_id;
>> @@ -2172,7 +2176,6 @@ bond_ethdev_close(struct rte_eth_dev *dev)
>>               skipped++;
>>           }
>>       }
>> -    bond_flow_ops.flush(dev, &ferror);
>>       bond_ethdev_free_queues(dev);
>>       rte_bitmap_reset(internals->vlan_filter_bmp);
>>       rte_bitmap_free(internals->vlan_filter_bmp);
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/bonding: fix flow flush order on bonded device close
  2022-10-17 12:34   ` Chas Williams
@ 2022-10-19 10:29     ` Andrew Rybchenko
  2022-10-19 11:27       ` Ivan Malov
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Rybchenko @ 2022-10-19 10:29 UTC (permalink / raw)
  To: Chas Williams, Min Hu (Connor), Ivan Malov, Chas Williams
  Cc: stable, Declan Doherty, Matan Azrad, dev

On 10/17/22 15:34, Chas Williams wrote:
> This appears to be correct, but it needs to be coordinated with the
> proposed changes in net/bonding: make bonded device configure method 
> re-entrant

Ivan, could you comment and send rebased v2 version anyway.

> 
> 
> On 10/17/22 04:41, Andrew Rybchenko wrote:
>> Chas, Cornor, could you review the patch, please.
>>
>> Thanks,
>> Andrew.
>>
>> On 9/11/22 15:22, Ivan Malov wrote:
>>> The current code first removes all back-end devices of
>>> the bonded device and then invokes flush operation to
>>> remove flows in such back-end devices, which makes no
>>> sense. Fix that by re-ordering the steps accordingly.
>>>
>>> Fixes: 49dad9028e2a ("net/bonding: support flow API")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>>> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>>> ---
>>>   drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++++-
>>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c 
>>> b/drivers/net/bonding/rte_eth_bond_pmd.c
>>> index a5429f5e97..d01c954296 100644
>>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>>> @@ -2155,6 +2155,10 @@ bond_ethdev_close(struct rte_eth_dev *dev)
>>>           return 0;
>>>       RTE_BOND_LOG(INFO, "Closing bonded device %s", dev->device->name);
>>> +
>>> +    /* Flush flows in all back-end devices before removing them */
>>> +    bond_flow_ops.flush(dev, &ferror);
>>> +
>>>       while (internals->slave_count != skipped) {
>>>           uint16_t port_id = internals->slaves[skipped].port_id;
>>> @@ -2172,7 +2176,6 @@ bond_ethdev_close(struct rte_eth_dev *dev)
>>>               skipped++;
>>>           }
>>>       }
>>> -    bond_flow_ops.flush(dev, &ferror);
>>>       bond_ethdev_free_queues(dev);
>>>       rte_bitmap_reset(internals->vlan_filter_bmp);
>>>       rte_bitmap_free(internals->vlan_filter_bmp);
>>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] net/bonding: fix flow flush order on bonded device close
  2022-09-11 12:22 [PATCH] net/bonding: fix flow flush order on bonded device close Ivan Malov
  2022-10-17  8:41 ` Andrew Rybchenko
@ 2022-10-19 11:18 ` Ivan Malov
  2022-10-20  6:34   ` Andrew Rybchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Ivan Malov @ 2022-10-19 11:18 UTC (permalink / raw)
  To: dev
  Cc: Chas Williams, Min Hu (Connor),
	stable, Andrew Rybchenko, Chas Williams, Declan Doherty,
	Matan Azrad

The current code first removes all back-end devices of
the bonded device and then invokes flush operation to
remove flows in such back-end devices, which makes no
sense. Fix that by re-ordering the steps accordingly.

Fixes: 49dad9028e2a ("net/bonding: support flow API")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 486b7fc9f7..51d543e5de 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2156,6 +2156,9 @@ bond_ethdev_cfg_cleanup(struct rte_eth_dev *dev)
 	int skipped = 0;
 	struct rte_flow_error ferror;
 
+	/* Flush flows in all back-end devices before removing them */
+	bond_flow_ops.flush(dev, &ferror);
+
 	while (internals->slave_count != skipped) {
 		uint16_t port_id = internals->slaves[skipped].port_id;
 
@@ -2173,7 +2176,6 @@ bond_ethdev_cfg_cleanup(struct rte_eth_dev *dev)
 			skipped++;
 		}
 	}
-	bond_flow_ops.flush(dev, &ferror);
 }
 
 int
-- 
2.30.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/bonding: fix flow flush order on bonded device close
  2022-10-19 10:29     ` Andrew Rybchenko
@ 2022-10-19 11:27       ` Ivan Malov
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Malov @ 2022-10-19 11:27 UTC (permalink / raw)
  To: Andrew Rybchenko
  Cc: Chas Williams, Min Hu (Connor),
	Chas Williams, stable, Declan Doherty, Matan Azrad, dev

[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]

Hi Chas, Andrew,

On Wed, 19 Oct 2022, Andrew Rybchenko wrote:

> On 10/17/22 15:34, Chas Williams wrote:
>> This appears to be correct, but it needs to be coordinated with the
>> proposed changes in net/bonding: make bonded device configure method 
>> re-entrant

Needs to be coordinated - in which way? Are you looking to reorder
the patches? If yes, v2 should be OK with this regard.

>
> Ivan, could you comment and send rebased v2 version anyway.

Please see 
https://patches.dpdk.org/project/dpdk/patch/20221019111805.1070381-1-ivan.malov@oktetlabs.ru/ 
.
>
>> 
>> 
>> On 10/17/22 04:41, Andrew Rybchenko wrote:
>>> Chas, Cornor, could you review the patch, please.
>>> 
>>> Thanks,
>>> Andrew.
>>> 
>>> On 9/11/22 15:22, Ivan Malov wrote:
>>>> The current code first removes all back-end devices of
>>>> the bonded device and then invokes flush operation to
>>>> remove flows in such back-end devices, which makes no
>>>> sense. Fix that by re-ordering the steps accordingly.
>>>> 
>>>> Fixes: 49dad9028e2a ("net/bonding: support flow API")
>>>> Cc: stable@dpdk.org
>>>> 
>>>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>>>> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>>>> ---
>>>>   drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++++-
>>>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>>> 
>>>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c 
>>>> b/drivers/net/bonding/rte_eth_bond_pmd.c
>>>> index a5429f5e97..d01c954296 100644
>>>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>>>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>>>> @@ -2155,6 +2155,10 @@ bond_ethdev_close(struct rte_eth_dev *dev)
>>>>           return 0;
>>>>       RTE_BOND_LOG(INFO, "Closing bonded device %s", dev->device->name);
>>>> +
>>>> +    /* Flush flows in all back-end devices before removing them */
>>>> +    bond_flow_ops.flush(dev, &ferror);
>>>> +
>>>>       while (internals->slave_count != skipped) {
>>>>           uint16_t port_id = internals->slaves[skipped].port_id;
>>>> @@ -2172,7 +2176,6 @@ bond_ethdev_close(struct rte_eth_dev *dev)
>>>>               skipped++;
>>>>           }
>>>>       }
>>>> -    bond_flow_ops.flush(dev, &ferror);
>>>>       bond_ethdev_free_queues(dev);
>>>>       rte_bitmap_reset(internals->vlan_filter_bmp);
>>>>       rte_bitmap_free(internals->vlan_filter_bmp);
>>> 
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] net/bonding: fix flow flush order on bonded device close
  2022-10-19 11:18 ` [PATCH v2] " Ivan Malov
@ 2022-10-20  6:34   ` Andrew Rybchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Rybchenko @ 2022-10-20  6:34 UTC (permalink / raw)
  To: Ivan Malov, dev
  Cc: Chas Williams, Min Hu (Connor),
	stable, Chas Williams, Declan Doherty, Matan Azrad

On 10/19/22 14:18, Ivan Malov wrote:
> The current code first removes all back-end devices of
> the bonded device and then invokes flush operation to
> remove flows in such back-end devices, which makes no
> sense. Fix that by re-ordering the steps accordingly.
> 
> Fixes: 49dad9028e2a ("net/bonding: support flow API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Applied to dpdk-next-net/main, thanks.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-20  6:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11 12:22 [PATCH] net/bonding: fix flow flush order on bonded device close Ivan Malov
2022-10-17  8:41 ` Andrew Rybchenko
2022-10-17 12:34   ` Chas Williams
2022-10-19 10:29     ` Andrew Rybchenko
2022-10-19 11:27       ` Ivan Malov
2022-10-19 11:18 ` [PATCH v2] " Ivan Malov
2022-10-20  6:34   ` Andrew Rybchenko

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).