linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload
@ 2020-07-17 12:19 Grygorii Strashko
  2020-07-18  1:47 ` David Miller
  2020-07-22  1:32 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Grygorii Strashko @ 2020-07-17 12:19 UTC (permalink / raw)
  To: David S. Miller, netdev, Jakub Kicinski
  Cc: Murali Karicheri, Sekhar Nori, linux-kernel, Grygorii Strashko

From: Murali Karicheri <m-karicheri2@ti.com>

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@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 1492648247d9..6d778bc3d012 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload
  2020-07-17 12:19 [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload Grygorii Strashko
@ 2020-07-18  1:47 ` David Miller
  2020-07-21 20:05   ` Grygorii Strashko
  2020-07-22  1:32 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2020-07-18  1:47 UTC (permalink / raw)
  To: grygorii.strashko; +Cc: netdev, kuba, m-karicheri2, nsekhar, linux-kernel

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Fri, 17 Jul 2020 15:19:32 +0300

> From: Murali Karicheri <m-karicheri2@ti.com>
> 
> 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@ti.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload
  2020-07-18  1:47 ` David Miller
@ 2020-07-21 20:05   ` Grygorii Strashko
  0 siblings, 0 replies; 4+ messages in thread
From: Grygorii Strashko @ 2020-07-21 20:05 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, kuba, m-karicheri2, nsekhar, linux-kernel

hi David,

On 18/07/2020 04:47, David Miller wrote:
> From: Grygorii Strashko <grygorii.strashko@ti.com>
> Date: Fri, 17 Jul 2020 15:19:32 +0300
> 
>> From: Murali Karicheri <m-karicheri2@ti.com>
>>
>> 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@ti.com>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload
  2020-07-17 12:19 [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload Grygorii Strashko
  2020-07-18  1:47 ` David Miller
@ 2020-07-22  1:32 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2020-07-22  1:32 UTC (permalink / raw)
  To: grygorii.strashko; +Cc: netdev, kuba, m-karicheri2, nsekhar, linux-kernel

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Fri, 17 Jul 2020 15:19:32 +0300

> From: Murali Karicheri <m-karicheri2@ti.com>
> 
> 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@ti.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-22  1:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 12:19 [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload Grygorii Strashko
2020-07-18  1:47 ` David Miller
2020-07-21 20:05   ` Grygorii Strashko
2020-07-22  1:32 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).