Re: copy on write for splice() from file to pipe?

From: Herbert Xu
Date: Mon Feb 13 2023 - 04:08:41 EST


Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> - if (!(sk->sk_route_caps & NETIF_F_SG))
> + if (!(sk->sk_route_caps & NETIF_F_SG) ||
> + !(sk->sk_route_caps & (NETIF_F_HW_CSUM | NETIF_F_IP_CSUM)))
> return sock_no_sendpage_locked(sk, page, offset, size, flags);

NETIF_F_SG depends on checksum offload so it should already be
calling sock_no_sendpage_locked if checksum offload is not
supported.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt