Skip to content

Commit f329df0

Browse files
author
Sabrina Dubroca
committed
netdevsim: add more hw_features
JIRA: https://issues.redhat.com/browse/RHEL-26055 commit 494bd83 Author: Sabrina Dubroca <sd@queasysnail.net> Date: Thu Nov 7 00:13:27 2024 +0100 netdevsim: add more hw_features netdevsim currently only set HW_TC in its hw_features, but other features should also be present to better reflect the behavior of real HW. In my macsec offload testing, this ends up as HW_CSUM being missing from hw_features, so it doesn't stick in wanted_features when offload is turned off. Then HW_CSUM (and thus TSO, thanks to netdev_fix_features) is not automatically turned back on when offload is re-enabled. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/b918dc4dd76410a57f7516a855f66b0a2bd58326.1730929545.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sabrina Dubroca <sdubroca@redhat.com>
1 parent 1fdd04a commit f329df0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/netdevsim/netdev.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,11 @@ static void nsim_setup(struct net_device *dev)
624624
NETIF_F_FRAGLIST |
625625
NETIF_F_HW_CSUM |
626626
NETIF_F_TSO;
627-
dev->hw_features |= NETIF_F_HW_TC;
627+
dev->hw_features |= NETIF_F_HW_TC |
628+
NETIF_F_SG |
629+
NETIF_F_FRAGLIST |
630+
NETIF_F_HW_CSUM |
631+
NETIF_F_TSO;
628632
dev->max_mtu = ETH_MAX_MTU;
629633
dev->xdp_features = NETDEV_XDP_ACT_HW_OFFLOAD;
630634
}

0 commit comments

Comments
 (0)