From patchwork Fri Apr 13 14:46:46 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: 897966 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="zAokEjGo"; 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 40N0xG4XRrz9s16 for ; Sat, 14 Apr 2018 00:47:30 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 0B8C1D4F; Fri, 13 Apr 2018 14:47:09 +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 11727D48 for ; Fri, 13 Apr 2018 14:47:08 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 62D91473 for ; Fri, 13 Apr 2018 14:47:07 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id d1so8781209wrj.13 for ; Fri, 13 Apr 2018 07:47:07 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=jC2VA3i4F6NtM1vR/TeAUxFkWLWBgR1C0qPfSJYdcfU=; b=zAokEjGowI5uM+fDPt9TtZ9csm2PJDY7MtuFa/bzaV+rvJWKGkpxo3Id+4L9x34l5r /dalPXy+boYjeYXzI3cgIN0ppIQdyGBq1Z803NMKTDsZBtSp2YdofWkOJULSckAYvRew 1Kwj1t6shlA3rVG5cKs66ZeoUPtlm25Nir/QSats4UCG+TBLNddcAm0AlYPslnENZvsn AAWafFoIEVD8QcJkoVJ2kqQIkGGJC/yKXrwL0WzDUTlK3lneXdLz7NHCkQSRIcqumGIZ L1vX8v6tHXTPlYFIauGDAdLoFnW2tHyYisjCnee7tnmqwoV9Ijf1+Hj0vc6vpHXV/PIE nhKQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=jC2VA3i4F6NtM1vR/TeAUxFkWLWBgR1C0qPfSJYdcfU=; b=s8h+flxF/nzKJgp8zQs3v/Lm71XV1ehZiu7gq2WwI7eeVm2JEjcm1SRDFHsCkhmWby h8arRjbgkqJaxnF95iQWP2xEBVLU5CBuOob8oVQWduZkGbYywoOwcZBxXBs3OdX5XqpB Cuq06V2Z95pAL3m5EHWSyKDmA/my64x9rJ2qIAqSlB2jWh2t3W/HrVuSOMHONuLh5qBC 9U/gRwxiQOircwYSU0xvlcSWh5WmB9saN2RJaZBLaI9ADgw/NoLdxmvPW/5i9QaOUMrl sZYCuXlqLFLrfhH2bYyH4Xvt7WyqdJ7c4ta/T8mNsrW6JycV6/Cbya+J0sE39di2Qrbg ON/Q== X-Gm-Message-State: ALQs6tAP8uEG9ooZfs+5W4gtx629dpv1fmRRWoWqxvacam1smlHESeBa lfQw9AeZoTSvRrpzeAsdo4x+oYBk X-Google-Smtp-Source: AIpwx48loOwpHkMC96J9oSrgWkI/4kA965y1U9n6nedVvHeVWFx2JjLkxnghreWQW+OXML15zROWPA== X-Received: by 10.80.148.202 with SMTP id t10mr3425981eda.146.1523630825839; Fri, 13 Apr 2018 07:47:05 -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 n3sm3374935edl.27.2018.04.13.07.47.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 07:47:05 -0700 (PDT) From: =?utf-8?q?Pablo_Casc=C3=B3n?= To: dev@openvswitch.org Date: Fri, 13 Apr 2018 15:46:46 +0100 Message-Id: <1523630806-26879-2-git-send-email-pablo.cascon@netronome.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523630806-26879-1-git-send-email-pablo.cascon@netronome.com> References: <1523630806-26879-1-git-send-email-pablo.cascon@netronome.com> 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 v2 1/1] netdev-dpdk: fix RX jumbo for NICs not supporting scatter 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 support on RX. This change fixes the issue by only enabling scatter for NICs supporting it. Add a quirk for "igb" while the PMD is fixed to advertise scatter. Reported-by: Louis Peens Signed-off-by: Pablo Cascón Reviewed-by: Simon Horman --- lib/netdev-dpdk.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ee39cbe..8f6a0a3 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. */ if (dev->mtu > ETHER_MTU) { - conf.rxmode.enable_scatter = 1; + rte_eth_dev_info_get(dev->port_id, &info); + if (info.rx_offload_capa & DEV_RX_OFFLOAD_SCATTER) { + conf.rxmode.enable_scatter = 1; + } else if (!strcmp(info.driver_name, "igb")) { + /* Quirk: as of DPDK 17.11.1 igb's PMD requires explicitly + enabling scatter but fails to advertise it. */ + conf.rxmode.enable_scatter = 1; + } } conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &