Message ID | CAAbBHCcTXmX4YvOM=DWmkeDJ1tQMvCpJ74PdJCYLH+tijRNJew@mail.gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [ovs-dev] netdev: Fix to disable netdev flow offloading | expand |
On 05.06.2019 16:15, Cyprian Lech wrote: >>From e0d636846fcb37e6d0eeb93aeb1ad89fb392e126 Mon Sep 17 00:00:00 2001 > From: Cyprian Lech <clech@plume.com> > Date: Wed, 5 Jun 2019 14:20:08 +0200 > Subject: [PATCH] netdev: Fix to disable netdev flow offloading > > Netdev flow functions were called although > hw-offload was disabled, e.g. netdev_flow_dump_create. > > It fixes problem: > netlink_socket(revalidator5)|INFO|netlink dump request error (Operation not > supported) > > Fixes: 53611f7b05 ("other-config: Add hw-offload switch to control netdev > flow offloading") > Signed-off-by: Cyprian Lech <clech@plume.com> > --- Hi Cyprian. Thanks for your work! We have a different approach to fix this kind of issues by implementing dynamic assignment of offload API. You may take a look at the patches here: https://patchwork.ozlabs.org/project/openvswitch/list/?series=108029 I'm going to apply them soon. Best regards, Ilya Maximets.
diff --git a/lib/netdev.c b/lib/netdev.c index 45b50f26c..4f5147e6e 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -2154,6 +2154,10 @@ netdev_flow_flush(struct netdev *netdev) { const struct netdev_class *class = netdev->netdev_class; + if (!netdev_is_flow_api_enabled()) { + return EOPNOTSUPP; + } + return (class->flow_flush ? class->flow_flush(netdev) : EOPNOTSUPP); @@ -2164,6 +2168,10 @@ netdev_flow_dump_create(struct netdev *netdev, struct netdev_flow_dump **dump) { const struct netdev_class *class = netdev->netdev_class; + if (!netdev_is_flow_api_enabled()) { + return EOPNOTSUPP; + } + return (class->flow_dump_create ? class->flow_dump_create(netdev, dump)