On 02.11.2018 1:31, Ian Stokes wrote:
> 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.")
> Co-authored-by: Flavio Leitner <[email protected]>
> Signed-off-by: Flavio Leitner <[email protected]>
> Signed-off-by: Ian Stokes <[email protected]>
> ---
>
> v1 -> v2
> * Moved link speed comment to apply to all of link feature statement.
> * Remove reference to enum ofp_port_features in link feature comment.
> * Moved else if to same line as bracket from previous if statement.
> * Added Co-author and Sign-Off for Flavio.
> ---
> lib/netdev-dpdk.c | 64
> +++++++++++++++++++++++++++++++++----------------------
> 1 file changed, 39 insertions(+), 25 deletions(-)
>
Minor thing is that you could add a period to the end of a comment
to match with the coding-style.
Acked-by: Ilya Maximets <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev