[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181012201612.zghznihoqrpt32tg@mohitraman-mbp.dhcp.thefacebook.com>
Date: Fri, 12 Oct 2018 20:16:15 +0000
From: Dave Watson <davejwatson@...com>
To: Daniel Borkmann <daniel@...earbox.net>
CC: "alexei.starovoitov@...il.com" <alexei.starovoitov@...il.com>,
"john.fastabend@...il.com" <john.fastabend@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf-next 4/8] tls: convert to generic sk_msg interface
On 10/11/18 02:45 AM, Daniel Borkmann wrote:
> Convert kTLS over to make use of sk_msg interface for plaintext and
> encrypted scattergather data, so it reuses all the sk_msg helpers
> and data structure which later on in a second step enables to glue
> this to BPF.
Looks very clean, thanks!
>
> -static int zerocopy_from_iter(struct sock *sk, struct iov_iter *from,
> - int length, int *pages_used,
> - unsigned int *size_used,
> - struct scatterlist *to, int to_max_pages,
> - bool charge)
> -{
...
> - err = zerocopy_from_iter(sk, out_iov, data_len, &pages,
> - chunk, &sgout[1],
> - (n_sgout - 1), false);
> + err = tls_setup_from_iter(sk, out_iov, data_len,
> + &pages, chunk, &sgout[1],
> + (n_sgout - 1));
Any reason not to add the 'bool charge' to sk_msg_zerocopy_from_iter?
Then tls_setup_from_iter is not necessary.
Powered by blists - more mailing lists