]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add setsockopt helper function to bpf
authorLawrence Brakmo <brakmo@fb.com>
Sat, 1 Jul 2017 03:02:46 +0000 (20:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Jul 2017 23:15:13 +0000 (16:15 -0700)
commitad4107248f6f1a215fdf5d93cbfe4ac3e378420d
treeb4215d293911949d5373baef37c29ca0d09df1e3
parent8b94a1f62d5e6f6597d668fefae382c6fd7de4ae
bpf: Add setsockopt helper function to bpf

Added support for calling a subset of socket setsockopts from
BPF_PROG_TYPE_SOCK_OPS programs. The code was duplicated rather
than making the changes to call the socket setsockopt function because
the changes required would have been larger.

The ops supported are:
  SO_RCVBUF
  SO_SNDBUF
  SO_MAX_PACING_RATE
  SO_PRIORITY
  SO_RCVLOWAT
  SO_MARK

Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/bpf.h
net/core/filter.c
samples/bpf/bpf_helpers.h