2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

netdev-offload: Disallow offloading to unrelated tunneling vports.

'linux_tc' flow API suitable only for tunneling vports with backing
linux interfaces. DPDK flow API is not suitable for such ports.

With this change we could drop vport restriction from dpif-netdev.

This is a prerequisite for enabling vport offloading in DPDK.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Eli Britstein <elibr@nvidia.com>
Reviewed-by: Gaetan Rivet <gaetanr@nvidia.com>
Acked-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Tested-by: Emma Finn <emma.finn@intel.com>
Tested-by: Marko Kovacevic <marko.kovacevic@intel.com>
This commit is contained in:
Ilya Maximets
2021-06-23 15:52:47 +00:00
parent 6a855d3e71
commit a1ec428037
3 changed files with 17 additions and 2 deletions

View File

@@ -24,6 +24,7 @@
#include "dpif-netdev.h"
#include "netdev-offload-provider.h"
#include "netdev-provider.h"
#include "netdev-vport.h"
#include "openvswitch/match.h"
#include "openvswitch/vlog.h"
#include "packets.h"
@@ -1523,6 +1524,13 @@ netdev_offload_dpdk_flow_del(struct netdev *netdev OVS_UNUSED,
static int
netdev_offload_dpdk_init_flow_api(struct netdev *netdev)
{
if (netdev_vport_is_vport_class(netdev->netdev_class)
&& !strcmp(netdev_get_dpif_type(netdev), "system")) {
VLOG_DBG("%s: vport belongs to the system datapath. Skipping.",
netdev_get_name(netdev));
return EOPNOTSUPP;
}
return netdev_dpdk_flow_api_supported(netdev) ? 0 : EOPNOTSUPP;
}