From patchwork Wed Sep 22 15:17:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nir Anteby X-Patchwork-Id: 1531279 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HF23L1Rcxz9sCD for ; Thu, 23 Sep 2021 01:17:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 416A7414B6; Wed, 22 Sep 2021 15:17:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oF9AoF3xxjSl; Wed, 22 Sep 2021 15:17:29 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5F1E5407E3; Wed, 22 Sep 2021 15:17:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 95D70C0024; Wed, 22 Sep 2021 15:17:26 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id A0B25C000F for ; Wed, 22 Sep 2021 15:17:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 856C3407A8 for ; Wed, 22 Sep 2021 15:17:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ntea-H6f2Tns for ; Wed, 22 Sep 2021 15:17:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by smtp4.osuosl.org (Postfix) with ESMTP id E5FE7407A4 for ; Wed, 22 Sep 2021 15:17:21 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from nanteby@nvidia.com) with SMTP; 22 Sep 2021 18:17:18 +0300 Received: from nvidia.com (pegasus27.mtr.labs.mlnx [10.213.1.140]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 18MFHGDN027979; Wed, 22 Sep 2021 18:17:18 +0300 To: dev@openvswitch.org Date: Wed, 22 Sep 2021 15:17:07 +0000 Message-Id: <1632323829-63913-3-git-send-email-nanteby@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1632323829-63913-1-git-send-email-nanteby@nvidia.com> References: <1632323829-63913-1-git-send-email-nanteby@nvidia.com> Cc: elibr@nvidia.com, majd@nvidia.com Subject: [ovs-dev] [PATCH v2 2/4] netdev-dpdk: Add flow_api support for netdev gre vports X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Nir Anteby via dev From: Nir Anteby Reply-To: Nir Anteby MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Add the acceptance of GRE devices to netdev_dpdk_flow_api_supported() API, to allow offloading of DPDK GRE devices. Signed-off-by: Nir Anteby --- lib/netdev-dpdk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ca92c94..0630048 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -5215,7 +5215,8 @@ netdev_dpdk_flow_api_supported(struct netdev *netdev) struct netdev_dpdk *dev; bool ret = false; - if (!strcmp(netdev_get_type(netdev), "vxlan") && + if ((!strcmp(netdev_get_type(netdev), "vxlan") || + !strcmp(netdev_get_type(netdev), "gre")) && !strcmp(netdev_get_dpif_type(netdev), "netdev")) { ret = true; goto out;