Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3658102rwb; Tue, 20 Sep 2022 02:51:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6DA7URTp5KipjCVCAYC3yzTZTru0axiwNzD+/MgxDR93O3+gl2mqWNaE6OsNF/YxMGT2BP X-Received: by 2002:a17:907:948f:b0:780:4c66:6689 with SMTP id dm15-20020a170907948f00b007804c666689mr16272612ejc.401.1663667460308; Tue, 20 Sep 2022 02:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663667460; cv=none; d=google.com; s=arc-20160816; b=dgIQUstROz/nf7Ke5c/PwBmeQALIWMX1v8ZbkmP54p4Z4vnnTlg968amvtyAqG36g6 qlm1MThRQe9bUguQPye/gRvR8FgsIWYvNNluMd57vw/o2GI8K3sfv5evMBA51WDiME8Q KB5jQqPvExj9Fh2yEa76UHa3Mdg1S3oT2JEeKyTV6fiwbB9Z/LDuLpTQfTQW3bqfgnQr BzFxpOdCeInKhKB/itFXoxuGLnyzbEkGd46BbkHlxpcRDfBbEp6WTQCBlEp8G4wF09FR dNsJergnrafOIu5zJ8J1KgzLKwdFTZUDMNtfiXM4h47D2IOy0OGfq7gVOC+nCoby6vCY 1NoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=l3XAK98KLT+lDrW0cJsKHj6sc0fyHT9E+2CKFfHMWUM=; b=tfPPGrLKqdMVFRIGTPnaDZdZmszll/e9qNfDFLeYmhjrs09W+d3G5ww46jRu+2g3Yl aYaBhbQgcbUIGBbR/LU9MOFx3rB1B4PNJEw66Xe0PYOJicp2Vd5oUS0rr5pWjJDcYNh6 GSEvJZYQSr+lk88l6sYUBLZ470+6HpiIc0OS7L4LjjYD2nXsUNHDqxG7daS1mwADJm/T Vv5m4cOkweCjFYEweot+lbJSwyhmAwj2+6JdaPBKGcq0NAQE5UWaU1fqqly7Qxs+8K3B o3BxySjfmC05hlYVGTdeeDx0Ln3X5HqDrtSpMp4wxWKcEoZnDzFqwoqv2nTwIH50IPd/ qh7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=iyMI5anX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a1709063c4400b007806c7c3fc1si762388ejg.975.2022.09.20.02.50.35; Tue, 20 Sep 2022 02:51:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=iyMI5anX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231324AbiITI6G (ORCPT + 99 others); Tue, 20 Sep 2022 04:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231444AbiITI5j (ORCPT ); Tue, 20 Sep 2022 04:57:39 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE656BCF0; Tue, 20 Sep 2022 01:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1663664256; x=1695200256; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PL+1MuO5jCEO2qzF4mOgRnqzQQH8tiFfop0GK+FZI+E=; b=iyMI5anXYky3pmkhRw7yBHdZO8k1CRT+vmcIEZFNWnSMZn3phJKt8Mez Vtkef1O79roP5osEBnABps0vozBifDBWv3/OpSa0tQvL1b4dA1Jwzx9+O 0VZ1vhrLVihkrEHjV883aSAsosefzajQHeUtVb12zT2iGKLY+5tKEQSBA iPTjl1Kf/L54RYIQY2qKnq7UMIK7gXi6BEEHsRxPeTpOsb43Qa7Lm5QcS 45IZniHHbT9uR8btFhhXt5RS/vAuwWM5L1rF74H/N6fbkLW+XuCohMMy9 hcNMbOwW/oOTX+Y6Fl4OESloxGr8/PVPKLxaph1QEVEROEkEgLPp+D8Hl A==; X-IronPort-AV: E=Sophos;i="5.93,330,1654585200"; d="scan'208";a="191583083" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Sep 2022 01:57:36 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 20 Sep 2022 01:57:36 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Tue, 20 Sep 2022 01:57:34 -0700 From: Horatiu Vultur To: , CC: , , , , , Horatiu Vultur Subject: [PATCH net-next 1/4] net: lan966x: Add define for number of priority queues NUM_PRIO_QUEUES Date: Tue, 20 Sep 2022 11:00:07 +0200 Message-ID: <20220920090010.305172-2-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220920090010.305172-1-horatiu.vultur@microchip.com> References: <20220920090010.305172-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a define for the number of priority queues on lan966x. Because there will be more checks for this, so instead of using hardcoded value all over the place add a define for this. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 3 ++- drivers/net/ethernet/microchip/lan966x/lan966x_main.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c index 371fa995e9e01..ee9b8ebba6d0a 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c @@ -738,7 +738,8 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p, return -EINVAL; dev = devm_alloc_etherdev_mqs(lan966x->dev, - sizeof(struct lan966x_port), 8, 1); + sizeof(struct lan966x_port), + NUM_PRIO_QUEUES, 1); if (!dev) return -ENOMEM; diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.h b/drivers/net/ethernet/microchip/lan966x/lan966x_main.h index 6135d311c4077..a5d5987852d46 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.h +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.h @@ -36,6 +36,7 @@ #define NUM_PHYS_PORTS 8 #define CPU_PORT 8 +#define NUM_PRIO_QUEUES 8 /* Reserved PGIDs */ #define PGID_CPU (PGID_AGGR - 6) -- 2.33.0