From: Horatiu Vultur Date: Wed, 21 Sep 2022 12:25:35 +0000 (+0200) Subject: net: lan966x: Add define for number of priority queues NUM_PRIO_QUEUES X-Git-Tag: v6.1-rc5~319^2~117^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=644ffce5f1be181096098f0b8dbbf8f6a0d621c0;p=platform%2Fkernel%2Flinux-starfive.git net: lan966x: Add define for number of priority queues NUM_PRIO_QUEUES 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c index 371fa99..ee9b8eb 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 6135d31..a5d5987 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)