netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] packet: add cBPF and eBPF fanout modes
@ 2015-08-15  2:31 Willem de Bruijn
  2015-08-15  2:31 ` [PATCH net-next v2 1/4] packet: add classic BPF fanout mode Willem de Bruijn
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Willem de Bruijn @ 2015-08-15  2:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, edumazet, daniel, ast, Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

Allow programmable fanout modes. Support both classical BPF programs
passed directly and extended BPF programs passed by file descriptor.

One use case is packet steering by deep packet inspection, for
instance for packet steering by application layer header fields.

Separate the configuration of the fanout mode and the configuration
of the program, to allow dynamic updates to the latter at runtime.

Changes
  v1 -> v2:
    - follow SO_LOCK_FILTER semantics on filter updates
    - only accept eBPF programs of type BPF_PROG_TYPE_SOCKET_FILTER
    - rename PACKET_FANOUT_BPF to PACKET_FANOUT_CBPF to match
      man 2 bpf usage: "classic" vs. "extended" BPF.

Willem de Bruijn (4):
  packet: add classic BPF fanout mode
  packet: add extended BPF fanout mode
  selftests/net: test classic bpf fanout mode
  selftests/net: test extended BPF fanout mode

 include/uapi/linux/if_packet.h             |   3 +
 net/packet/af_packet.c                     | 130 ++++++++++++++++++++++++++++-
 net/packet/internal.h                      |   5 +-
 tools/testing/selftests/net/psock_fanout.c |  69 ++++++++++++++-
 tools/testing/selftests/net/psock_lib.h    |  29 +++++--
 5 files changed, 222 insertions(+), 14 deletions(-)

-- 
2.5.0.276.gf5e568e

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

end of thread, other threads:[~2015-08-17 21:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-15  2:31 [PATCH net-next v2 0/4] packet: add cBPF and eBPF fanout modes Willem de Bruijn
2015-08-15  2:31 ` [PATCH net-next v2 1/4] packet: add classic BPF fanout mode Willem de Bruijn
2015-08-16  4:58   ` Alexei Starovoitov
2015-08-16  9:15   ` Daniel Borkmann
2015-08-17 14:29   ` Eric Dumazet
2015-08-15  2:31 ` [PATCH net-next v2 2/4] packet: add extended " Willem de Bruijn
2015-08-16  4:58   ` Alexei Starovoitov
2015-08-16  9:15   ` Daniel Borkmann
2015-08-15  2:31 ` [PATCH net-next v2 3/4] selftests/net: test classic bpf " Willem de Bruijn
2015-08-15  2:31 ` [PATCH net-next v2 4/4] selftests/net: test extended BPF " Willem de Bruijn
2015-08-17 21:23 ` [PATCH net-next v2 0/4] packet: add cBPF and eBPF fanout modes David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).