Example applications have hardcoded numbers for Rx/Tx descriptors.
If PMD does not support these values, example application simply fails.
PMD provides the information about supported number of Rx/Tx descriptors
in dev_info and applications have everything required.

I think it would be good if example applications work in more cases.

Possible solutions are:
 1. duplicate adjustment code in all example applications
 2. add helper function and use it in all example applications (I think
    it might be useful for many DPDK applications)

The patch series suggests to go the second way, but updates only one
example application only. If it is accepted, we'll update all related
example applications to use the helper function.

Roman Zhukov (2):
  ethdev: add function to adjust number of descriptors
  examples/l3fwd: add check of Rx and Tx descriptors number

 examples/l3fwd/main.c                  | 11 ++++++++--
 lib/librte_ether/rte_ethdev.c          | 37 ++++++++++++++++++++++++++++++++++
 lib/librte_ether/rte_ethdev.h          | 20 ++++++++++++++++++
 lib/librte_ether/rte_ether_version.map |  7 +++++++
 4 files changed, 73 insertions(+), 2 deletions(-)

-- 
2.9.3

Reply via email to