um: Loadable BPF "Firmware" for vector drivers
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>
Wed, 2 Oct 2019 10:26:45 +0000 (11:26 +0100)
committerRichard Weinberger <richard@nod.at>
Mon, 25 Nov 2019 21:43:31 +0000 (22:43 +0100)
commit9807019a62dc670c73ce8e59e09b41ae458c34b3
tree0ba729a1c5591cec5b6ad09117c0dac8f6abe1a6
parent7d8093a56063e5d7c4459d9d025a57e0c5186ce9
um: Loadable BPF "Firmware" for vector drivers

All vector drivers now allow a BPF program to be loaded and
associated with the RX socket in the host kernel.

1. The program can be loaded as an extra kernel command line
option to any of the vector drivers.

2. The program can also be loaded as "firmware", using the
ethtool flash option. It is possible to turn this facility
on or off using a command line option.

A simplistic wrapper for generating the BPF firmware for the raw
socket driver out of a tcpdump/libpcap filter expression can be
found at: https://github.com/kot-begemot-uk/uml_vector_utilities/

Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/vector_kern.c
arch/um/drivers/vector_kern.h
arch/um/drivers/vector_user.c
arch/um/drivers/vector_user.h