mbox series

[0/2] ethdev: change xstats reset function return value to int

Message ID 1567780495-14120-1-git-send-email-arybchenko@solarflare.com (mailing list archive)
Headers
Series ethdev: change xstats reset function return value to int |

Message

Andrew Rybchenko Sept. 6, 2019, 2:34 p.m. UTC
  It is the third patch series to get rid of void returning functions
in ethdev in accordance with deprecation notice [1].

It should be applied on top of the first [2] and the second [3].
It could be applied separately, but few simple conflicts should
be resolved.

Functions which return void are bad since they do not provide explicit
information to the caller if everything is OK or not.
It is especially painful in the case of promiscuous mode since it is
not always supported, there are real cases when it fails to apply and
it affects traffic which is received by the port.

Driver maintainrs are encouraged to review the patch which changes
driver callbacks prototype.

[1] https://patches.dpdk.org/patch/56969/
[2] https://patches.dpdk.org/project/dpdk/list/?series=6222
[3] https://patches.dpdk.org/project/dpdk/list/?series=6264

Igor Romanov (2):
  ethdev: change xstats reset function return value to int
  ethdev: make stats and xstats reset callbacks return int

 app/proc-info/main.c                      | 10 +++++-
 app/test-pmd/config.c                     |  8 ++++-
 app/test/virtual_pmd.c                    |  4 ++-
 doc/guides/rel_notes/deprecation.rst      |  1 -
 doc/guides/rel_notes/release_19_11.rst    |  3 ++
 drivers/net/af_packet/rte_eth_af_packet.c |  4 ++-
 drivers/net/af_xdp/rte_eth_af_xdp.c       |  4 ++-
 drivers/net/ark/ark_ethdev.c              |  6 ++--
 drivers/net/atlantic/atl_ethdev.c         |  6 ++--
 drivers/net/avp/avp_ethdev.c              |  6 ++--
 drivers/net/axgbe/axgbe_ethdev.c          |  6 ++--
 drivers/net/bnxt/bnxt_stats.c             | 38 +++++++++++++++++------
 drivers/net/bnxt/bnxt_stats.h             |  4 +--
 drivers/net/bonding/rte_eth_bond_pmd.c    | 13 ++++++--
 drivers/net/cxgbe/cxgbe_ethdev.c          |  4 ++-
 drivers/net/dpaa/dpaa_ethdev.c            |  4 ++-
 drivers/net/dpaa2/dpaa2_ethdev.c          | 10 +++---
 drivers/net/e1000/em_ethdev.c             |  6 ++--
 drivers/net/e1000/igb_ethdev.c            | 18 +++++++----
 drivers/net/enetc/enetc_ethdev.c          |  4 ++-
 drivers/net/enic/enic.h                   |  2 +-
 drivers/net/enic/enic_ethdev.c            |  4 +--
 drivers/net/enic/enic_main.c              | 11 +++++--
 drivers/net/failsafe/failsafe_ops.c       | 16 ++++++++--
 drivers/net/fm10k/fm10k_ethdev.c          | 10 ++++--
 drivers/net/hinic/base/hinic_pmd_niccfg.c | 14 ++++++---
 drivers/net/hinic/base/hinic_pmd_niccfg.h |  4 +--
 drivers/net/hinic/hinic_pmd_ethdev.c      | 25 +++++++++++----
 drivers/net/i40e/i40e_ethdev.c            |  6 ++--
 drivers/net/i40e/i40e_ethdev_vf.c         |  6 ++--
 drivers/net/i40e/i40e_vf_representor.c    |  4 +--
 drivers/net/iavf/iavf_ethdev.c            | 11 ++++---
 drivers/net/ice/ice_ethdev.c              |  6 ++--
 drivers/net/ipn3ke/ipn3ke_representor.c   | 14 +++++----
 drivers/net/ixgbe/ixgbe_ethdev.c          | 18 +++++++----
 drivers/net/kni/rte_eth_kni.c             |  4 ++-
 drivers/net/liquidio/lio_ethdev.c         | 23 ++++++++------
 drivers/net/memif/rte_eth_memif.c         |  4 ++-
 drivers/net/mlx4/mlx4.h                   |  2 +-
 drivers/net/mlx4/mlx4_ethdev.c            |  7 ++++-
 drivers/net/mlx5/mlx5.h                   |  4 +--
 drivers/net/mlx5/mlx5_stats.c             | 19 +++++++++---
 drivers/net/mvneta/mvneta_ethdev.c        | 11 +++++--
 drivers/net/mvpp2/mrvl_ethdev.c           | 16 +++++++---
 drivers/net/netvsc/hn_ethdev.c            | 15 ++++++---
 drivers/net/netvsc/hn_var.h               |  4 +--
 drivers/net/netvsc/hn_vf.c                | 13 +++++---
 drivers/net/nfp/nfp_net.c                 |  6 ++--
 drivers/net/null/rte_eth_null.c           |  6 ++--
 drivers/net/octeontx/octeontx_ethdev.c    |  8 ++---
 drivers/net/octeontx2/otx2_ethdev.h       |  4 +--
 drivers/net/octeontx2/otx2_stats.c        | 33 +++++++++++++-------
 drivers/net/pcap/rte_eth_pcap.c           |  4 ++-
 drivers/net/qede/qede_ethdev.c            |  8 +++--
 drivers/net/ring/rte_eth_ring.c           |  4 ++-
 drivers/net/sfc/sfc_ethdev.c              |  7 +++--
 drivers/net/szedata2/rte_eth_szedata2.c   |  4 ++-
 drivers/net/tap/rte_eth_tap.c             |  4 ++-
 drivers/net/thunderx/nicvf_ethdev.c       | 13 ++++++--
 drivers/net/vhost/rte_eth_vhost.c         |  8 +++--
 drivers/net/virtio/virtio_ethdev.c        |  6 ++--
 drivers/net/vmxnet3/vmxnet3_ethdev.c      |  6 ++--
 lib/librte_ethdev/rte_ethdev.c            | 18 ++++++-----
 lib/librte_ethdev/rte_ethdev.h            |  9 +++++-
 lib/librte_ethdev/rte_ethdev_core.h       |  4 +--
 65 files changed, 408 insertions(+), 176 deletions(-)
  

Comments

Ferruh Yigit Sept. 24, 2019, 11:56 a.m. UTC | #1
On 9/6/2019 3:34 PM, Andrew Rybchenko wrote:
> It is the third patch series to get rid of void returning functions
> in ethdev in accordance with deprecation notice [1].
> 
> It should be applied on top of the first [2] and the second [3].
> It could be applied separately, but few simple conflicts should
> be resolved.
> 
> Functions which return void are bad since they do not provide explicit
> information to the caller if everything is OK or not.
> It is especially painful in the case of promiscuous mode since it is
> not always supported, there are real cases when it fails to apply and
> it affects traffic which is received by the port.
> 
> Driver maintainrs are encouraged to review the patch which changes
> driver callbacks prototype.
> 
> [1] https://patches.dpdk.org/patch/56969/
> [2] https://patches.dpdk.org/project/dpdk/list/?series=6222
> [3] https://patches.dpdk.org/project/dpdk/list/?series=6264
> 
> Igor Romanov (2):
>   ethdev: change xstats reset function return value to int
>   ethdev: make stats and xstats reset callbacks return int

For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Series applied to dpdk-next-net/master, thanks.