[ovs-git] [openvswitch/ovs] f627cf: netdev-afxdp: Fix use of unconfigured device.

Ilya Maximets noreply at github.com
Tue Jul 23 07:54:47 UTC 2019

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: f627cf1dd922bb644b6480bfbda67a9460cb2947
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2019-07-23 (Tue, 23 Jul 2019)

  Changed paths:
    M lib/netdev-afxdp.c
    M lib/netdev-afxdp.h
    M lib/netdev-linux-private.h
    M lib/netdev-linux.c

  Log Message:
  netdev-afxdp: Fix use of unconfigured device.

In case of failure of 'xsk_configure_all()', 'n_rxq' and 'xdpmode'
will remain in a new state. This will result in successful
reconfiguration (immediate return, because configuration is already
applied) if 'netdev_reconfigure()' will be called again.

Same issue was fixed previously for netdev-dpdk using 'dev->started'
flag in commit:
606f66507250 ("netdev-dpdk: Don't use PMD driver if not configured successfully")

Let's use similar approach with checking the 'dev->xsks' which only
exists if configuration was successful.

Additionally implemented 'netdev_afxdp_construct()' function to
explicitly initialize all the specific fields and request the

CC: William Tu <u9012063 at gmail.com>
Fixes: 0de1b425962d ("netdev-afxdp: add new netdev type for AF_XDP.")
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>

More information about the git mailing list