net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload
Subsystems (2)
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.
--- 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
@@ -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
David Miller
maintainerFrom: 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_TCin the net device to be compliant. This patch adds the flag.Fixes 8127224c2708 ("ethernet: ti: am65-cpsw-qos: add TAPRIO offload support")Signed-off-by Murali Karicheri <[email protected]>Signed-off-by Grygorii Strashko <[email protected]>
How was the commit adding TAPRIO support even tested since without the NETIF_F_HW_TC bit set tc_can_offload() always returns false?
hi David,
Quoted 9 lines · David Miller
From: Grygorii Strashko <[email protected]>
Date: Fri, 17 Jul 2020 15:19:32 +0300Quoted 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_TCin 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")Signed-off-by Murali Karicheri <[email protected]>Signed-off-by Grygorii Strashko <[email protected]>How was the commit adding TAPRIO support even tested since without the
NETIF_F_HW_TCbit settc_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
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_TCin the net device to be compliant. This patch adds the flag.Fixes 8127224c2708 ("ethernet: ti: am65-cpsw-qos: add TAPRIO offload support")Signed-off-by Murali Karicheri <[email protected]>Signed-off-by Grygorii Strashko <[email protected]>
Applied.