[ovs-git] [openvswitch/ovs] 4f9af8: netdev-dpdk: Fix netdev_dpdk_get_features().

GitHub noreply at github.com
Fri Nov 2 20:04:58 UTC 2018


  Branch: refs/heads/branch-2.8
  Home:   https://github.com/openvswitch/ovs
  Commit: 4f9af89ac08b0386187b379a44a82981925d6a89
      https://github.com/openvswitch/ovs/commit/4f9af89ac08b0386187b379a44a82981925d6a89
  Author: Ian Stokes <ian.stokes at intel.com>
  Date:   2018-11-02 (Fri, 02 Nov 2018)

  Changed paths:
    M lib/netdev-dpdk.c

  Log Message:
  -----------
  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: 8a9562d21a40 ("dpif-netdev: Add DPDK netdev.")
Acked-by: Ilya Maximets <i.maximets at samsung.com>
Co-authored-by: Flavio Leitner <fbl at sysclose.org>
Signed-off-by: Flavio Leitner <fbl at sysclose.org>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>



      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list