[ovs-dev] [PATCH ovs V2 21/21] netdev-vport: use common offloads interface

Paul Blakey paulb at mellanox.com
Sun Dec 25 11:39:49 UTC 2016


netdev vports are backed by actualy netdev at the kernel
level, so they can use the common netdev-tc offloads interface
for flow offloading (if enabled).

Signed-off-by: Paul Blakey <paulb at mellanox.com>
Reviewed-by: Roi Dayan <roid at mellanox.com>
---
 lib/netdev-vport.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 04c9d62..4127ace 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -44,6 +44,7 @@
 #include "unaligned.h"
 #include "unixctl.h"
 #include "openvswitch/vlog.h"
+#include "netdev-tc-offloads.h"
 
 VLOG_DEFINE_THIS_MODULE(netdev_vport);
 
@@ -838,14 +839,14 @@ netdev_vport_get_ifindex(const struct netdev *netdev_)
     NULL,                   /* rx_wait */                   \
     NULL,                   /* rx_drain */                  \
                                                             \
-    NULL,                   /* flow_flush */                \
-    NULL,                   /* flow_dump_create */          \
-    NULL,                   /* flow_dump_destroy */         \
-    NULL,                   /* flow_dump_next */            \
-    NULL,                   /* flow_put */                  \
-    NULL,                   /* flow_get */                  \
-    NULL,                   /* flow_del */                  \
-    NULL,                   /* init_flow_api */
+    netdev_tc_flow_flush,                                   \
+    netdev_tc_flow_dump_create,                             \
+    netdev_tc_flow_dump_destroy,                            \
+    netdev_tc_flow_dump_next,                               \
+    netdev_tc_flow_put,                                     \
+    netdev_tc_flow_get,                                     \
+    netdev_tc_flow_del,                                     \
+    netdev_tc_init_flow_api,
 
 
 #define TUNNEL_CLASS(NAME, DPIF_PORT, BUILD_HEADER, PUSH_HEADER, POP_HEADER)   \
-- 
1.8.3.1



More information about the dev mailing list