net: wangxun: don't advertise IFF_SUPP_NOFCS
Subsystems (3)
PATCH 1/1 net: wangxun: don't advertise IFF_SUPP_NOFCS
From: Rongguang Wei <[email protected]>
Like commit a24162f18825("i40e: don't advertise IFF_SUPP_NOFCS"), ngbe and txgbe also advertises IFF_SUPP_NOFCS and allowing users to use the SO_NOFCS socket option. But the driver does not check skb->no_fcs, so this option is silently ignored.
With this change, send() fails with -EPROTONOSUPPORT when AF_PACKET socket is set SO_NOFCS option.
--- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 1 - drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 1 - 2 files changed, 2 deletions(-)
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +0 -1
@@ -713,7 +713,6 @@ static int ngbe_probe(struct pci_dev *pdev, netdev->features |=NETIF_F_GRO ; netdev->priv_flags |=IFF_UNICAST_FLT ; - netdev->priv_flags |=IFF_SUPP_NOFCS ; netdev->priv_flags |=IFF_LIVE_ADDR_CHANGE ; netdev->min_mtu =ETH_MIN_MTU ;
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +0 -1
@@ -801,7 +801,6 @@ static int txgbe_probe(struct pci_dev *pdev, netdev->features |=NETIF_F_RX_UDP_TUNNEL_PORT ; netdev->priv_flags |=IFF_UNICAST_FLT ; - netdev->priv_flags |=IFF_SUPP_NOFCS ; netdev->priv_flags |=IFF_LIVE_ADDR_CHANGE ; netdev->min_mtu =ETH_MIN_MTU ;
Signature · 1 line
2.25.1
[email protected]
maintainerQuoted 6 lines
2026年6月17日 17:28,Rongguang Wei <[email protected]> 写道:
From: Rongguang Wei <[email protected]>
Quoted 7 lines
Like commit
a24162f18825("i40e: don't advertise IFF_SUPP_NOFCS"), ngbe and txgbe also advertisesIFF_SUPP_NOFCSand allowing users to use theSO_NOFCSsocket option. But the driver does not checkskb->no_fcs, so this option is silently ignored.With this change,
send()fails with-EPROTONOSUPPORTwhenAF_PACKETsocket is setSO_NOFCSoption.
In fact, the hardware supports this function, but it seems that no one is using it at present. To ensure that the interface does not report any errors, it can be removed.
Quoted 36 lines
Signed-off-by Rongguang Wei <[email protected]>---
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c| 1 -drivers/net/ethernet/wangxun/txgbe/txgbe_main.c| 1 -2 files changed, 2 deletions(-)drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +0
-1@@ -713,7 +713,6 @@ static int ngbe_probe(struct pci_dev *pdev, netdev->features |=NETIF_F_GRO ; netdev->priv_flags |=IFF_UNICAST_FLT ; - netdev->priv_flags |=IFF_SUPP_NOFCS ; netdev->priv_flags |=IFF_LIVE_ADDR_CHANGE ; netdev->min_mtu =ETH_MIN_MTU ;drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +0
-1@@ -801,7 +801,6 @@ static int txgbe_probe(struct pci_dev *pdev, netdev->features |=NETIF_F_RX_UDP_TUNNEL_PORT ; netdev->priv_flags |=IFF_UNICAST_FLT ; - netdev->priv_flags |=IFF_SUPP_NOFCS ; netdev->priv_flags |=IFF_LIVE_ADDR_CHANGE ; netdev->min_mtu =ETH_MIN_MTU ;Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 17 Jun 2026 17:28:54 +0800 you wrote:
From: Rongguang Wei <[email protected]>
Like commit
a24162f18825("i40e: don't advertise IFF_SUPP_NOFCS"), ngbe and txgbe also advertisesIFF_SUPP_NOFCSand allowing users to use theSO_NOFCSsocket option. But the driver does not checkskb->no_fcs, so this option is silently ignored.[...]
Here is the summary with links:
- [net-next,v1] net: wangxun: don't advertise IFF_SUPP_NOFCS
https://git.kernel.org/netdev/net/c/0ec4b7859870
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html