Message ID | 20091015201028.GA9780@boogie.lpds.sztaki.hu |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Gabor Gombas <gombasg@sztaki.hu> Date: Thu, 15 Oct 2009 22:10:29 +0200 > 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> Applied, thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Oct 29, 2009 at 03:19:17AM -0700, David Miller wrote: > From: Gabor Gombas <gombasg@sztaki.hu> > Date: Thu, 15 Oct 2009 22:10:29 +0200 > > > 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> > > Applied, thanks! Thanks! Does it have a chance to be included in 2.6.32, or it is too late in the rc series? Gabor
From: Gabor Gombas <gombasg@sztaki.hu> Date: Thu, 29 Oct 2009 11:29:24 +0100 > On Thu, Oct 29, 2009 at 03:19:17AM -0700, David Miller wrote: > >> From: Gabor Gombas <gombasg@sztaki.hu> >> Date: Thu, 15 Oct 2009 22:10:29 +0200 >> >> > 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> >> >> Applied, thanks! > > Thanks! Does it have a chance to be included in 2.6.32, or it is too > late in the rc series? It will be merged to Linus for 2.6.23 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index f9f7177..745a016 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -985,10 +985,7 @@ static int tpacket_snd(struct packet_sock *po, struct msghdr *msg) goto out_put; size_max = po->tx_ring.frame_size - - sizeof(struct skb_shared_info) - - po->tp_hdrlen - - LL_ALLOCATED_SPACE(dev) - - sizeof(struct sockaddr_ll); + - (po->tp_hdrlen - sizeof(struct sockaddr_ll)); if (size_max > dev->mtu + reserve) size_max = dev->mtu + reserve;