Commit b5dd884e682cae6b8c037f9d11f3b623b4cf2011
Committed by
David S. Miller
1 parent
06b71b657b
Exists in
master
and in
7 other branches
net: Fix 'Re: PACKET_TX_RING: packet size is too long'
Currently PACKET_TX_RING forces certain amount of every frame to remain unused. This probably originates from an early version of the PACKET_TX_RING patch that in fact used the extra space when the (since removed) CONFIG_PACKET_MMAP_ZERO_COPY option was enabled. The current code does not make any use of this extra space. This patch removes the extra space reservation and lets userspace make use of the full frame size. Signed-off-by: Gabor Gombas <gombasg@sztaki.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 4 deletions Side-by-side Diff
net/packet/af_packet.c
... | ... | @@ -982,10 +982,7 @@ |
982 | 982 | goto out_put; |
983 | 983 | |
984 | 984 | size_max = po->tx_ring.frame_size |
985 | - - sizeof(struct skb_shared_info) | |
986 | - - po->tp_hdrlen | |
987 | - - LL_ALLOCATED_SPACE(dev) | |
988 | - - sizeof(struct sockaddr_ll); | |
985 | + - (po->tp_hdrlen - sizeof(struct sockaddr_ll)); | |
989 | 986 | |
990 | 987 | if (size_max > dev->mtu + reserve) |
991 | 988 | size_max = dev->mtu + reserve; |