Re: [PATCH bpf] bpf: allow clearing all sock_ops callback flags

2019-04-16 Thread Alexei Starovoitov
On Mon, Apr 15, 2019 at 2:55 AM Viet Hoang Tran wrote: > > The helper function bpf_sock_ops_cb_flags_set() can be used to both > set and clear the sock_ops callback flags. However, its current > behavior is not consistent. BPF program may clear a flag if more than > one were set, or replace a flag

Re: [PATCH bpf] bpf: allow clearing all sock_ops callback flags

2019-04-15 Thread Martin Lau
On Mon, Apr 15, 2019 at 09:54:55AM +, Viet Hoang Tran wrote: > The helper function bpf_sock_ops_cb_flags_set() can be used to both > set and clear the sock_ops callback flags. However, its current > behavior is not consistent. BPF program may clear a flag if more than > one were set, or replace

[PATCH bpf] bpf: allow clearing all sock_ops callback flags

2019-04-15 Thread Viet Hoang Tran
The helper function bpf_sock_ops_cb_flags_set() can be used to both set and clear the sock_ops callback flags. However, its current behavior is not consistent. BPF program may clear a flag if more than one were set, or replace a flag with another one, but cannot clear all flags. This patch also up