DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/1] ethdev: fix handling of close failure
@ 2021-01-22 17:58 Thomas Monjalon
  2021-01-25  9:13 ` Andrew Rybchenko
  2021-01-25 10:51 ` [dpdk-dev] " Burakov, Anatoly
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Monjalon @ 2021-01-22 17:58 UTC (permalink / raw)
  To: dev
  Cc: stable, Anatoly Burakov, Ferruh Yigit, Andrew Rybchenko,
	Liron Himi, Stephen Hemminger

If a failure happens when closing a port,
it was unnecessarily failing again in the function eth_err(),
because of a check against HW removal cause.
Indeed there is a big chance the port is released at this point.
Given the port is in the middle (or at the end) of a close process,
checking the error cause by accessing the port is a non-sense.
The error check is replaced by a simple return in the close function.

Bugzilla ID: 624
Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error")
Cc: stable@dpdk.org

Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index daf5f24f7e..89455a432e 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1820,7 +1820,7 @@ rte_eth_dev_close(uint16_t port_id)
 	rte_ethdev_trace_close(port_id);
 	*lasterr = rte_eth_dev_release_port(dev);
 
-	return eth_err(port_id, firsterr);
+	return firsterr;
 }
 
 int
-- 
2.30.0


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

* Re: [dpdk-dev] [PATCH 1/1] ethdev: fix handling of close failure
  2021-01-22 17:58 [dpdk-dev] [PATCH 1/1] ethdev: fix handling of close failure Thomas Monjalon
@ 2021-01-25  9:13 ` Andrew Rybchenko
  2021-01-25 12:37   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  2021-01-27 11:44   ` Ferruh Yigit
  2021-01-25 10:51 ` [dpdk-dev] " Burakov, Anatoly
  1 sibling, 2 replies; 6+ messages in thread
From: Andrew Rybchenko @ 2021-01-25  9:13 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: stable, Anatoly Burakov, Ferruh Yigit, Liron Himi, Stephen Hemminger

On 1/22/21 8:58 PM, Thomas Monjalon wrote:
> If a failure happens when closing a port,
> it was unnecessarily failing again in the function eth_err(),
> because of a check against HW removal cause.
> Indeed there is a big chance the port is released at this point.
> Given the port is in the middle (or at the end) of a close process,
> checking the error cause by accessing the port is a non-sense.
> The error check is replaced by a simple return in the close function.
> 
> Bugzilla ID: 624
> Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error")
> Cc: stable@dpdk.org
> 
> Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>


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

* Re: [dpdk-dev] [PATCH 1/1] ethdev: fix handling of close failure
  2021-01-22 17:58 [dpdk-dev] [PATCH 1/1] ethdev: fix handling of close failure Thomas Monjalon
  2021-01-25  9:13 ` Andrew Rybchenko
@ 2021-01-25 10:51 ` Burakov, Anatoly
  1 sibling, 0 replies; 6+ messages in thread
From: Burakov, Anatoly @ 2021-01-25 10:51 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: stable, Ferruh Yigit, Andrew Rybchenko, Liron Himi, Stephen Hemminger

On 22-Jan-21 5:58 PM, Thomas Monjalon wrote:
> If a failure happens when closing a port,
> it was unnecessarily failing again in the function eth_err(),
> because of a check against HW removal cause.
> Indeed there is a big chance the port is released at this point.
> Given the port is in the middle (or at the end) of a close process,
> checking the error cause by accessing the port is a non-sense.
> The error check is replaced by a simple return in the close function.
> 
> Bugzilla ID: 624
> Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error")
> Cc: stable@dpdk.org
> 
> Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH 1/1] ethdev: fix handling of close failure
  2021-01-25  9:13 ` Andrew Rybchenko
@ 2021-01-25 12:37   ` Thomas Monjalon
  2021-01-25 12:39     ` Thomas Monjalon
  2021-01-27 11:44   ` Ferruh Yigit
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2021-01-25 12:37 UTC (permalink / raw)
  To: dev
  Cc: stable, Anatoly Burakov, Ferruh Yigit, Liron Himi,
	Stephen Hemminger, Andrew Rybchenko

25/01/2021 10:13, Andrew Rybchenko:
> On 1/22/21 8:58 PM, Thomas Monjalon wrote:
> > If a failure happens when closing a port,
> > it was unnecessarily failing again in the function eth_err(),
> > because of a check against HW removal cause.
> > Indeed there is a big chance the port is released at this point.
> > Given the port is in the middle (or at the end) of a close process,
> > checking the error cause by accessing the port is a non-sense.
> > The error check is replaced by a simple return in the close function.
> > 
> > Bugzilla ID: 624
> > Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error")
> > Cc: stable@dpdk.org
> > 
> > Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Applied



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

* Re: [dpdk-dev] [dpdk-stable] [PATCH 1/1] ethdev: fix handling of close failure
  2021-01-25 12:37   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2021-01-25 12:39     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2021-01-25 12:39 UTC (permalink / raw)
  To: dev
  Cc: stable, Anatoly Burakov, Ferruh Yigit, Liron Himi,
	Stephen Hemminger, Andrew Rybchenko

25/01/2021 13:37, Thomas Monjalon:
> 25/01/2021 10:13, Andrew Rybchenko:
> > On 1/22/21 8:58 PM, Thomas Monjalon wrote:
> > > If a failure happens when closing a port,
> > > it was unnecessarily failing again in the function eth_err(),
> > > because of a check against HW removal cause.
> > > Indeed there is a big chance the port is released at this point.
> > > Given the port is in the middle (or at the end) of a close process,
> > > checking the error cause by accessing the port is a non-sense.
> > > The error check is replaced by a simple return in the close function.
> > > 
> > > Bugzilla ID: 624
> > > Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error")
> > > Cc: stable@dpdk.org
> > > 
> > > Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > 
> > Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> 
> Applied

Sorry please ignore this wrong message, patch not applied.
(will be considered by Ferruh)



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

* Re: [dpdk-dev] [dpdk-stable] [PATCH 1/1] ethdev: fix handling of close failure
  2021-01-25  9:13 ` Andrew Rybchenko
  2021-01-25 12:37   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2021-01-27 11:44   ` Ferruh Yigit
  1 sibling, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2021-01-27 11:44 UTC (permalink / raw)
  To: Andrew Rybchenko, Thomas Monjalon, dev
  Cc: stable, Anatoly Burakov, Liron Himi, Stephen Hemminger

On 1/25/2021 9:13 AM, Andrew Rybchenko wrote:
> On 1/22/21 8:58 PM, Thomas Monjalon wrote:
>> If a failure happens when closing a port,
>> it was unnecessarily failing again in the function eth_err(),
>> because of a check against HW removal cause.
>> Indeed there is a big chance the port is released at this point.
>> Given the port is in the middle (or at the end) of a close process,
>> checking the error cause by accessing the port is a non-sense.
>> The error check is replaced by a simple return in the close function.
>>
>> Bugzilla ID: 624
>> Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error")
>> Cc: stable@dpdk.org
>>
>> Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> 

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

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

end of thread, other threads:[~2021-01-27 11:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 17:58 [dpdk-dev] [PATCH 1/1] ethdev: fix handling of close failure Thomas Monjalon
2021-01-25  9:13 ` Andrew Rybchenko
2021-01-25 12:37   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-01-25 12:39     ` Thomas Monjalon
2021-01-27 11:44   ` Ferruh Yigit
2021-01-25 10:51 ` [dpdk-dev] " Burakov, Anatoly

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