@@ -2437,8 +2437,7 @@ dp_netdev_flow_offload_put(struct dp_flow_offload_item *offload)
info.flow_mark = mark;
port = netdev_ports_get(in_port, dpif_type_str);
- if (!port || netdev_vport_is_vport_class(port->netdev_class)) {
- netdev_close(port);
+ if (!port) {
goto err_free;
}
/* Taking a global 'port_mutex' to fulfill thread safety restrictions for
@@ -22,6 +22,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"
@@ -1224,6 +1225,13 @@ netdev_offload_dpdk_flow_del(struct netdev *netdev, const ovs_u128 *ufid,
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;
}
@@ -31,6 +31,7 @@
#include "netdev-linux.h"
#include "netdev-offload-provider.h"
#include "netdev-provider.h"
+#include "netdev-vport.h"
#include "netlink.h"
#include "netlink-socket.h"
#include "odp-netlink.h"
@@ -1905,6 +1906,13 @@ netdev_tc_init_flow_api(struct netdev *netdev)
int ifindex;
int error;
+ if (netdev_vport_is_vport_class(netdev->netdev_class)
+ && strcmp(netdev_get_dpif_type(netdev), "system")) {
+ VLOG_DBG("%s: vport doesn't belong to the system datapath. Skipping.",
+ netdev_get_name(netdev));
+ return EOPNOTSUPP;
+ }
+
ifindex = netdev_get_ifindex(netdev);
if (ifindex < 0) {
VLOG_INFO("init: failed to get ifindex for %s: %s",