Skip to contentSkip to conversation

net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload

PATCH Applied Grygorii Strashko 2 participants 4 messages Jul 17, 2020 – Jul 22, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload

From: Murali Karicheri <[email protected]>

Currently drive supports taprio offload which is a tc feature offloaded to cpsw hardware. So driver has to set the hw feature flag, NETIF_F_HW_TC in the net device to be compliant. This patch adds the flag.

Fixes 8127224c2708 ("ethernet: ti: am65-cpsw-qos: add TAPRIO offload support")
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/ti/am65-cpsw-nuss.c +2 -1
index 1492648247d9..6d778bc3d012 100644
@@ -1850,7 +1850,8 @@ static int am65_cpsw_nuss_init_ndev_2g(struct am65_cpsw_common *common)
 	port->ndev->max_mtu = AM65_CPSW_MAX_PACKET_SIZE;
 	port->ndev->hw_features = NETIF_F_SG |
 				  NETIF_F_RXCSUM |
-				  NETIF_F_HW_CSUM;
+				  NETIF_F_HW_CSUM |
+				  NETIF_F_HW_TC;
 	port->ndev->features = port->ndev->hw_features |
 			       NETIF_F_HW_VLAN_CTAG_FILTER;
 	port->ndev->vlan_features |=  NETIF_F_SG;
Signature · 1 line
2.17.1
maintainer
#1 lore raw

From: Grygorii Strashko <[email protected]>
Date: Fri, 17 Jul 2020 15:19:32 +0300

Quoted 9 lines

From: Murali Karicheri <[email protected]>

Currently drive supports taprio offload which is a tc feature offloaded to cpsw hardware. So driver has to set the hw feature flag, NETIF_F_HW_TC in the net device to be compliant. This patch adds the flag.

Fixes 8127224c2708 ("ethernet: ti: am65-cpsw-qos: add TAPRIO offload support")

How was the commit adding TAPRIO support even tested since without the NETIF_F_HW_TC bit set tc_can_offload() always returns false?

#2 lore raw

hi David,

Quoted 9 lines · David Miller

From: Grygorii Strashko <[email protected]>
Date: Fri, 17 Jul 2020 15:19:32 +0300

Quoted 6 lines

From: Murali Karicheri <[email protected]>

Currently drive supports taprio offload which is a tc feature offloaded to cpsw hardware. So driver has to set the hw feature flag, NETIF_F_HW_TC in the net device to be compliant. This patch adds the flag.

Quoted 7 lines
Quoted 3 lines
Fixes 8127224c2708 ("ethernet: ti: am65-cpsw-qos: add TAPRIO offload support")

How was the commit adding TAPRIO support even tested since without the NETIF_F_HW_TC bit set tc_can_offload() always returns false?

The sch_taprio doesn't check for NETIF_F_HW_TC (no calls of tc_can_offload()). It only checks for !ndo_setup_tc(). Therefore our basic offload tests are working.

It's not critical patch.

Signature · 2 lines
Best regards,
grygorii
maintainer Applied
#3 lore raw
In reply to Grygorii Strashko

From: Grygorii Strashko <[email protected]>
Date: Fri, 17 Jul 2020 15:19:32 +0300

Quoted 9 lines

From: Murali Karicheri <[email protected]>

Currently drive supports taprio offload which is a tc feature offloaded to cpsw hardware. So driver has to set the hw feature flag, NETIF_F_HW_TC in the net device to be compliant. This patch adds the flag.

Fixes 8127224c2708 ("ethernet: ti: am65-cpsw-qos: add TAPRIO offload support")

Applied.