[dpdk-dev] [PATCH v2 00/13] ethdev: change promiscuous mode functions to return status

Ferruh Yigit ferruh.yigit at intel.com
Fri Sep 13 18:37:37 CEST 2019


On 9/9/2019 12:58 PM, Andrew Rybchenko wrote:
> 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=6279
> 
> v2:
>  - minor style fix in app/testpmd
>  - use fs_err() in net/failsafe in accordance with review from Gaetan
>  - fix net/mvpp2 build
>  - use eth_err() in ethdev
> 
> 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

I would like to get these API changes as early as possible, way before rc1 so
that there can be time to fix trivial issues, also before other driver patches
to prevent conflicts and new versions in these big patches.

Please help on reviewing your bits in these sets [1] so we can close them early.


[1]
* ethdev: change promiscuous mode functions to return status [This set]
  https://patches.dpdk.org/project/dpdk/list/?series=6334

* ethdev: change allmulticast controls to return status
  https://patches.dpdk.org/project/dpdk/list/?series=6335

* ethdev: change xstats reset function return value to int
  https://patches.dpdk.org/project/dpdk/list/?series=6308

* ethdev: change link status get functions return value to int
  https://patches.dpdk.org/project/dpdk/list/?series=6350

* ethdev: change MAC addr get function return value to int
  https://patches.dpdk.org/project/dpdk/list/?series=6355


More information about the dev mailing list