Re: [Patch bpf-next v6 02/12] skmsg: introduce a spinlock to protect ingress_msg

2021-03-22 Thread Cong Wang
On Mon, Mar 22, 2021 at 6:25 PM Yunsheng Lin wrote: > > On 2021/3/23 8:37, Cong Wang wrote: > > +static inline struct sk_msg *sk_psock_next_msg(struct sk_psock *psock, > > +struct sk_msg *msg) > > +{ > > + struct sk_msg *ret; > > Nit: > Use msg inste

Re: [Patch bpf-next v6 02/12] skmsg: introduce a spinlock to protect ingress_msg

2021-03-22 Thread Yunsheng Lin
On 2021/3/23 8:37, Cong Wang wrote: > From: Cong Wang > > Currently we rely on lock_sock to protect ingress_msg, > it is too big for this, we can actually just use a spinlock > to protect this list like protecting other skb queues. > > __tcp_bpf_recvmsg() is still special because of peeking, > i

[Patch bpf-next v6 02/12] skmsg: introduce a spinlock to protect ingress_msg

2021-03-22 Thread Cong Wang
From: Cong Wang Currently we rely on lock_sock to protect ingress_msg, it is too big for this, we can actually just use a spinlock to protect this list like protecting other skb queues. __tcp_bpf_recvmsg() is still special because of peeking, it still has to use lock_sock. Cc: John Fastabend C