Skip to content

Commit 0333e5d

Browse files
6by9popcornmix
authored andcommitted
net: lan78xx: Request s/w csum check on VLAN tagged packets.
There appears to be some issue in the LAN78xx where the checksum computed on a VLAN tagged packet is incorrect, or at least not in the form that the kernel is after. This is most easily shown by pinging a device via a VLAN tagged interface and it will dump out the error message and stack trace from netdev_rx_csum_fault. It has also been seen with standard TCP and UDP packets. Until this is fully understood, request that the network stack computes the checksum on packets signalled as having a VLAN tag applied. See #2458 Signed-off-by: Dave Stevenson <[email protected]>
1 parent db79d36 commit 0333e5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/usb/lan78xx.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2985,8 +2985,12 @@ static void lan78xx_rx_csum_offload(struct lan78xx_net *dev,
29852985
struct sk_buff *skb,
29862986
u32 rx_cmd_a, u32 rx_cmd_b)
29872987
{
2988+
/* Checksum offload appears to be flawed if used with VLANs.
2989+
* Elect for sw checksum check instead.
2990+
*/
29882991
if (!(dev->net->features & NETIF_F_RXCSUM) ||
2989-
unlikely(rx_cmd_a & RX_CMD_A_ICSM_)) {
2992+
unlikely(rx_cmd_a & RX_CMD_A_ICSM_) ||
2993+
(rx_cmd_a & RX_CMD_A_FVTG_)) {
29902994
skb->ip_summed = CHECKSUM_NONE;
29912995
} else {
29922996
skb->csum = ntohs((u16)(rx_cmd_b >> RX_CMD_B_CSUM_SHIFT_));

0 commit comments

Comments
 (0)