[ovs-git] [openvswitch/ovs] cbff26: netdev-afxdp: Fix use of unconfigured device.
Ilya Maximets
noreply at github.com
Tue Jul 23 07:55:52 UTC 2019
Branch: refs/heads/branch-2.12
Home: https://github.com/openvswitch/ovs
Commit: cbff264a084abdf903a759efbf5dffd9f1767cae
https://github.com/openvswitch/ovs/commit/cbff264a084abdf903a759efbf5dffd9f1767cae
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
reconfiguration.
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