mbox series

[00/18] ethdev: change link status get functions return value to int

Message ID 1568103959-25572-1-git-send-email-arybchenko@solarflare.com (mailing list archive)
Headers
Series ethdev: change link status get functions return value to int |

Message

Andrew Rybchenko Sept. 10, 2019, 8:25 a.m. UTC
  It is the fifth 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], [4] and [5].

Functions which return void are bad since they do not provide explicit
information to the caller if everything is OK or not.

In the case of link info get it is important to know if link info is
filled in or not.

Unlike previous patch series for other functions, this one does not
touch link_update driver callback since it already has return value
with different semantics (which is not used in fact). May be negative
return values should be kept for errors and positive 1 should report
no link status changes. That's why only negative values are treated
as errors in the patch series.

[1] https://patches.dpdk.org/patch/56969/
[2] https://patches.dpdk.org/project/dpdk/list/?series=6279
[3] https://patches.dpdk.org/project/dpdk/list/?series=6334
[4] https://patches.dpdk.org/project/dpdk/list/?series=6335
[5] https://patches.dpdk.org/project/dpdk/list/?series=6308

Andrew Rybchenko (2):
  net/memif: check status of getting link info
  app/pipeline: check status of getting link info

Igor Romanov (16):
  net/bonding: fix link speed update in broadcast mode
  ethdev: change link status get functions return value to int
  app/testpmd: check status of getting link info
  net/bonding: check status of getting link info
  net/ixgbe: check status of getting link info
  app/proc-info: check status of getting link info
  app/test: check status of getting link info
  examples: check status of getting link info
  examples/bbdev_app: check status of getting link info
  examples/ip_pipeline: check status of getting link info
  examples/ethtool: check status of getting link info
  examples/flow_filtering: check status of getting link info
  examples/link_status_interrupt: check status of getting link
  examples/distributor: check status of getting link info
  examples/qos_sched: check status of getting link info
  examples/kni: check status of getting link info

 app/proc-info/main.c                          | 19 +++---
 app/test-pipeline/init.c                      | 11 +++-
 app/test-pmd/config.c                         | 13 +++-
 app/test-pmd/softnicfwd.c                     | 16 ++++-
 app/test-pmd/testpmd.c                        | 10 +++-
 app/test-pmd/testpmd.h                        |  1 +
 app/test-pmd/util.c                           | 14 +++++
 app/test/test_link_bonding.c                  | 12 +++-
 app/test/test_pmd_perf.c                      | 11 +++-
 app/test/test_pmd_ring.c                      |  8 ++-
 doc/guides/rel_notes/deprecation.rst          |  1 -
 doc/guides/rel_notes/release_19_11.rst        |  4 ++
 doc/guides/sample_app_ug/link_status_intr.rst |  9 ++-
 drivers/net/bonding/rte_eth_bond_8023ad.c     | 24 ++++++--
 drivers/net/bonding/rte_eth_bond_api.c        | 19 ++++--
 drivers/net/bonding/rte_eth_bond_pmd.c        | 59 ++++++++++++++++---
 drivers/net/ixgbe/ixgbe_ethdev.c              |  5 +-
 drivers/net/memif/rte_eth_memif.c             | 12 +++-
 examples/bbdev_app/main.c                     | 12 +++-
 examples/distributor/main.c                   | 14 +++--
 examples/ethtool/lib/rte_ethtool.c            |  6 +-
 examples/exception_path/main.c                | 10 +++-
 examples/flow_filtering/main.c                |  8 ++-
 examples/ip_fragmentation/main.c              | 10 +++-
 examples/ip_pipeline/cli.c                    |  9 ++-
 examples/ip_pipeline/link.c                   |  3 +-
 examples/ip_reassembly/main.c                 | 10 +++-
 examples/ipsec-secgw/ipsec-secgw.c            | 10 +++-
 examples/ipv4_multicast/main.c                | 10 +++-
 examples/kni/main.c                           | 19 +++++-
 examples/l2fwd-crypto/main.c                  | 10 +++-
 examples/l2fwd-jobstats/main.c                | 10 +++-
 examples/l2fwd-keepalive/main.c               | 10 +++-
 examples/l2fwd/main.c                         | 10 +++-
 examples/l3fwd-acl/main.c                     | 10 +++-
 examples/l3fwd-power/main.c                   | 10 +++-
 examples/l3fwd/main.c                         | 10 +++-
 examples/link_status_interrupt/main.c         | 26 ++++++--
 examples/load_balancer/init.c                 | 10 +++-
 .../client_server_mp/mp_server/init.c         | 10 +++-
 examples/multi_process/symmetric_mp/main.c    | 10 +++-
 .../performance-thread/l3fwd-thread/main.c    | 10 +++-
 examples/qos_sched/init.c                     | 13 +++-
 examples/server_node_efd/server/init.c        | 10 +++-
 examples/vm_power_manager/main.c              | 10 +++-
 lib/librte_ethdev/rte_ethdev.c                | 16 +++--
 lib/librte_ethdev/rte_ethdev.h                | 12 +++-
 47 files changed, 477 insertions(+), 89 deletions(-)
  

Comments

Ferruh Yigit Sept. 24, 2019, 12:38 p.m. UTC | #1
On 9/10/2019 9:25 AM, Andrew Rybchenko wrote:
> It is the fifth 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], [4] and [5].
> 
> Functions which return void are bad since they do not provide explicit
> information to the caller if everything is OK or not.
> 
> In the case of link info get it is important to know if link info is
> filled in or not.
> 
> Unlike previous patch series for other functions, this one does not
> touch link_update driver callback since it already has return value
> with different semantics (which is not used in fact). May be negative
> return values should be kept for errors and positive 1 should report
> no link status changes. That's why only negative values are treated
> as errors in the patch series.
> 
> [1] https://patches.dpdk.org/patch/56969/
> [2] https://patches.dpdk.org/project/dpdk/list/?series=6279
> [3] https://patches.dpdk.org/project/dpdk/list/?series=6334
> [4] https://patches.dpdk.org/project/dpdk/list/?series=6335
> [5] https://patches.dpdk.org/project/dpdk/list/?series=6308
> 
> Andrew Rybchenko (2):
>   net/memif: check status of getting link info
>   app/pipeline: check status of getting link info
> 
> Igor Romanov (16):
>   net/bonding: fix link speed update in broadcast mode
>   ethdev: change link status get functions return value to int
>   app/testpmd: check status of getting link info
>   net/bonding: check status of getting link info
>   net/ixgbe: check status of getting link info
>   app/proc-info: check status of getting link info
>   app/test: check status of getting link info
>   examples: check status of getting link info
>   examples/bbdev_app: check status of getting link info
>   examples/ip_pipeline: check status of getting link info
>   examples/ethtool: check status of getting link info
>   examples/flow_filtering: check status of getting link info
>   examples/link_status_interrupt: check status of getting link
>   examples/distributor: check status of getting link info
>   examples/qos_sched: check status of getting link info
>   examples/kni: check status of getting link info

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