ethdev: allow close function to return an error
authorThomas Monjalon <thomas@monjalon.net>
Fri, 16 Oct 2020 13:32:59 +0000 (15:32 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 20:26:41 +0000 (22:26 +0200)
commit8a5a0aad5d3e4f4f75ca81932eb247de94765685
tree7649067de078b10b4d3580f661002c67ca83910d
parent0607dadf98c71bdc96ea7b54eda26f1b667be1f6
ethdev: allow close function to return an error

The API function rte_eth_dev_close() was returning void.
The return type is changed to int for notifying of errors.

If an error happens during a close operation,
the status of the port is undefined,
a maximum of resources having been freed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Liron Himi <lironh@marvell.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
16 files changed:
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_20_11.rst
drivers/net/cxgbe/cxgbe_ethdev.c
drivers/net/cxgbe/cxgbevf_ethdev.c
drivers/net/failsafe/failsafe_ether.c
drivers/net/failsafe/failsafe_ops.c
drivers/net/memif/rte_eth_memif.c
drivers/net/mlx5/mlx5.c
drivers/net/mvneta/mvneta_ethdev.c
drivers/net/mvpp2/mrvl_ethdev.c
drivers/net/netvsc/hn_ethdev.c
drivers/net/netvsc/hn_var.h
drivers/net/netvsc/hn_vf.c
drivers/net/virtio/virtio_user_ethdev.c
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h