DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/13] ethdev: change promiscuous mode functions to return status
@ 2019-09-05 16:10 Andrew Rybchenko
  2019-09-05 16:10 ` [dpdk-dev] [PATCH 01/13] ethdev: change promiscuous mode controllers to return errors Andrew Rybchenko
                   ` (14 more replies)
  0 siblings, 15 replies; 77+ messages in thread
From: Andrew Rybchenko @ 2019-09-05 16:10 UTC (permalink / raw)
  To: Thomas Monjalon, Ferruh Yigit, Rasesh Mody, Shahed Shaikh, Wenzhuo Lu
  Cc: dev, Ivan Ilchenko

It is the second 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 one [2].
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. 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=6222

Andrew Rybchenko (2):
  ethdev: change promiscuous callbacks to return status
  ethdev: do nothing if promiscuous mode is applied again

Ivan Ilchenko (11):
  ethdev: change promiscuous mode controllers to return errors
  net/failsafe: check code of promiscuous mode switch
  net/bonding: check code of promiscuous mode switch
  app/pipeline: check code of promiscuous mode switch
  app/testpmd: check code of promiscuous mode switch
  app/eventdev: check code of promiscuous mode switch
  app/pdump: check code of promiscuous mode switch
  app/test: check code of promiscuous mode switch
  kni: check code of promiscuous mode switch
  test/bonding: check code of promiscuous mode switch
  examples: take promiscuous mode switch result into account

 app/pdump/main.c                              |  8 +-
 app/test-eventdev/test_perf_common.c          |  7 +-
 app/test-eventdev/test_pipeline_common.c      |  7 +-
 app/test-pipeline/init.c                      |  5 +-
 app/test-pmd/cmdline.c                        | 23 +++---
 app/test-pmd/testpmd.c                        | 14 +++-
 app/test-pmd/testpmd.h                        |  2 +
 app/test-pmd/util.c                           | 16 ++++
 app/test/test_event_eth_rx_adapter.c          |  4 +-
 app/test/test_event_eth_tx_adapter.c          |  4 +-
 app/test/test_kni.c                           |  7 +-
 app/test/test_link_bonding.c                  | 55 +++++++++++---
 app/test/test_link_bonding_mode4.c            | 16 +++-
 app/test/test_pmd_perf.c                      |  6 +-
 app/test/virtual_pmd.c                        | 12 ++-
 doc/guides/rel_notes/deprecation.rst          |  1 -
 doc/guides/rel_notes/release_19_11.rst        |  4 +
 doc/guides/sample_app_ug/flow_classify.rst    |  6 +-
 doc/guides/sample_app_ug/flow_filtering.rst   | 15 +++-
 doc/guides/sample_app_ug/rxtx_callbacks.rst   |  5 +-
 doc/guides/sample_app_ug/skeleton.rst         |  6 +-
 drivers/net/af_packet/rte_eth_af_packet.c     | 22 ++++--
 drivers/net/af_xdp/rte_eth_af_xdp.c           | 20 +++--
 drivers/net/atlantic/atl_ethdev.c             | 12 ++-
 drivers/net/avp/avp_ethdev.c                  | 12 ++-
 drivers/net/axgbe/axgbe_ethdev.c              | 12 ++-
 drivers/net/bnx2x/bnx2x_ethdev.c              |  8 +-
 drivers/net/bnxt/bnxt_ethdev.c                | 26 +++++--
 drivers/net/bonding/rte_eth_bond_8023ad.c     | 17 ++++-
 drivers/net/bonding/rte_eth_bond_pmd.c        | 74 +++++++++++++++---
 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              | 12 ++-
 drivers/net/e1000/em_ethdev.c                 | 12 ++-
 drivers/net/e1000/igb_ethdev.c                | 24 ++++--
 drivers/net/enetc/enetc_ethdev.c              |  8 +-
 drivers/net/enic/enic.h                       |  2 +-
 drivers/net/enic/enic_ethdev.c                | 22 ++++--
 drivers/net/enic/enic_main.c                  |  4 +-
 drivers/net/failsafe/failsafe_ether.c         |  8 +-
 drivers/net/failsafe/failsafe_ops.c           | 48 ++++++++++--
 drivers/net/fm10k/fm10k_ethdev.c              | 24 ++++--
 drivers/net/hinic/hinic_pmd_ethdev.c          | 16 +++-
 drivers/net/i40e/i40e_ethdev.c                | 35 ++++++---
 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                  | 27 +++++--
 drivers/net/ipn3ke/ipn3ke_ethdev.h            |  4 +-
 drivers/net/ipn3ke/ipn3ke_representor.c       |  8 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              | 50 +++++++++---
 drivers/net/liquidio/lio_ethdev.c             | 30 +++++---
 drivers/net/mlx4/mlx4.h                       |  4 +-
 drivers/net/mlx4/mlx4_ethdev.c                | 24 ++++--
 drivers/net/mlx5/mlx5.h                       |  4 +-
 drivers/net/mlx5/mlx5_rxmode.c                | 40 ++++++++--
 drivers/net/mvneta/mvneta_ethdev.c            | 22 ++++--
 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                    | 22 +++++-
 drivers/net/nfb/nfb_rxmode.c                  | 10 ++-
 drivers/net/nfb/nfb_rxmode.h                  |  8 +-
 drivers/net/nfp/nfp_net.c                     | 30 +++++---
 drivers/net/octeontx/octeontx_ethdev.c        | 16 ++--
 drivers/net/octeontx2/otx2_ethdev.h           |  4 +-
 drivers/net/octeontx2/otx2_ethdev_ops.c       |  8 +-
 drivers/net/qede/qede_ethdev.c                | 16 ++--
 drivers/net/sfc/sfc_ethdev.c                  | 14 ++--
 drivers/net/szedata2/rte_eth_szedata2.c       |  6 +-
 drivers/net/tap/rte_eth_tap.c                 | 52 ++++++++++---
 drivers/net/thunderx/nicvf_ethdev.c           |  3 +-
 drivers/net/virtio/virtio_ethdev.c            | 24 ++++--
 drivers/net/vmxnet3/vmxnet3_ethdev.c          | 12 ++-
 examples/bbdev_app/main.c                     |  7 +-
 examples/bond/main.c                          |  8 +-
 examples/distributor/main.c                   |  4 +-
 examples/eventdev_pipeline/main.c             |  4 +-
 examples/exception_path/main.c                |  5 +-
 examples/flow_classify/flow_classify.c        |  4 +-
 examples/flow_filtering/main.c                |  7 +-
 examples/ip_fragmentation/main.c              |  6 +-
 examples/ip_pipeline/link.c                   |  7 +-
 examples/ip_reassembly/main.c                 |  6 +-
 examples/ipsec-secgw/ipsec-secgw.c            |  9 ++-
 examples/kni/main.c                           |  9 ++-
 examples/l2fwd-cat/l2fwd-cat.c                |  4 +-
 examples/l2fwd-crypto/main.c                  |  7 +-
 examples/l2fwd-jobstats/main.c                |  9 ++-
 examples/l2fwd-keepalive/main.c               |  6 +-
 examples/l2fwd/main.c                         |  6 +-
 examples/l3fwd-acl/main.c                     |  9 ++-
 examples/l3fwd-power/main.c                   |  9 ++-
 examples/l3fwd/main.c                         |  9 ++-
 examples/link_status_interrupt/main.c         |  6 +-
 examples/load_balancer/init.c                 |  6 +-
 .../client_server_mp/mp_server/init.c         |  4 +-
 examples/multi_process/symmetric_mp/main.c    |  4 +-
 examples/netmap_compat/bridge/bridge.c        |  6 +-
 examples/packet_ordering/main.c               |  4 +-
 .../performance-thread/l3fwd-thread/main.c    |  9 ++-
 examples/ptpclient/ptpclient.c                |  7 +-
 examples/qos_meter/main.c                     | 12 ++-
 examples/qos_sched/init.c                     |  6 +-
 examples/quota_watermark/qw/init.c            |  6 +-
 examples/rxtx_callbacks/main.c                |  5 +-
 examples/server_node_efd/server/init.c        |  4 +-
 examples/skeleton/basicfwd.c                  |  4 +-
 examples/vhost/main.c                         | 11 ++-
 examples/vm_power_manager/main.c              |  4 +-
 lib/librte_ethdev/rte_ethdev.c                | 76 +++++++++++++++----
 lib/librte_ethdev/rte_ethdev.h                | 14 +++-
 lib/librte_ethdev/rte_ethdev_core.h           |  4 +-
 lib/librte_kni/rte_kni.c                      | 14 +++-
 115 files changed, 1152 insertions(+), 380 deletions(-)

-- 
2.17.1


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

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

Thread overview: 77+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 16:10 [dpdk-dev] [PATCH 00/13] ethdev: change promiscuous mode functions to return status Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 01/13] ethdev: change promiscuous mode controllers to return errors Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 02/13] net/failsafe: check code of promiscuous mode switch Andrew Rybchenko
2019-09-05 16:25   ` Gaëtan Rivet
2019-09-05 16:32     ` Andrew Rybchenko
2019-09-05 16:36   ` Stephen Hemminger
2019-09-05 16:38     ` Andrew Rybchenko
2019-09-06  9:24       ` Gaëtan Rivet
2019-09-06 10:08         ` Andrew Rybchenko
2019-09-05 16:40   ` Stephen Hemminger
2019-09-05 16:49     ` Andrew Rybchenko
2019-09-05 17:13       ` Stephen Hemminger
2019-09-05 16:10 ` [dpdk-dev] [PATCH 03/13] net/bonding: " Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 04/13] ethdev: change promiscuous callbacks to return status Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 05/13] ethdev: do nothing if promiscuous mode is applied again Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 06/13] app/pipeline: check code of promiscuous mode switch Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 07/13] app/testpmd: " Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 08/13] app/eventdev: " Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 09/13] app/pdump: " Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 10/13] app/test: " Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 11/13] kni: " Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 12/13] test/bonding: " Andrew Rybchenko
2019-09-05 16:10 ` [dpdk-dev] [PATCH 13/13] examples: take promiscuous mode switch result into account Andrew Rybchenko
2019-09-09 11:58 ` [dpdk-dev] [PATCH v2 00/13] ethdev: change promiscuous mode functions to return status Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 01/13] ethdev: change promiscuous mode controllers to return errors Andrew Rybchenko
2019-09-13 15:35     ` Ferruh Yigit
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 02/13] net/failsafe: check code of promiscuous mode switch Andrew Rybchenko
2019-09-09 12:48     ` Gaëtan Rivet
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 03/13] net/bonding: " Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 04/13] ethdev: change promiscuous callbacks to return status Andrew Rybchenko
2019-09-10  7:53     ` Matan Azrad
2019-09-13 21:05       ` Andrew Rybchenko
2019-09-11  8:46     ` Hyong Youb Kim (hyonkim)
2019-09-13 21:06       ` Andrew Rybchenko
2019-09-16  6:48         ` Hyong Youb Kim (hyonkim)
2019-09-13 15:34     ` Ferruh Yigit
2019-09-13 15:54       ` Andrew Rybchenko
2019-09-13 16:33         ` Ferruh Yigit
2019-09-13 15:39     ` Ferruh Yigit
2019-09-13 16:05       ` Andrew Rybchenko
2019-09-13 16:34         ` Ferruh Yigit
2019-09-13 19:57           ` Andrew Rybchenko
2019-09-16 13:22             ` Ferruh Yigit
2019-09-16 15:45               ` Andrew Rybchenko
2019-09-16 15:58                 ` Ferruh Yigit
2019-09-13 16:43     ` Ferruh Yigit
2019-09-13 20:33       ` Andrew Rybchenko
2019-09-13 16:56     ` Ferruh Yigit
2019-09-13 20:38       ` Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 05/13] ethdev: do nothing if promiscuous mode is applied again Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 06/13] app/pipeline: check code of promiscuous mode switch Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 07/13] app/testpmd: " Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 08/13] app/eventdev: " Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 09/13] app/pdump: " Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 10/13] app/test: " Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 11/13] kni: " Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 12/13] test/bonding: " Andrew Rybchenko
2019-09-09 11:58   ` [dpdk-dev] [PATCH v2 13/13] examples: take promiscuous mode switch result into account Andrew Rybchenko
2019-09-13 16:40     ` Ferruh Yigit
2019-09-13 18:30       ` Andrew Rybchenko
2019-09-13 16:37   ` [dpdk-dev] [PATCH v2 00/13] ethdev: change promiscuous mode functions to return status Ferruh Yigit
2019-09-14 11:37 ` [dpdk-dev] [PATCH v3 " Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 01/13] ethdev: change promiscuous mode controllers to return errors Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 02/13] net/failsafe: check code of promiscuous mode switch Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 03/13] net/bonding: " Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 04/13] ethdev: change promiscuous callbacks to return status Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 05/13] ethdev: do nothing if promiscuous mode is applied again Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 06/13] app/pipeline: check code of promiscuous mode switch Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 07/13] app/testpmd: " Andrew Rybchenko
2019-09-16 13:18     ` Iremonger, Bernard
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 08/13] app/eventdev: " Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 09/13] app/pdump: " Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 10/13] app/test: " Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 11/13] kni: " Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 12/13] test/bonding: " Andrew Rybchenko
2019-09-14 11:37   ` [dpdk-dev] [PATCH v3 13/13] examples: take promiscuous mode switch result into account Andrew Rybchenko
2019-09-24  7:31   ` [dpdk-dev] [PATCH v3 00/13] ethdev: change promiscuous mode functions 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).