From patchwork Sun Dec 25 11:39:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Blakey X-Patchwork-Id: 708703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tmgX816xtz9t17 for ; Sun, 25 Dec 2016 22:54:16 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 4E464AB9; Sun, 25 Dec 2016 11:48:11 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0B166B59 for ; Sun, 25 Dec 2016 11:48:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 77F0913E for ; Sun, 25 Dec 2016 11:48:00 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from paulb@mellanox.com) with ESMTPS (AES256-SHA encrypted); 25 Dec 2016 13:40:37 +0200 Received: from dev-r-vrt-176.mtr.labs.mlnx (dev-r-vrt-176.mtr.labs.mlnx [10.212.176.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id uBPBeXbL029898; Sun, 25 Dec 2016 13:40:36 +0200 From: Paul Blakey To: dev@openvswitch.org, Andy Gospodarek , Simon Horman , Jiri Pirko , John Fastabend , Lance Richardson , Marcelo Ricardo Leitner , Joe Stringer Date: Sun, 25 Dec 2016 13:39:49 +0200 Message-Id: <1482665989-791-22-git-send-email-paulb@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1482665989-791-1-git-send-email-paulb@mellanox.com> References: <1482665989-791-1-git-send-email-paulb@mellanox.com> X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Shahar Klein , Mark Bloch , Hadar Hen Zion , Rony Efraim , Or Gerlitz Subject: [ovs-dev] [PATCH ovs V2 21/21] netdev-vport: use common offloads interface X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Reviewed-by: Roi Dayan --- 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) \