]> git.baikalelectronics.ru Git - kernel.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)
commit136ed2360310d97cbf00d245d0afcd22b3ca1583
treea5ffc43556f30af4e77734e493a26ed41c7f9cf4
parente0ec5bd73266bcb41c6a5232e3d71da0baa3da2b
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