On Wed, Mar 31, 2021 at 04:32 AM CEST, Cong Wang wrote: > From: Cong Wang <cong.wang@xxxxxxxxxxxxx> > > We only have skb_send_sock_locked() which requires callers > to use lock_sock(). Introduce a variant skb_send_sock() > which locks on its own, callers do not need to lock it > any more. This will save us from adding a ->sendmsg_locked > for each protocol. > > To reuse the code, pass function pointers to __skb_send_sock() > and build skb_send_sock() and skb_send_sock_locked() on top. > > Cc: John Fastabend <john.fastabend@xxxxxxxxx> > Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx> > Cc: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx> > Cc: Lorenz Bauer <lmb@xxxxxxxxxxxxxx> > Signed-off-by: Cong Wang <cong.wang@xxxxxxxxxxxxx> > --- Reviewed-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx>