Skip to content

Commit

Permalink
net: lan966x: Add define for number of priority queues NUM_PRIO_QUEUES
Browse files Browse the repository at this point in the history
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 <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Horatiu Vultur authored and David S. Miller committed Sep 23, 2022
1 parent f948ac2 commit 644ffce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/microchip/lan966x/lan966x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/microchip/lan966x/lan966x_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 644ffce

Please sign in to comment.