2022-09-20 09:49:27

by Horatiu Vultur

[permalink] [raw]
Subject: [PATCH net-next 0/4] net: lan966x: Add mqprio and taprio support

Add support for offloading QoS features with tc command to lan966x. The
offloaded QoS features are mqprio and taprio.

Horatiu Vultur (4):
net: lan966x: Add define for number of priority queues NUM_PRIO_QUEUES
net: lan966x: Add offload support for mqprio
net: lan966x: Add registers used by taprio
net: lan966x: Add offload support for taprio

.../net/ethernet/microchip/lan966x/Makefile | 3 +-
.../ethernet/microchip/lan966x/lan966x_main.c | 11 +-
.../ethernet/microchip/lan966x/lan966x_main.h | 17 +
.../microchip/lan966x/lan966x_mqprio.c | 28 +
.../ethernet/microchip/lan966x/lan966x_port.c | 2 +
.../ethernet/microchip/lan966x/lan966x_ptp.c | 9 +-
.../ethernet/microchip/lan966x/lan966x_regs.h | 159 ++++++
.../microchip/lan966x/lan966x_taprio.c | 528 ++++++++++++++++++
.../ethernet/microchip/lan966x/lan966x_tc.c | 40 ++
9 files changed, 792 insertions(+), 5 deletions(-)
create mode 100644 drivers/net/ethernet/microchip/lan966x/lan966x_mqprio.c
create mode 100644 drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
create mode 100644 drivers/net/ethernet/microchip/lan966x/lan966x_tc.c

--
2.33.0


2022-09-20 09:51:00

by Horatiu Vultur

[permalink] [raw]
Subject: [PATCH net-next 1/4] 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 <[email protected]>
---
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