Re: [PATCH bpf-next v4 07/11] bpf: Add instructions for atomic_[cmp]xchg

2020-12-14 Thread Brendan Jackman
Seems I never replied to this, thanks for the reviews! On Mon, Dec 07, 2020 at 10:37:32PM -0800, John Fastabend wrote: > Brendan Jackman wrote: > > This adds two atomic opcodes, both of which include the BPF_FETCH > > flag. XCHG without the BPF_FETCH flag would naturally encode > > atomic_set. Thi

RE: [PATCH bpf-next v4 07/11] bpf: Add instructions for atomic_[cmp]xchg

2020-12-07 Thread John Fastabend
Brendan Jackman wrote: > This adds two atomic opcodes, both of which include the BPF_FETCH > flag. XCHG without the BPF_FETCH flag would naturally encode > atomic_set. This is not supported because it would be of limited > value to userspace (it doesn't imply any barriers). CMPXCHG without > BPF_FE

RE: [PATCH bpf-next v4 07/11] bpf: Add instructions for atomic_[cmp]xchg

2020-12-07 Thread John Fastabend
Brendan Jackman wrote: > This adds two atomic opcodes, both of which include the BPF_FETCH > flag. XCHG without the BPF_FETCH flag would naturally encode > atomic_set. This is not supported because it would be of limited > value to userspace (it doesn't imply any barriers). CMPXCHG without > BPF_FE

Re: [PATCH bpf-next v4 07/11] bpf: Add instructions for atomic_[cmp]xchg

2020-12-07 Thread Yonghong Song
On 12/7/20 8:07 AM, Brendan Jackman wrote: This adds two atomic opcodes, both of which include the BPF_FETCH flag. XCHG without the BPF_FETCH flag would naturally encode atomic_set. This is not supported because it would be of limited value to userspace (it doesn't imply any barriers). CMPXCHG