Received: by 10.213.65.68 with SMTP id h4csp484026imn; Fri, 16 Mar 2018 09:07:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELt8gMwHUzcoR/VzUbEJ0w9skAB/k4NphcMY38hLFJwZEWau5mCp4FDtYP1JKaPXc46JyZJn X-Received: by 2002:a17:902:a9c7:: with SMTP id b7-v6mr2673082plr.190.1521216475280; Fri, 16 Mar 2018 09:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216475; cv=none; d=google.com; s=arc-20160816; b=I1UAZ/wylqroqN6xbo/BBZJw+8yeyrCg9q2vlqXcNARZPuXmViFdG7qpRlz2Uf7WHo mSXc0eR9bCbN+yZ9fxtGa7ul1d3FRSjsiZpwa6lvKtWjNN2RIWfU8r1oFOa+jAC/DLLd V6f4rEdc1aJ+tVJjY6B6DhyjLQIgjB38JPynEy4UPvD4R25lLDHlcs5uHOIheCXn/8nZ JCYoksUAPYLrUMSMhljhlsMMsfb96z5DTG//QPvaJIoWNhrDNPoKEqxmzvbuoZOMhVrY JIcVNAFcc1qprLh3gecjVhXjGYlX6ZlJJe2pTrhdt9HZUjVm5Tj4NCLf6GMe7y6MH8Gk jqXQ== 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=OrZswYOuOIKSfiQRkWnsURfO280MNwwMjLC6NpGQ9sQ=; b=Gwxto0tanC4dMsfRDttemQXSHYjRyM3i4m8WU56iejDswAdL2CqjHS5hAPWbsWFmjs +tqNUdosFroDVhyjU+Gxa5nTi4zYnC93vuqj0v7BIJQg2yGBj4tZvGW5UDKZVimnYIrP 4h4rI8Oa7ZdHsyYwwSkQaadDZpVbj7uuMX+t4vzosNcoKRVYLX/3WfkHkuKPXuy9w7xX GMqpPxZYNVbVOTet/1rwXhnrnlqXT8qPIs4plAU9MTSlB46MUAMBQUriMiCw/rqBSXHv xUJaorGjRakqYpVE1AYtuQhYCfCUWbx8+Ihb5jGCM3fP/U2tRymJJP0uWT2w5uli1SFU 3lIQ== 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 a8-v6si6518068plz.320.2018.03.16.09.07.40; Fri, 16 Mar 2018 09:07:55 -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 S1754796AbeCPPlw (ORCPT + 99 others); Fri, 16 Mar 2018 11:41:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44136 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754641AbeCPPlt (ORCPT ); Fri, 16 Mar 2018 11:41:49 -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 B30C7E98; Fri, 16 Mar 2018 15:41:48 +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.15 060/128] net: thunderx: Set max queue count taking XDP_TX into account Date: Fri, 16 Mar 2018 16:23:21 +0100 Message-Id: <20180316152339.795876734@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@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.15-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 @@ -1833,6 +1833,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);