]> asedeno.scripts.mit.edu Git - linux.git/commit
net: ethernet: sun: niu set correct packet size in skb
authorRob Taglang <rob@taglang.io>
Thu, 3 May 2018 21:13:06 +0000 (17:13 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 May 2018 17:20:46 +0000 (13:20 -0400)
commit14224923c3600bae2ac4dcae3bf0c3d4dc2812be
treea5ffc43556f30af4e77734e493a26ed41c7f9cf4
parentae552ac2785d69189c865dcea7e71da02180c59c
net: ethernet: sun: niu set correct packet size in skb

Currently, skb->len and skb->data_len are set to the page size, not
the packet size. This causes the frame check sequence to not be
located at the "end" of the packet resulting in ethernet frame check
errors. The driver does work currently, but stricter kernel facing
networking solutions like OpenVSwitch will drop these packets as
invalid.

These changes set the packet size correctly so that these errors no
longer occur. The length does not include the frame check sequence, so
that subtraction was removed.

Tested on Oracle/SUN Multithreaded 10-Gigabit Ethernet Network
Controller [108e:abcd] and validated in wireshark.

Signed-off-by: Rob Taglang <rob@taglang.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/niu.c