From patchwork Thu Mar 26 12:09:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 1261964 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48p3hr4Wddz9sRN for ; Thu, 26 Mar 2020 23:10:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6729687060; Thu, 26 Mar 2020 12:10:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XjIKJ2isAmaG; Thu, 26 Mar 2020 12:10:15 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4DF7F86FAF; Thu, 26 Mar 2020 12:09:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 32A82C1D7C; Thu, 26 Mar 2020 12:09:28 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id E6F3DC0177 for ; Thu, 26 Mar 2020 12:09:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D63162609E for ; Thu, 26 Mar 2020 12:09:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EqXzg9cuQkve for ; Thu, 26 Mar 2020 12:09:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by silver.osuosl.org (Postfix) with ESMTPS id B4618227FF for ; Thu, 26 Mar 2020 12:09:25 +0000 (UTC) IronPort-SDR: Fu8xFliSakTku51ylHugMPvHPG/g5LWashO7bCSkMxmTFt/KkTlqIlNXD3KXkACUwLNDkmHhUo zsY7eNCtjGaA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2020 05:09:25 -0700 IronPort-SDR: ceILqNuEH+29LiAHBiyzQThY0hpLd30GnyH1y1rQINqT9csmAoPfK/jPfz5sWcChLB8R3IyZzR ubf3TkaA5UsQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,308,1580803200"; d="scan'208";a="236260688" Received: from silpixa00390853.ir.intel.com (HELO silpixa00390853.ger.corp.intel.com) ([10.237.222.75]) by orsmga007.jf.intel.com with ESMTP; 26 Mar 2020 05:09:24 -0700 From: Sivaprasad Tummala To: ovs-dev@openvswitch.org Date: Thu, 26 Mar 2020 12:09:20 +0000 Message-Id: <20200326120920.5427-1-Sivaprasad.Tummala@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [ovs-dev] [RFC PATCH v1] netdev-dpdk: linear buffer check with zero-copy 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: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" In order to use dequeue-zero-copy in DPDK Vhost library, application has to disable linear buffer option. Hence dequeue-zero-copy is not supported for vhost application thats requries linear buffers. This patch is a workaround to support dq-zero-copy in OVS by overcoming the current limitation in DPDK. https://patches.dpdk.org/patch/67200/ Note: The patch needs to be removed once the fix is integrated in DPDK. Signed-off-by: Sivaprasad Tummala --- lib/netdev-dpdk.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 6187129c0..4a302ad89 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -5217,6 +5217,14 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) /* Enable zero copy flag, if requested */ if (zc_enabled) { vhost_flags |= RTE_VHOST_USER_DEQUEUE_ZERO_COPY; + /* + * DPDK vHost library doesn't allow zero-copy with linear buffers + * currently. Hence disabling the Linear buffer check until the + * issue is fixed in DPDK. + */ + vhost_flags &= ~RTE_VHOST_USER_LINEARBUF_SUPPORT; + VLOG_WARN("Zero copy enabled and hence disabling linear buffer" + " check for vHost port %s", dev->up.name); } /* Enable External Buffers if TCP Segmentation Offload is enabled. */