From 252e1e5764439085e32f07695b45848a079ba4df Mon Sep 17 00:00:00 2001 From: Ian Stokes Date: Tue, 15 Dec 2020 16:41:28 +0000 Subject: dpdk: Update to use DPDK v20.11. This commit adds support for DPDK v20.11, it includes the following changes. 1. travis: Remove explicit DPDK kmods configuration. 2. sparse: Fix build with 20.05 DPDK tracepoints. 3. netdev-dpdk: Remove experimental API flag. http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216&state=* 4. sparse: Update to DPDK 20.05 trace point header. http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604&state=* 5. sparse: Fix build with DPDK 20.08. http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181&state=* 6. build: Add support for DPDK meson build. http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138&state=* 7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag. http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850&state=* 8. netdev-dpdk: Fix build with 20.11-rc1. http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006&state=* 9. sparse: Fix __ATOMIC_* redefinition errors http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452&state=* 10. build: Remove DPDK make build references. http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682&state=* For credit all authors of the original commits to 'dpdk-latest' with the above changes have been added as co-authors for this commit. Signed-off-by: David Marchand Co-authored-by: David Marchand Signed-off-by: Sunil Pai G Co-authored-by: Sunil Pai G Signed-off-by: Eli Britstein Co-authored-by: Eli Britstein Tested-by: Harry van Haaren Tested-by: Govindharajan, Hariprasad Tested-by: Tonghao Zhang Acked-by: Ilya Maximets Signed-off-by: Ian Stokes --- lib/netdev-dpdk.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'lib/netdev-dpdk.c') diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 75dffefb8..2640a421a 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -26,12 +26,6 @@ #include #include -/* Include rte_compat.h first to allow experimental API's needed for the - * rte_meter.h rfc4115 functions. Once they are no longer marked as - * experimental the #define and rte_compat.h include can be removed. - */ -#define ALLOW_EXPERIMENTAL_API -#include #include #include #include @@ -1312,7 +1306,7 @@ static int vhost_common_construct(struct netdev *netdev) OVS_REQUIRES(dpdk_mutex) { - int socket_id = rte_lcore_to_socket_id(rte_get_master_lcore()); + int socket_id = rte_lcore_to_socket_id(rte_get_main_lcore()); struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); dev->vhost_rxq_enabled = dpdk_rte_mzalloc(OVS_VHOST_MAX_QUEUE_NUM * @@ -1463,7 +1457,6 @@ netdev_dpdk_destruct(struct netdev *netdev) struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); struct rte_device *rte_dev; struct rte_eth_dev *eth_dev; - bool remove_on_close; ovs_mutex_lock(&dpdk_mutex); @@ -1475,20 +1468,15 @@ netdev_dpdk_destruct(struct netdev *netdev) * FIXME: avoid direct access to DPDK internal array rte_eth_devices. */ eth_dev = &rte_eth_devices[dev->port_id]; - remove_on_close = - eth_dev->data && - (eth_dev->data->dev_flags & RTE_ETH_DEV_CLOSE_REMOVE); rte_dev = eth_dev->device; /* Remove the eth device. */ rte_eth_dev_close(dev->port_id); - /* Remove this rte device and all its eth devices if flag - * RTE_ETH_DEV_CLOSE_REMOVE is not supported (which means representors - * are not supported), or if all the eth devices belonging to the rte - * device are closed. + /* Remove this rte device and all its eth devices if all the eth + * devices belonging to the rte device are closed. */ - if (!remove_on_close || !netdev_dpdk_get_num_ports(rte_dev)) { + if (!netdev_dpdk_get_num_ports(rte_dev)) { int ret = rte_dev_remove(rte_dev); if (ret < 0) { -- cgit v1.2.1