Re: [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload

From: Grygorii Strashko
Date: Tue Jul 21 2020 - 16:05:56 EST


hi David,

On 18/07/2020 04:47, David Miller wrote:
From: Grygorii Strashko <grygorii.strashko@xxxxxx>
Date: Fri, 17 Jul 2020 15:19:32 +0300

From: Murali Karicheri <m-karicheri2@xxxxxx>

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")
Signed-off-by: Murali Karicheri <m-karicheri2@xxxxxx>
Signed-off-by: Grygorii Strashko <grygorii.strashko@xxxxxx>

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.

--
Best regards,
grygorii