All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Make dev_hard_start_xmit() work fundamentall on lists
@ 2014-09-01 22:24 David Miller
  2014-09-02  7:51 ` Jesper Dangaard Brouer
  0 siblings, 1 reply; 2+ messages in thread
From: David Miller @ 2014-09-01 22:24 UTC (permalink / raw)
  To: netdev


After this patch set, dev_hard_start_xmit() will work fundemantally
on any and all SKB lists.

This opens the path for a clean implementation of pulling multiple
packets out during qdisc_restart(), and then passing that blob
in one shot to dev_hard_start_xmit().

There were two main architectural blockers to this:

1) The GSO handling, we kept the original GSO head SKB around
   simply because dev_hard_start_xmit() had no way to communicate
   to the caller how far into the segmented list it was able to
   go.  Now it can, so the head GSO can be liberated immediately.

   All of the special GSO head SKB destructor et al. handling goes
   away too.

2) Validate of VLAN, CSUM, and segmentation characteristics was being
   performed inside of dev_hard_start_xmit().  If want to truly batch,
   we have to let the higher levels to this.  In particular, this is
   now dequeue_skb()'s job.

And with those two issues out of the way, it should now be trivial to
build experiments on top of this patch set, all of the framework
should be there now.  You could do something as simple as:

	skb = q->dequeue(q);
	if (skb)
		skb = validate_xmit_skb(skb, qdisc_dev(q));
	if (skb) {
		struct sk_buff *new, *head = skb;
		int limit = 5;

		do {
			new = q->dequeue(q);
			if (new)
				new = validate_xmit_skb(new, qdisc_dev(q));
			if (new) {
				skb->next = new;
				skb = new;
			}
		} while (new && --limit);
		skb = head;
	}

inside of the else branch of dequeue_skb().

Signed-off-by: David S. Miller <davem@davemloft.net>

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

* Re: [PATCH 0/9] Make dev_hard_start_xmit() work fundamentall on lists
  2014-09-01 22:24 [PATCH 0/9] Make dev_hard_start_xmit() work fundamentall on lists David Miller
@ 2014-09-02  7:51 ` Jesper Dangaard Brouer
  0 siblings, 0 replies; 2+ messages in thread
From: Jesper Dangaard Brouer @ 2014-09-02  7:51 UTC (permalink / raw)
  To: David Miller; +Cc: brouer, netdev

On Mon, 01 Sep 2014 15:24:30 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> After this patch set, dev_hard_start_xmit() will work fundemantally
> on any and all SKB lists.

This is really excellent work, thank you!
dev_hard_start_xmit() looks so clean now :-)

 
> This opens the path for a clean implementation of pulling multiple
> packets out during qdisc_restart(), and then passing that blob
> in one shot to dev_hard_start_xmit().

Sounds perfect.  I'll start to experiment with qdisc stuff.

> And with those two issues out of the way, it should now be trivial to
> build experiments on top of this patch set, all of the framework
> should be there now.  You could do something as simple as:

As xmit_list()/dev_hard_start_xmit() depend on all SKBs belonging to
the same TXQ, below code should also take this into account.

Thus, bulk dequeue will only see the benefit (of taking the qdisc lock
less) when packets are for the same TXQ.  But I guess this is a good
design choice, as this makes the rest of the code simpler to work with.

> 	skb = q->dequeue(q);
> 	if (skb)
> 		skb = validate_xmit_skb(skb, qdisc_dev(q));
> 	if (skb) {
> 		struct sk_buff *new, *head = skb;
> 		int limit = 5;
> 
> 		do {
> 			new = q->dequeue(q);
> 			if (new)
> 				new = validate_xmit_skb(new, qdisc_dev(q));
> 			if (new) {
> 				skb->next = new;
> 				skb = new;
> 			}
> 		} while (new && --limit);
> 		skb = head;
> 	}
> 
> inside of the else branch of dequeue_skb().
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>


-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

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

end of thread, other threads:[~2014-09-02  7:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01 22:24 [PATCH 0/9] Make dev_hard_start_xmit() work fundamentall on lists David Miller
2014-09-02  7:51 ` Jesper Dangaard Brouer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.