ethdev: allow returning error on VLAN offload ops
authorDavid Harton <dharton@cisco.com>
Fri, 1 Sep 2017 02:36:28 +0000 (22:36 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:01 +0000 (02:33 +0200)
commit289ba0c0f52a6577fd324f4b47bbde58d17305be
tree74efafb109b78295bcd09c52100e61dbd4d3e783
parent6abd94d72ab5b6787391a823d246e0288bd3ace0
ethdev: allow returning error on VLAN offload ops

Some devices may not support or fail setting VLAN offload
configuration based on dynamic circumstances so the
vlan_offload_set_t vector is modified to return an int so
the caller can determine success or not.

rte_eth_dev_set_vlan_offload is updated to return the
value provided by the vector when called along with restoring
the original offload configs on failure.

Existing vlan_offload_set_t vectors are modified to return
an int.  Majority of cases return 0 but a few that actually
can fail now return their failure codes.

Finally, a vlan_offload_set_t vector is added to virtio
to facilitate dynamically turning VLAN strip on or off.

Signed-off-by: David Harton <dharton@cisco.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
19 files changed:
doc/guides/rel_notes/release_17_11.rst
drivers/net/avp/avp_ethdev.c
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/dpaa2/dpaa2_ethdev.c
drivers/net/e1000/em_ethdev.c
drivers/net/e1000/igb_ethdev.c
drivers/net/enic/enic_ethdev.c
drivers/net/fm10k/fm10k_ethdev.c
drivers/net/i40e/i40e_ethdev.c
drivers/net/i40e/i40e_ethdev_vf.c
drivers/net/ixgbe/ixgbe_ethdev.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_vlan.c
drivers/net/nfp/nfp_net.c
drivers/net/qede/qede_ethdev.c
drivers/net/virtio/virtio_ethdev.c
drivers/net/vmxnet3/vmxnet3_ethdev.c
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev.h