DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 0/7] ethdev: change allmulticast controls to return status
@ 2019-09-24 12:56 Andrew Rybchenko
  2019-09-24 12:56 ` [dpdk-dev] [PATCH v2 1/7] ethdev: change allmulticast mode API to return errors Andrew Rybchenko
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Andrew Rybchenko @ 2019-09-24 12:56 UTC (permalink / raw)
  To: Thomas Monjalon, Ferruh Yigit, Rasesh Mody, Shahed Shaikh, Wenzhuo Lu
  Cc: dev, Ivan Ilchenko

m>
References: <1568031190-16510-1-git-send-email-arybchenko@solarflare.co
m>

It is the fourth patch series to get rid of void returning functions
in ethdev in accordance with deprecation notice [1].

It should be applied on top of [2], [3] and [4] which are already
accepted in dpdk-next-net.

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 all-multicast 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. Changes are not always trivial when I tried
to provide real status of the operation. I used -EAGAIN when I failed
to choose better error code.

The following two drivers ignore status of internal functions and
definitely could be improved:

net/bnx2x: bnx2x_set_rx_mode() can report failure, but it is used in
other places and should be updated carefully.

net/igbvf: e1000_promisc_set_vf() provides return status, but it is
unclear how handle it properly.

[1] https://patches.dpdk.org/patch/56969/
[2] https://patches.dpdk.org/project/dpdk/list/?series=6391
[3] https://patches.dpdk.org/project/dpdk/list/?series=6407
[4] https://patches.dpdk.org/project/dpdk/list/?series=6308

v2:
 - add documentation for enable/disable callbacks
 - apply eth_err() to callback return status in
   rte_eth_dev_config_restore()
 - do not check callback vs NULL if settings match
 - reword logs in net/failsafe in accordance with review notes
 - use -E_RTE_SECONDARY in net/enic as requested in review notes
 - add acks
 - rebase

Andrew Rybchenko (1):
  ethdev: do nothing if all-multicast mode is applied again

Ivan Ilchenko (6):
  ethdev: change allmulticast mode API to return errors
  net/failsafe: check code of allmulticast mode switch
  net/bonding: check code of allmulticast mode switch
  ethdev: change allmulticast callbacks to return status
  app/testpmd: check code of allmulticast mode switch
  examples/ipv4_multicast: check allmulticast enable status

 app/test-pmd/cmdline.c                    | 10 +---
 app/test-pmd/testpmd.h                    |  1 +
 app/test-pmd/util.c                       | 16 ++++++
 doc/guides/rel_notes/deprecation.rst      |  1 -
 doc/guides/rel_notes/release_19_11.rst    |  4 ++
 drivers/net/atlantic/atl_ethdev.c         | 14 +++--
 drivers/net/axgbe/axgbe_ethdev.c          | 16 ++++--
 drivers/net/bnx2x/bnx2x_ethdev.c          |  8 ++-
 drivers/net/bnxt/bnxt_ethdev.c            | 26 +++++++--
 drivers/net/bonding/rte_eth_bond_8023ad.c | 13 ++++-
 drivers/net/bonding/rte_eth_bond_pmd.c    | 67 ++++++++++++++++++++---
 drivers/net/cxgbe/cxgbe_ethdev.c          | 12 ++--
 drivers/net/cxgbe/cxgbe_pfvf.h            |  4 +-
 drivers/net/dpaa/dpaa_ethdev.c            |  8 ++-
 drivers/net/dpaa2/dpaa2_ethdev.c          | 14 +++--
 drivers/net/e1000/em_ethdev.c             | 14 +++--
 drivers/net/e1000/igb_ethdev.c            | 26 ++++++---
 drivers/net/enetc/enetc_ethdev.c          | 10 +++-
 drivers/net/enic/enic_ethdev.c            | 22 ++++++--
 drivers/net/failsafe/failsafe_ether.c     |  8 ++-
 drivers/net/failsafe/failsafe_ops.c       | 52 ++++++++++++++++--
 drivers/net/fm10k/fm10k_ethdev.c          | 28 ++++++----
 drivers/net/i40e/i40e_ethdev.c            | 22 +++++---
 drivers/net/i40e/i40e_ethdev_vf.c         | 20 +++++--
 drivers/net/i40e/i40e_vf_representor.c    |  8 +--
 drivers/net/iavf/iavf_ethdev.c            | 20 +++++--
 drivers/net/ice/ice_ethdev.c              | 30 +++++++---
 drivers/net/ipn3ke/ipn3ke_ethdev.h        |  4 +-
 drivers/net/ipn3ke/ipn3ke_representor.c   |  8 ++-
 drivers/net/ixgbe/ixgbe_ethdev.c          | 53 ++++++++++++++----
 drivers/net/liquidio/lio_ethdev.c         | 12 ++--
 drivers/net/mlx4/mlx4.h                   |  4 +-
 drivers/net/mlx4/mlx4_ethdev.c            | 14 +++--
 drivers/net/mlx5/mlx5.h                   |  4 +-
 drivers/net/mlx5/mlx5_rxmode.c            | 38 ++++++++++---
 drivers/net/mvpp2/mrvl_ethdev.c           | 28 +++++++---
 drivers/net/netvsc/hn_ethdev.c            |  8 +--
 drivers/net/netvsc/hn_var.h               |  4 +-
 drivers/net/netvsc/hn_vf.c                |  8 +--
 drivers/net/nfb/nfb_rxmode.c              | 10 +++-
 drivers/net/nfb/nfb_rxmode.h              |  8 ++-
 drivers/net/octeontx2/otx2_ethdev.h       |  4 +-
 drivers/net/octeontx2/otx2_ethdev_ops.c   |  8 ++-
 drivers/net/qede/qede_ethdev.c            | 17 ++++--
 drivers/net/sfc/sfc_ethdev.c              |  8 +--
 drivers/net/szedata2/rte_eth_szedata2.c   |  6 +-
 drivers/net/tap/rte_eth_tap.c             | 52 ++++++++++++++----
 drivers/net/virtio/virtio_ethdev.c        | 24 +++++---
 drivers/net/vmxnet3/vmxnet3_ethdev.c      | 12 ++--
 examples/ipv4_multicast/main.c            |  6 +-
 lib/librte_ethdev/rte_ethdev.c            | 61 ++++++++++++++++-----
 lib/librte_ethdev/rte_ethdev.h            | 14 ++++-
 lib/librte_ethdev/rte_ethdev_core.h       | 52 ++++++++++++++++--
 53 files changed, 701 insertions(+), 240 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-09-26  7:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 12:56 [dpdk-dev] [PATCH v2 0/7] ethdev: change allmulticast controls to return status Andrew Rybchenko
2019-09-24 12:56 ` [dpdk-dev] [PATCH v2 1/7] ethdev: change allmulticast mode API to return errors Andrew Rybchenko
2019-09-24 12:56 ` [dpdk-dev] [PATCH v2 2/7] net/failsafe: check code of allmulticast mode switch Andrew Rybchenko
2019-09-24 12:56 ` [dpdk-dev] [PATCH v2 3/7] net/bonding: " Andrew Rybchenko
2019-09-24 12:56 ` [dpdk-dev] [PATCH v2 4/7] ethdev: change allmulticast callbacks to return status Andrew Rybchenko
2019-09-26  2:00   ` Yang, Qiming
2019-09-26  7:41     ` Ferruh Yigit
2019-09-24 12:56 ` [dpdk-dev] [PATCH v2 5/7] ethdev: do nothing if all-multicast mode is applied again Andrew Rybchenko
2019-09-24 12:56 ` [dpdk-dev] [PATCH v2 6/7] app/testpmd: check code of allmulticast mode switch Andrew Rybchenko
2019-09-24 12:56 ` [dpdk-dev] [PATCH v2 7/7] examples/ipv4_multicast: check allmulticast enable status Andrew Rybchenko
2019-09-24 16:41 ` [dpdk-dev] [PATCH v2 0/7] ethdev: change allmulticast controls to return status Ferruh Yigit

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