Thread (33 messages) 33 messages, 9 authors, 2012-12-02

Re: TCP and reordering

From: David Woodhouse <dwmw2@infradead.org>
Date: 2012-12-02 09:31:38

On Sat, 2012-12-01 at 18:40 -0800, Eric Dumazet wrote:
quoted
+static unsigned int skb_acct_len(struct sk_buff *skb)
+{
+	return skb_tail_pointer(skb) - skb_network_header(skb);
+}
Apparently this driver doesnt add any feature at alloc_netdev() time, so
it might work. (no frags in any skb)
Well... as long as no driver appends stuff to the *tail* of the skb. As
long as they only *prepend* headers for the device to use, we're fine.
But I think that's fairly safe, for now.

For PPP I think I'll end up keeping a tuple of
	{ skb, orig_len, orig_destructor, orig_sk }
for each skb which is in-flight. Since the queues of those should be
*short*, and should generally complete in-order, that shouldn't be too
much overhead. It'll only need a small static array of them per-channel.

(Before complaining about a *static* array holding metadata about items
on a queue, stop thinking of the PPP channel being a queue and start
thinking of it more like a ring buffer.)

-- 
dwmw2

Attachments

  • smime.p7s [application/x-pkcs7-signature] 6171 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help