Received: by 10.213.65.68 with SMTP id h4csp504774imn; Fri, 16 Mar 2018 09:46:39 -0700 (PDT) X-Google-Smtp-Source: AG47ELslyDhuAb7Tu9pDNY1X4uZXgQemJCu4pr1GyZ1UoOCe2b+NyKMYxTh/P2ZVUzHXhLHFp2jN X-Received: by 2002:a17:902:51ee:: with SMTP id y101-v6mr2871511plh.359.1521218799223; Fri, 16 Mar 2018 09:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521218799; cv=none; d=google.com; s=arc-20160816; b=woMQurVWo1UBdi3/drYS3AtXAO3YFI3KTvXa6qN7Qtz93lWjSa0ftD7sFuF33A0/yX E/HoJi2GKyHB65eX71D1pClubtfSKT3uK7qGWmsG5FkV+OWTe1on8r8Xrpo44i3Jm+/j /Xuv6+0zdY74RKWoembAfBZ2nysKDYOGEuea0/ybpf8BPiYnLHtw9EQK1OCz0XYFGcX3 D5qiSd0wWvOjIBAFSOu1G+3AlXDByFCtS+WVhLrtRHHKk/+9Xsi2nlA0V0P+KXXdZ3Nl krpYSaaQP4P0wgfkdsngF5KIIeZW8OmJEEiVpgyAvCblqyVTxXo173RyJXUgV1L7Sz3q Ppfg== 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=sPMuuWSXMMeVCfLZ6UO3ZZNOi5IGWpNWC9HAqgR5wXs=; b=PqaDS3brBWrgOf5zUaKkwl1ZXhfZjPSW7JLosHs+XJBMtqXruhl85wjozAHBVIZ9Nq syHsruN5wVFRAPZRtb+uF2U1elIQ9ryyASsWGSIamZxLTh3y1W15/2AalIERX5tqOQT8 3XQ+VzgZ8aOixg95BiUX0h6RdfUpu4mnTokFG7UBzBy/dKkQoNRzM/BR/n/s/is7KEYA LYfj7Nr+L23zVm+G2E0/MTV4uwVggnKQFbAhrBQapede+17f/DwwRZQQ1YKQyTOlEMNy fONEYkQJZgnBFG6Q6XgmNvTO6RerVyAtVtzsQ6ZE6w3McRIEoRbbuj/0BQP9A41+UKbi AcGQ== 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 l1-v6si6695579pld.312.2018.03.16.09.46.24; Fri, 16 Mar 2018 09:46:39 -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 S1753364AbeCPQor (ORCPT + 99 others); Fri, 16 Mar 2018 12:44:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40082 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754441AbeCPPf7 (ORCPT ); Fri, 16 Mar 2018 11:35:59 -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 DE666107D; Fri, 16 Mar 2018 15:35:58 +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.14 049/109] net: thunderx: Set max queue count taking XDP_TX into account Date: Fri, 16 Mar 2018 16:23:18 +0100 Message-Id: <20180316152332.623047900@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@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.14-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 @@ -1832,6 +1832,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);