4c50e2f6bf
This change is to make user code simpler. For PMDs which do not fill any packet types, return 0 instead of -ENOTSUP as suggested by Bruce. Usually, users only care if the required (by ptype_mask) ptypes can be filled by the specified PMD. If the PMD implements dev_supported_ptypes_get func is not important. And the introduce of another return value (-ENOTSUP) would increase the complexity of user programs to check it. Besides, there are ways to know if a PMD implements the func: a. see doc/guides/nics/overview.rst. b. use (~1) as parameter ptype_mask, then check if return 0. Fixes: 78a38edf66de ("ethdev: query supported packet types") Suggested-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD license for the core libraries and drivers. The kernel components are GPLv2 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%