All of lore.kernel.org
 help / color / mirror / Atom feed
* Focusing the XDP project
@ 2017-02-20 10:13 Jesper Dangaard Brouer
  2017-02-20 20:09 ` Alexander Duyck
  0 siblings, 1 reply; 20+ messages in thread
From: Jesper Dangaard Brouer @ 2017-02-20 10:13 UTC (permalink / raw)
  To: Alexei Starovoitov, Alexander Duyck, John Fastabend, David Miller
  Cc: brouer, Saeed Mahameed, Tom Herbert, netdev, Brenden Blanco


First thing to bring in order for the XDP project:

  RX batching is missing.

I don't want to discuss packet page-sizes or multi-port forwarding,
before we have established the most fundamental principal that all
other solution use; RX batching.

Without building in RX batching, from the beginning/now, the XDP
architecture have lost.  As adding features and capabilities, will
just lead us back to the exact same performance problems as before!


Today we already have the 64 packets NAPI budget, but we are not
taking advantage of this. For XDP as long as eBPF always return
XDP_DROP or XDP_TX, then we (falsely) experience the effect of bulking
(as code fits within the icache) and see huge perf boosts.

The initial principal of bulking/batching packets to amortize per
packet costs.  The next step is just as important: Lookup table sizes
(FIB) kills performance again. The solution is implementing a smart
table lookup scheme that prefetch hash table key-cells and afterwards
prefetch data-cells, based on the RX batch of packets.  Notice VPP
revolves around similar tricks, and why it beats DPDK, and why it
scales with 1Millon routes.

I hope I've made it very clear where the focus for XDP should be.
This involves implementing what I call RX-stages in the drivers. While
doing that we can figure out the most optimal data structure for
packet batching.
 I know Saeed is already working on RX-stages for mlx5, and I've tested
the initial version of his patch, and the results are excellent.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

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

end of thread, other threads:[~2017-02-22 22:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-20 10:13 Focusing the XDP project Jesper Dangaard Brouer
2017-02-20 20:09 ` Alexander Duyck
2017-02-20 22:57   ` Saeed Mahameed
2017-02-20 23:40     ` Alexander Duyck
2017-02-21 23:08       ` Saeed Mahameed
2017-02-21 16:35     ` Tom Herbert
2017-02-21 16:46       ` David Miller
2017-02-21 17:40         ` Tom Herbert
2017-02-21 18:11           ` David Miller
2017-02-21 18:23             ` Tom Herbert
2017-02-21 22:40           ` Saeed Mahameed
2017-02-21 23:04             ` Tom Herbert
2017-02-21 22:29       ` Saeed Mahameed
2017-02-21 22:54         ` Tom Herbert
2017-02-22  9:43           ` Jesper Dangaard Brouer
2017-02-22 17:22             ` Tom Herbert
2017-02-22 21:43               ` Jesper Dangaard Brouer
2017-02-22 22:08                 ` Tom Herbert
2017-02-20 23:39   ` Jesper Dangaard Brouer
2017-02-21  0:39     ` Alexander Duyck

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.