From patchwork Tue Aug 8 14:03:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roi Dayan X-Patchwork-Id: 799199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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 3xRbn56wWWz9s7C for ; Wed, 9 Aug 2017 00:07:05 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id BDBC0A67; Tue, 8 Aug 2017 14:06:24 +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 EDAD0A7B for ; Tue, 8 Aug 2017 14:06:21 +0000 (UTC) X-Greylist: domain 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 A935C1BB for ; Tue, 8 Aug 2017 14:05:30 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from roid@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Aug 2017 17:03:15 +0300 Received: from dev-r-vrt-189.mtr.labs.mlnx (dev-r-vrt-189.mtr.labs.mlnx [10.212.189.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v78E3ESQ003209; Tue, 8 Aug 2017 17:03:14 +0300 From: Roi Dayan To: dev@openvswitch.org Date: Tue, 8 Aug 2017 17:03:12 +0300 Message-Id: <1502200992-56329-3-git-send-email-roid@mellanox.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1502200992-56329-1-git-send-email-roid@mellanox.com> References: <1502200992-56329-1-git-send-email-roid@mellanox.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Simon Horman Subject: [ovs-dev] [PATCH V3 2/2] netdev-vport: Always implement get_ifindex for netdev-vport 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 From: Paul Blakey Always implement get_ifindex without checking if offload is enabled or not as this should not be related. From ovs-dpctl we cannot tell if offload is enabled or not as other_config is not being read. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Ben Pfaff --- lib/netdev-vport.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index 64a3ba3..d11c5cc 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -857,7 +857,7 @@ get_pt_mode(const struct netdev *netdev) #ifdef __linux__ static int -netdev_vport_get_ifindex__(const struct netdev *netdev_) +netdev_vport_get_ifindex(const struct netdev *netdev_) { char buf[NETDEV_VPORT_NAME_BUFSIZE]; const char *name = netdev_vport_get_dpif_port(netdev_, buf, sizeof(buf)); @@ -865,15 +865,6 @@ netdev_vport_get_ifindex__(const struct netdev *netdev_) return linux_get_ifindex(name); } -static int -netdev_vport_get_ifindex(const struct netdev *netdev_) -{ - if (netdev_is_flow_api_enabled()) - return netdev_vport_get_ifindex__(netdev_); - else - return -EOPNOTSUPP; -} - #define NETDEV_VPORT_GET_IFINDEX netdev_vport_get_ifindex #define NETDEV_FLOW_OFFLOAD_API LINUX_FLOW_OFFLOAD_API #else /* !__linux__ */