net: generalize sk_alloc_sg to work with scatterlist rings
authorJohn Fastabend <john.fastabend@gmail.com>
Sun, 18 Mar 2018 19:57:05 +0000 (12:57 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 19 Mar 2018 20:14:38 +0000 (21:14 +0100)
commit8c05dbf04b2882c3c0bc43fe7668c720210877f3
treeb13d4d3116498ab38c1493cdeb21254313c2f94d
parent312fc2b4c82e96a48cb2d0da2bd4816eb253c499
net: generalize sk_alloc_sg to work with scatterlist rings

The current implementation of sk_alloc_sg expects scatterlist to always
start at entry 0 and complete at entry MAX_SKB_FRAGS.

Future patches will want to support starting at arbitrary offset into
scatterlist so add an additional sg_start parameters and then default
to the current values in TLS code paths.

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