From patchwork Fri Apr 20 16:24:37 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: 902033 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="0LKzLaMu"; 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 40SLmR55m9z9s0p for ; Sat, 21 Apr 2018 02:24:55 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id BE3D5BD8; Fri, 20 Apr 2018 16:24:53 +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 ED2D8BCF for ; Fri, 20 Apr 2018 16:24:52 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id B70556AE for ; Fri, 20 Apr 2018 16:24:51 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id f14-v6so24480954wre.4 for ; Fri, 20 Apr 2018 09:24:51 -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=KoUUm3tKDcx3hD16B6P23Da0vZclsW+MDfDlHnvvhl8=; b=0LKzLaMuWRI2wXg8ZEWbaJVMmlomGBprxy+qr1jhgA9B13nx7vYjQ7twpE/fP4fHCM ewR8BPvmNbj1s4ABLNv27fhyfaLj3hEZEOnj7tJF9MQ0e4/IHUfpk9kbXrtiiweIuc3n 11bYmpHtpJEqtZF7KhjpghizmwwdSwLnzGElX3mN5LkqJ67EA/qti94pZohey+6+yLsL mZbv7OPre7eQN/mJkezoLqY9qLb1pVH4KFgPeUQxLtCX80A5Bwa/xspRIVlLRz3UaPgG S6CrO50iZWijZY3SnGHB34bSDscGD0T1Af3vgUshgDwJs1uLvLJEtJo1NDNZlmgjflvv EGWQ== 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=KoUUm3tKDcx3hD16B6P23Da0vZclsW+MDfDlHnvvhl8=; b=Mkce2mJDiuq51imCTSbLD265UiosTD0tAtbAsWIQF6zQbFNNWQOG1peGNXBMwAyxKV kWoueGSvZYz8yDMYwuFJo3QiNnN1k6dq6omRwOboMTspsnhTN1RD8EDG0xSSczK79WRb IKKGV5T4kv5Lqw7/mHSwJDgycLljIFAC447YLAE9QI51E8d9NtDBz6v4Yhe/cjW1sRs1 tomp+1ECDufiFaDLOuwWzRJXJelCa/hTJoKnR+M/LvFcRTQcwKIGzfokfjPysUVzS6uX Ws97ERdRjEl2E+xhVTvYsgCWbeFST+atCRL8RxFI1A0NUgKgKXOBLR5Mkabf5Sw5EG0W 1JCw== X-Gm-Message-State: ALQs6tBKNNka8B+QAkvDwgGcw2SkGLDj0GTShtxtRQkNC5plm7MU7VHt q2kgUd1RHiDLWRumOhy16ZSJMo1N X-Google-Smtp-Source: AIpwx497+UX9ThvbIP0XGxcTBf/s1nXLTbYNqM+flg9RuDHRMMYVBFEBfOn62rxhjwWLh0MQNfEzSg== X-Received: by 10.80.173.105 with SMTP id z38mr14920379edc.306.1524241490158; Fri, 20 Apr 2018 09:24:50 -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 l1sm3739618edi.54.2018.04.20.09.24.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Apr 2018 09:24:49 -0700 (PDT) From: =?utf-8?q?Pablo_Casc=C3=B3n?= To: dev@openvswitch.org Date: Fri, 20 Apr 2018 17:24:37 +0100 Message-Id: <1524241477-8456-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 v3 1/1] netdev-dpdk: remove enabling scatter for jumbo RX support 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 only enabling scatter for NICs known to need it to support jumbo RX. Add a quirk for "igb" while the PMD is fixed. Reported-by: Louis Peens Signed-off-by: Pablo Cascón Reviewed-by: Simon Horman --- Changelog: v3->v2: - only check for driver_name - tested with "nfp" and not with "igb" lib/netdev-dpdk.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ee39cbe..02ed85b 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -694,11 +694,17 @@ 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. */ + /* Quirk: as of DPDK 17.11.1 igb's PMD requires explicitly + * enabling scatter to support jumbo RX. Note: PMDs are not + * required to set the offload capabilities and so is not reliable + * info, only the driver_name is after testing the PMD/NIC */ if (dev->mtu > ETHER_MTU) { - conf.rxmode.enable_scatter = 1; + rte_eth_dev_info_get(dev->port_id, &info); + if (!strcmp(info.driver_name, "igb")) { + conf.rxmode.enable_scatter = 1; + } } conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &