netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/3] net: bcmgenet: use hardware padding of runt frames
@ 2020-06-25  1:14 Doug Berger
  2020-06-25  1:14 ` [PATCH net 1/3] net: bcmgenet: re-remove bcmgenet_hfb_add_filter Doug Berger
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Doug Berger @ 2020-06-25  1:14 UTC (permalink / raw)
  To: David S. Miller
  Cc: Florian Fainelli, Jakub Kicinski, bcm-kernel-feedback-list,
	netdev, linux-kernel, Doug Berger

Now that scatter-gather and tx-checksumming are enabled by default
it revealed a packet corruption issue that can occur for very short
fragmented packets.

When padding these frames to the minimum length it is possible for
the non-linear (fragment) data to be added to the end of the linear
header in an SKB. Since the number of fragments is read before the
padding and used afterward without reloading, the fragment that
should have been consumed can be tacked on in place of part of the
padding.

The third commit in this set corrects this by removing the software
padding and allowing the hardware to add the pad bytes if necessary.

The first two commits resolve warnings observed by the kbuild test
robot and are included here for simplicity of application.

Doug Berger (3):
  net: bcmgenet: re-remove bcmgenet_hfb_add_filter
  net: bcmgenet: use __be16 for htons(ETH_P_IP)
  net: bcmgenet: use hardware padding of runt frames

 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 88 ++------------------------
 1 file changed, 5 insertions(+), 83 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-25  4:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-25  1:14 [PATCH net 0/3] net: bcmgenet: use hardware padding of runt frames Doug Berger
2020-06-25  1:14 ` [PATCH net 1/3] net: bcmgenet: re-remove bcmgenet_hfb_add_filter Doug Berger
2020-06-25  1:51   ` Florian Fainelli
2020-06-25  1:14 ` [PATCH net 2/3] net: bcmgenet: use __be16 for htons(ETH_P_IP) Doug Berger
2020-06-25  1:50   ` Florian Fainelli
2020-06-25  1:14 ` [PATCH net 3/3] net: bcmgenet: use hardware padding of runt frames Doug Berger
2020-06-25  1:48   ` Florian Fainelli
2020-06-25  4:52 ` [PATCH net 0/3] " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).