Re: [PATCH 26/29] net/tls: use the new scatterwalk functions

Eric Biggers
2024-12-23T19:42:55Z

On Mon, Dec 23, 2024 at 07:48:25AM -0800, Jakub Kicinski wrote:
> On Sat, 21 Dec 2024 01:10:53 -0800 Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > Replace calls to the deprecated function scatterwalk_copychunks() with
> > memcpy_from_scatterwalk(), memcpy_to_scatterwalk(), or
> > scatterwalk_skip() as appropriate.
> >
> > The new functions behave more as expected and eliminate the need to call
> > scatterwalk_done() or scatterwalk_pagedone(). This was not always being
> > done when needed, and therefore the old code appears to have also had a
> > bug where the dcache of the destination page(s) was not always being
> > flushed on architectures that need that.
> >
> > Cc: Boris Pismenny <borisp@nvidia.com>
> > Cc: Jakub Kicinski <kuba@kernel.org>
> > Cc: John Fastabend <john.fastabend@gmail.com>
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
>
> Acked-by: Jakub Kicinski <kuba@kernel.org>

Thanks. FYI I will need to update this patch in the next version, as I did not
take into consideration what chain_to_walk() is doing. This code seems to be a
bit unique in how it is using the scatterwalk functions.

Also I think the second paragraph of my commit message is wrong, as the calls to
scatterwalk_done() in tls_enc_records() are the ones I thought were missing.

- Eric