All of lore.kernel.org
 help / color / mirror / Atom feed
* [bpf-next V1 PATCH 0/8] bpf/xdp: add flags argument to ndo_xdp_xmit and flag flush operation
@ 2018-05-30 18:00 Jesper Dangaard Brouer
  2018-05-30 18:00 ` [bpf-next V1 PATCH 1/8] xdp: add flags argument to ndo_xdp_xmit API Jesper Dangaard Brouer
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Jesper Dangaard Brouer @ 2018-05-30 18:00 UTC (permalink / raw)
  To: netdev, Daniel Borkmann, Alexei Starovoitov, Jesper Dangaard Brouer
  Cc: John Fastabend, makita.toshiaki

As I mentioned in merge commit 10f678683e4 ("Merge branch 'xdp_xmit-bulking'")
I plan to change the API for ndo_xdp_xmit once more, by adding a flags
argument, which is done in this patchset.

I know it is late in the cycle (currently at rc7), but it would be
nice to avoid changing NDOs over several kernel releases, as it is
annoying to vendors and distro backporters, but it is not strictly
UAPI so it is allowed (according to Alexei).

The end-goal is getting rid of the ndo_xdp_flush operation, as it will
make it possible for drivers to implement a TXQ synchronization mechanism
that is not necessarily derived from the CPU id (smp_processor_id).

This patchset removes all callers of the ndo_xdp_flush operation, but
it doesn't take the last step of removing it from all drivers.  This
can be done later, or I can update the patchset on request.

Micro-benchmarks only show a very small performance improvement, for
map-redirect around ~2 ns, and for non-map redirect ~7 ns.  I've not
benchmarked this with CONFIG_RETPOLINE, but the performance benefit
should be more visible given we end-up removing an indirect call.

---

Jesper Dangaard Brouer (8):
      xdp: add flags argument to ndo_xdp_xmit API
      i40e: implement flush flag for ndo_xdp_xmit
      ixgbe: implement flush flag for ndo_xdp_xmit
      tun: implement flush flag for ndo_xdp_xmit
      virtio_net: implement flush flag for ndo_xdp_xmit
      xdp: done implementing ndo_xdp_xmit flush flag for all drivers
      bpf/xdp: non-map redirect can avoid calling ndo_xdp_flush
      bpf/xdp: devmap can avoid calling ndo_xdp_flush


 drivers/net/ethernet/intel/i40e/i40e_txrx.c   |    9 ++++++++-
 drivers/net/ethernet/intel/i40e/i40e_txrx.h   |    3 ++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   23 +++++++++++++++++------
 drivers/net/tun.c                             |   25 ++++++++++++++++++-------
 drivers/net/virtio_net.c                      |    9 ++++++++-
 include/linux/netdevice.h                     |    7 ++++---
 include/net/xdp.h                             |    4 ++++
 kernel/bpf/devmap.c                           |   20 +++++++-------------
 net/core/filter.c                             |    3 +--
 9 files changed, 69 insertions(+), 34 deletions(-)

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

end of thread, other threads:[~2018-05-31  8:47 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-30 18:00 [bpf-next V1 PATCH 0/8] bpf/xdp: add flags argument to ndo_xdp_xmit and flag flush operation Jesper Dangaard Brouer
2018-05-30 18:00 ` [bpf-next V1 PATCH 1/8] xdp: add flags argument to ndo_xdp_xmit API Jesper Dangaard Brouer
2018-05-30 21:55   ` Song Liu
2018-05-30 18:00 ` [bpf-next V1 PATCH 2/8] i40e: implement flush flag for ndo_xdp_xmit Jesper Dangaard Brouer
2018-05-30 21:58   ` Song Liu
2018-05-31  8:40     ` Jesper Dangaard Brouer
2018-05-31  8:47     ` Jesper Dangaard Brouer
2018-05-30 18:00 ` [bpf-next V1 PATCH 3/8] ixgbe: " Jesper Dangaard Brouer
2018-05-30 18:00 ` [bpf-next V1 PATCH 4/8] tun: " Jesper Dangaard Brouer
2018-05-30 18:00 ` [bpf-next V1 PATCH 5/8] virtio_net: " Jesper Dangaard Brouer
2018-05-30 18:01 ` [bpf-next V1 PATCH 6/8] xdp: done implementing ndo_xdp_xmit flush flag for all drivers Jesper Dangaard Brouer
2018-05-30 18:01 ` [bpf-next V1 PATCH 7/8] bpf/xdp: non-map redirect can avoid calling ndo_xdp_flush Jesper Dangaard Brouer
2018-05-30 18:01 ` [bpf-next V1 PATCH 8/8] bpf/xdp: devmap " Jesper Dangaard Brouer
2018-05-30 22:06   ` Song Liu
2018-05-31  7:49     ` Jesper Dangaard Brouer
2018-05-30 22:18 ` [bpf-next V1 PATCH 0/8] bpf/xdp: add flags argument to ndo_xdp_xmit and flag flush operation Song Liu
2018-05-31  7:39   ` 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.