The current taprio offload validation relies solely on the presence of .ndo_setup_tc, which is insufficient. Some IP versions of a driver expose .ndo_setup_tc but lack actual hardware offload support for taprio. To address this, add a check for NETIF_F_HW_TC in netdev->hw_features. This ensures that taprio offload is only enabled on devices that explicitly advertise hardware traffic control capabilities. Note: Some drivers already set NETIF_F_HW_TC alongside .ndo_setup_tc. Follow-up patches will be submitted to update remaining drivers if this approach is accepted. Signed-off-by: Vineeth Karumanchi --- net/sched/sch_taprio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 2b14c81a87e5..a797995bdc8d 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -1506,7 +1506,7 @@ static int taprio_enable_offload(struct net_device *dev, struct tc_taprio_caps caps; int tc, err = 0; - if (!ops->ndo_setup_tc) { + if (!ops->ndo_setup_tc || !(dev->hw_features & NETIF_F_HW_TC)) { NL_SET_ERR_MSG(extack, "Device does not support taprio offload"); return -EOPNOTSUPP; -- 2.34.1