Received: by 10.213.65.68 with SMTP id h4csp37437imn; Mon, 19 Mar 2018 18:45:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELv4yMPuVrfsaOgs6xhkGA60Jnu78aRVfFNWRBSd3+2HY4oUtnMy34nVTSlhGrpMN9y+hq2k X-Received: by 2002:a17:902:bd4b:: with SMTP id b11-v6mr14500497plx.225.1521510349096; Mon, 19 Mar 2018 18:45:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521510349; cv=none; d=google.com; s=arc-20160816; b=0ev+5SYVh7yJ1SYpQHmUY/m0RIKb7/m6hU3LGTrwmWUWZss/PrC57ueqKAGjy1VBcm 4o9ZV+Vjbpvol4i0b/PH6GnvlLgRkO6ftJjX2mvMb7a49tEgC776nsQNFUNsnt+gxdTS 9j1FTtPXZzQR2Cz/W9sIFFan+Liv0HTyOurUEf0I/9irkkW6p31cwr4cTyTEPFwjg+ja FDoEQJS4R0BMu+NTsBsiumcRN6iZ3T3RQbtUXMXso+ZiEOyaxzImPHc01K6ari1aoFzr PgYNWO2+thJG20Oo+VyA15v0nIUYMumyLDoJSCqluavBQ/C5TEHloos8to5mjgaBgT6n zscQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=c0NHVWcXy2G7eZUD1WDhDcN6x2fx6qgLe2Dy5bPQkog=; b=xliYK48nSyG0+PAZzHIfWU7mneEZ94KwCduvPJfMe896KR/O0Gnh69EMHRBaQCfe6a 0oI0V6/4ZfPdEq+XcOXZ6PDyn/bu06D+n6eEgDij9vR0jTua0lfVvpZirhRCmnNzBlSx gWVNKa6kw0wbsmhC85jY+rM6CDDpiMACLnrrnVgdbB/yjb+RQtIOOQ70OCiKo8HWXKUI G6OzVVBBya3TZTazgvntmxxLEBJgjpsvRh4+SOfAPBbkkVW8nFbQUHSWXvfpBMZatT6H E3ap/sQw+yqbI4LDYqwAbM3APgEuDnx+97IOuI4JMwdNrXAnnmRHovNsS73w8iLGEVzf VH0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11-v6si517924plr.411.2018.03.19.18.45.35; Mon, 19 Mar 2018 18:45:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968257AbeCSTJR (ORCPT + 99 others); Mon, 19 Mar 2018 15:09:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51378 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967301AbeCSS1v (ORCPT ); Mon, 19 Mar 2018 14:27:51 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3601311D5; Mon, 19 Mar 2018 18:27:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sunil Goutham , cjacob , Aleksey Makarov , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 176/241] net: thunderx: Set max queue count taking XDP_TX into account Date: Mon, 19 Mar 2018 19:07:21 +0100 Message-Id: <20180319180758.436839994@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sunil Goutham [ Upstream commit 87de083857aa269fb171ef0b39696b2888361c58 ] on T81 there are only 4 cores, hence setting max queue count to 4 would leave nothing for XDP_TX. This patch fixes this by doubling max queue count in above scenarios. Signed-off-by: Sunil Goutham Signed-off-by: cjacob Signed-off-by: Aleksey Makarov Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -1576,6 +1576,11 @@ static int nicvf_probe(struct pci_dev *p nic->pdev = pdev; nic->pnicvf = nic; nic->max_queues = qcount; + /* If no of CPUs are too low, there won't be any queues left + * for XDP_TX, hence double it. + */ + if (!nic->t88) + nic->max_queues *= 2; /* MAP VF's configuration registers */ nic->reg_base = pcim_iomap(pdev, PCI_CFG_REG_BAR_NUM, 0);