From patchwork Fri Apr 27 16:40:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pablo_Casc=C3=B3n?= X-Patchwork-Id: 905852 X-Patchwork-Delegate: ian.stokes@intel.com 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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="ky7rkbBy"; dkim-atps=neutral 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 40Xfp52MP8z9rvt for ; Sat, 28 Apr 2018 02:41:16 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A42A4E26; Fri, 27 Apr 2018 16:41:13 +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 9FB74E1E for ; Fri, 27 Apr 2018 16:41:11 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A0D5267D for ; Fri, 27 Apr 2018 16:41:09 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id j4so3642033wme.1 for ; Fri, 27 Apr 2018 09:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r+PKnaEaDinbQ/mQb7R0wMsfVdvdP5EuD9Sxlg6E6zY=; b=ky7rkbByR7t6sBETG16PYuuO+PhcTA9i7RB6hMZLog52C8DHN6/kQ2pHnb3KA1rGDn ACHTVeCI5WJeH0rjBR0JPDWfp8zwq7XI5Ls+r9uuTSumqbA/3uoruuKidhG6030412Rs 2pXFiI+7ZUYpK7O6f0WnfZIMWNfbP9sO3iMQex4rawwestvxaCzP4zYGF9kDTnghepHh T46jF57kpuh0ebzlAQeIXwdmTncfFcSaPdUVZdAIwW4DMuzEEPXJyW1WwB5WF8kuOAoC 8Lyzeat07aexSxjQKLAfOj1AoI6ALdcP7GOXIQ8WI4XCTyft0+jfCTLQ1qDG8/sSgzDK gAfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r+PKnaEaDinbQ/mQb7R0wMsfVdvdP5EuD9Sxlg6E6zY=; b=AgyZll9jgOkX9FO84rWuth94FTfec7xkC5AsGNRyVxDQA7HCH3elIzAKjcmD9lfSNZ ANrABYevmk4q4mpNkp/vGhiti3Kz2ipehmM32G2mJaEN+ZtPKeIZMaVSnF17zHIXJNqU XONqIwy2Op5HwC23iWCrPDMF+knMjyHS/46R/lEBrgeasQPA16kFuY8hbJTagNA88qIH rSCnye/M3a3jn7a2Qt3axa75YWyy1bTLIgJhBRvZ1c9JdGtTQh48abIopqVlp0NQ3Zh5 TPehA4vuJNqkWwFseNCdoveunqLAgNLI4KBx4JPLpNECpJQ8fmJ5jTBMJrv2e4NFM5di n0iQ== X-Gm-Message-State: ALQs6tBiAyFJKJMsfuO5GDjA10oXl6uRBEgmXHSG32+/cfHnFKSYL8oQ tdRxfYtJhhPxaGKccv4L642LXflz X-Google-Smtp-Source: AB8JxZqBjcrQtjP6TZsLNse5R2tZfSUtOjbgus8/FP6dzVIfkyP0OnlpEkcuXwQJhE3pinkz/E8H7g== X-Received: by 2002:a50:abc2:: with SMTP id u60-v6mr4310298edc.43.1524847267986; Fri, 27 Apr 2018 09:41:07 -0700 (PDT) Received: from cbvirt1-3.netronome.com (host-79-78-33-110.static.as9105.net. [79.78.33.110]) by smtp.googlemail.com with ESMTPSA id s8-v6sm1070217edk.76.2018.04.27.09.41.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Apr 2018 09:41:07 -0700 (PDT) From: =?utf-8?q?Pablo_Casc=C3=B3n?= To: dev@openvswitch.org Date: Fri, 27 Apr 2018 17:40:49 +0100 Message-Id: <1524847249-19091-1-git-send-email-pablo.cascon@netronome.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v4 1/1] netdev-dpdk: don't enable scatter for jumbo RX support for nfp 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: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Currently to RX jumbo packets fails for NICs not supporting scatter. Scatter is not strictly needed for jumbo RX support. This change fixes the issue by not enabling scatter only for the PMD/NIC known not to need it to support jumbo RX. Note: this change is temporary and not needed for later releases OVS/DPDK Reported-by: Louis Peens Signed-off-by: Pablo Cascón Reviewed-by: Simon Horman Acked-by: Kevin Traynor --- lib/netdev-dpdk.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ee39cbe..fdc8f66 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -694,11 +694,19 @@ dpdk_eth_dev_queue_setup(struct netdev_dpdk *dev, int n_rxq, int n_txq) int diag = 0; int i; struct rte_eth_conf conf = port_conf; + struct rte_eth_dev_info info; - /* For some NICs (e.g. Niantic), scatter_rx mode needs to be explicitly - * enabled. */ + /* As of DPDK 17.11.1 a few PMDs require to explicitly enable + * scatter to support jumbo RX. Checking the offload capabilities + * is not an option as PMDs are not required yet to report + * them. The only reliable info is the driver name and knowledge + * (testing or code review). Listing all such PMDs feels harder + * than highlighting the one known not to need scatter */ if (dev->mtu > ETHER_MTU) { - conf.rxmode.enable_scatter = 1; + rte_eth_dev_info_get(dev->port_id, &info); + if (strncmp(info.driver_name, "net_nfp", 6)) { + conf.rxmode.enable_scatter = 1; + } } conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &