sock: make static tls function alloc_sg generic sock helper
authorJohn Fastabend <john.fastabend@gmail.com>
Sun, 18 Mar 2018 19:56:49 +0000 (12:56 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 19 Mar 2018 20:14:38 +0000 (21:14 +0100)
commit2c3682f0be97a5f57c6c8b40fa154dfc77efb461
tree186c43b0505e50aec6c151e5645fed98add35c8c
parent318df9f01cffabf120b36daa96dfca273e46cbbf
sock: make static tls function alloc_sg generic sock helper

The TLS ULP module builds scatterlists from a sock using
page_frag_refill(). This is going to be useful for other ULPs
so move it into sock file for more general use.

In the process remove useless goto at end of while loop.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/net/sock.h
net/core/sock.c
net/tls/tls_sw.c