Received: by 10.223.164.202 with SMTP id h10csp1969371wrb; Fri, 24 Nov 2017 04:07:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMapcObfoRYo6yzmL7gVdXK+pqqMK0pHO/5WI/T+DJ40OPqN9dRdoab5EcJIvgI4uaUzyJnV X-Received: by 10.84.128.197 with SMTP id a63mr28703766pla.210.1511525278246; Fri, 24 Nov 2017 04:07:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511525278; cv=none; d=google.com; s=arc-20160816; b=FpeGzSj7BxIbsMnsKM4mtcZNUx0C3Of6tU2JJRNQMDvVhUWOOMMvmUEkSrxqxqrJ5M XTZx2LzFn4un3p64J2CJzeXMbYhK1yPi4JZCnwWCfpssyGXEUe2aa4CLG/WvW3amF3Em cN1fGf1osT9ZELnUdmoOwkJ7xb5VMcL5jdg6w7qwzxd5S6l4fPJ0UtxfVv0TgPjN520r T8Q2mYErF1MQW34AXB5mKIczikYnqvl08IdY+9DKOisnVqDJ+iACrS/OS2pmS6BnbCMb FzxJ7gs0k9PHepKZaDfSBIZ0e7up6LWHCTA+W3wANSu2sxwXbFk8hu/7t2nhFODq4eV7 a/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=r8HbfIrwngtxf3gn9/V+RdnN0YcWTgYyeC7sXHLNaA8=; b=pLmLyb6jKmwZK3BBdFbOIFO/4nITRkOENZQ4u5YpYivBcN/sWRFTGiOLvd9FsQ1Zts X9euJoxr8ZmHvjXPNjIciepuz/xXILOz/EgFQgjNldlEkqb1ylQJiYb78c2e58kSgPlS GPQLSj2YS0Ula+clNanYE870urkxXyvBVIS7W4Is3G8yKz4GgDk5rl15vLxRPlJwYsJH B4BAOzcV3zlJgijnrqxK0NMgvV88g6q3Ak2s4LXcnr/JcCMC8p8GbZTGhC2BYPk9CzTr jRk6vwiXfgGVPel2n9s/i6qyfgVSOkP2vbUepi7Gkm+MFm79c/Rpxa3d2Bw9AIiSH4fo UjHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=ZAOAbOCm; 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 62si7008750ply.664.2017.11.24.04.07.47; Fri, 24 Nov 2017 04:07:58 -0800 (PST) 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; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=ZAOAbOCm; 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 S1753630AbdKXMEh (ORCPT + 76 others); Fri, 24 Nov 2017 07:04:37 -0500 Received: from mail-sn1nam02on0050.outbound.protection.outlook.com ([104.47.36.50]:16128 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753606AbdKXMEf (ORCPT ); Fri, 24 Nov 2017 07:04:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=r8HbfIrwngtxf3gn9/V+RdnN0YcWTgYyeC7sXHLNaA8=; b=ZAOAbOCm+Hk/9+UHFYWeWUHloWXHfwNe1c20Foo6c05K0R3XPT09T96mCFe707SsseZdfyR3MhUE1kqaN5RfWrLXi+mVMdOQ1qguAP/AV0BZw9P4mkCSoZAbnmbT05AyebOFYbvaL7GbKtPqfIBJuJka20BOIeRijrWH2ZzQBlM= Received: from localhost.localdomain (46.242.12.6) by SN2PR07MB2496.namprd07.prod.outlook.com (2603:10b6:804:6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Fri, 24 Nov 2017 12:04:31 +0000 From: Aleksey Makarov To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Goutham, Sunil" , Robert Richter , Aleksey Makarov , cjacob , Sunil Goutham , linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next] net: thunderx: Set max queue count taking XDP_TX into account Date: Fri, 24 Nov 2017 15:04:03 +0300 Message-Id: <20171124120411.7660-1-aleksey.makarov@cavium.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [46.242.12.6] X-ClientProxiedBy: AM5PR0602CA0003.eurprd06.prod.outlook.com (2603:10a6:203:a3::13) To SN2PR07MB2496.namprd07.prod.outlook.com (2603:10b6:804:6::20) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199);SRVR:SN2PR07MB2496; X-Microsoft-Exchange-Diagnostics: 1;SN2PR07MB2496;3:yEe7i+wU7U6l0bIcIEMrDzt9I68MS5mAQwBjWrINApAE8e0ZKUBhNB0hF623F6tJ4GP0OL0HUlkUgyVQX+TMBlZv7O8ywYP79uz66d7SfIMjWF4VDJGtxqFCdnYz8H7bEUf6a9ECWvhXWfptg3hkwHP3BChogsS6pw+7fnMJlW08KWrDGJdrqSx9Yuicg5gelJi/MxAYErOC5/X8siLBeipWlAHR1E353/qy9ReE6UdJ/rkpnID5V1y1cM8qvJF8;25:Fmo7rNQ1pqioUq8AM4bPER91W/Yg9HHipUZ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1rDzDoFuy601ItWJSx2+aEymIAHE3oKgNMVrxpfTIqJPSff6DTcQfIHHtQwTQpZ8L4QEH25FDBh/O7RalSNfXHMIfFgSUw09CO2vcd7JBWaGnfvNd5Vq+/rV;4:S4tJQlwKE4PbB71SSYPZGkzAlmIrV5qSXIRqgwBElzS5WrCGttoxzMQpaq7juvULrDH82pIM8SGYomzkRZljpY6p9yE7PMXe5Srn75iF77rWJ3TDao6bfmUMvDywQMGS5qRElHXGHH++C9Aj0T/t0yKLur7GsWegVnxyS55fPMd8mgmAXNq6m9NlYb1eVEd2vD1BJt5OgCjcZKbiwEgpshtjdar7peXbadQ2vtU0hoOoPtbcoV35mQNEw6jJAWr71xopIpWVNDbInI9qwSYy2w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231022)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:SN2PR07MB2496;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:SN2PR07MB2496; X-Forefront-PRVS: 05015EB482 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6069001)(346002)(366004)(376002)(199003)(189002)(105586002)(68736007)(106356001)(2906002)(6916009)(6512007)(4326008)(6666003)(5660300001)(2351001)(8936002)(47776003)(51416003)(50986999)(50226002)(66066001)(6506006)(101416001)(53936002)(16526018)(48376002)(25786009)(305945005)(33646002)(6486002)(36756003)(1076002)(3846002)(189998001)(6116002)(86362001)(50466002)(7736002)(316002)(54906003)(52116002)(16586007)(97736004)(8676002)(478600001)(72206003)(81156014)(81166006)(2361001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN2PR07MB2496;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Aleksey.Makarov@cavium.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR07MB2496;23:F7EaW182nsUKVXUEgVePwW5ZM3oDguoqxftfTbwm6?= =?us-ascii?Q?9hgfH2TIEAFlwhs/3AuO0x52Fa3LzrJqcTyopWPswVzZEyD2COhAU0bUTKdS?= =?us-ascii?Q?aIplKpjcVuNS01Av/t6PUy+sDKdgCEPwylrn0Qo3XptzeUz2wP5ffRdtRdhi?= =?us-ascii?Q?C4EQ21VNZMnZ3a290DhUL8etLZKhybyKkUaWCGHXvGoZQtZMTNgLX556xgej?= =?us-ascii?Q?MfyHl+/UXfh39w1NWDLDpeV2A8Uraow+9da2m0+yqVHadhrOL8/2nwIyPQrE?= =?us-ascii?Q?mz4VQi2eLjLAe6lV49CNF8B2QXd9jlxr7ppzhZSEsIRCSH1oQA5mZra6d543?= =?us-ascii?Q?TR59D7iiWUPRA5ZOxEpFiUjSf9IoSOJu3c5XLP2/++oKlz7j7Cb5Qt55Z++t?= =?us-ascii?Q?I1kwhULNnhI5lujiOZ5gw9jyRxlIoG+wgxGfDiqlwUuUFumHDj8qe6wngbVA?= =?us-ascii?Q?FnlvCxKyFb9oyALWoHunbADkcjJUqK78lBtQrSlGyQocYuDBUWrcu7NHGCnt?= =?us-ascii?Q?Z0EGMxNkvQs5i2vr8fttQHJ42uf5Jn4oKEc6HDpd8W22fk3BN9K+Q/JFCRY+?= =?us-ascii?Q?ho9PhzKALrJJoDNEEBDkfg7+oZ6En/Z6QxuzStA30v/CTZpK4qzDGz61Ub1V?= =?us-ascii?Q?6kYUkNZ6wgCQmnJT0gDdJpdEcPY5bBcRibXHfK1f+Ln7kUBomFbWZLOydWmo?= =?us-ascii?Q?SVXQPd8S6G8ycUcXmZOWAWnyE/zWyxHhoCINYm9miMW5ApizBPN+dPhaBVrv?= =?us-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MwOVBn8dXQDrA=;24:zrXD3veNMGjNAFuW5YbQxwkMh+Ay94BmYjhRZVOwl96QhQUKnNLwNUDYCnHwr/bQje0Djr0LHrw6XuRH2++z0sZh9j5CUe0HPzlk6we77V8=;7:Xm5awzcBT8y0a175WS1ISAwpsABGfwgIr4bVhlzQWQ6NcuSjffkMAALxmUn6teGfAFz8aQbmLy6/L/VBN7uTI/gaP8Ipz6my8pahcMzzpkIX74LyPEc8YzDRVkyTgAGSLyHeTtHtdmrMNsI7MBRLoi/VJFFTw7IPOngu10kevXnjNx3QAsh4Nog0ljFyI8bYFzHwW/WmFL1gVqGmlJVd9jBFZLwfeIcHsXwuZkqgyXbvj9S3nr76NQ+N2S6fV/vG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2017 12:04:31.8650 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 772cedb2-4e84-4803-c02c-08d5333386ce X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2496 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sunil Goutham 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 --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index b82e28262c57..52b3a6044f85 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -1891,6 +1891,11 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 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); -- 2.15.0 From 1589820488746516123@xxx Wed Jan 17 06:36:07 +0000 2018 X-GM-THRID: 1585246866391209099 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-01