Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netdev-dpdk: Fix netdev_dpdk_get_features().
This commit fixes netdev_dpdk_get_features() by initializing a bitmap that represents current features to zero and accounting for non defined link speed values in the OpenFlow spec. The current approach for retrieving netdev dpdk features uses a pointer allocated in the stack without being initialized. As such there is no guarantee that the bitmap will be accurate. Fix this by declaring and initializing local variable 'feature' to be used when building the bitmap, with its value then assigned to the pointer. Also account for link speeds not defined in the OpenFlow spec by defaulting to NETDEV_F_OTHER for undefined link speeds. Fixes: 8a9562d ("dpif-netdev: Add DPDK netdev.") Acked-by: Ilya Maximets <i.maximets@samsung.com> Co-authored-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
- Loading branch information