2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

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 <david.marchand@redhat.com>
Co-authored-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
Co-authored-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Eli Britstein <elibr@nvidia.com>
Co-authored-by: Eli Britstein <elibr@nvidia.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Govindharajan, Hariprasad <hariprasad.govindharajan@intel.com>
Tested-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
Ian Stokes
2020-12-15 16:41:28 +00:00
parent af06184705
commit 252e1e5764
19 changed files with 219 additions and 147 deletions

View File

@@ -26,12 +26,6 @@
#include <sys/socket.h>
#include <linux/if.h>
/* 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 <rte_compat.h>
#include <rte_bus_pci.h>
#include <rte_config.h>
#include <rte_cycles.h>
@@ -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) {