ethdev: fix handling of close failure
PATCH 1/1 ethdev: fix handling of close failure
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
--- lib/librte_ethdev/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev.c +1 -1
@@ -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
Signature · 1 line
2.30.0
Quoted 8 lines · Thomas Monjalon
If a failure happens when closing a port,
it was unnecessarily failing again in the functioneth_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.
Quoted 6 lines
Bugzilla ID: 624
Fixes 8a5a0aad5d3e ("ethdev: allow close function to return an error")Reported-by Anatoly Burakov <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>
Thomas Monjalon
Applied25/01/2021 10:13, Andrew Rybchenko:
Quoted 9 lines · Thomas Monjalon
Quoted 8 lines
If a failure happens when closing a port,
it was unnecessarily failing again in the functioneth_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.
Quoted 8 lines
Quoted 6 lines
Bugzilla ID: 624
Fixes 8a5a0aad5d3e ("ethdev: allow close function to return an error")Reported-by Anatoly Burakov <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Acked-by Andrew Rybchenko <[email protected]>
Applied
25/01/2021 13:37, Thomas Monjalon:
Quoted 14 lines
25/01/2021 10:13, Andrew Rybchenko:
Quoted 13 lines · Thomas Monjalon
Quoted 12 lines
If a failure happens when closing a port,
it was unnecessarily failing again in the functioneth_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")
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Reported-by Anatoly Burakov <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Acked-by Andrew Rybchenko <[email protected]>Applied
Sorry please ignore this wrong message, patch not applied. (will be considered by Ferruh)
Ferruh Yigit
AppliedQuoted 9 lines · Andrew Rybchenko
Quoted 8 lines · Thomas Monjalon
If a failure happens when closing a port,
it was unnecessarily failing again in the functioneth_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.
Quoted 9 lines
Quoted 6 lines
Bugzilla ID: 624
Fixes 8a5a0aad5d3e ("ethdev: allow close function to return an error")Reported-by Anatoly Burakov <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Acked-by Andrew Rybchenko <[email protected]>
Applied to dpdk-next-net/main, thanks.
Quoted 8 lines · Thomas Monjalon
If a failure happens when closing a port,
it was unnecessarily failing again in the functioneth_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.
Quoted 7 lines
Bugzilla ID: 624
Fixes 8a5a0aad5d3e ("ethdev: allow close function to return an error")Reported-by Anatoly Burakov <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>---
Signature · 2 lines
Thanks, Anatoly