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

Herbert Xu
2023-02-13T09:08:38Z

Linus Torvalds <torvalds@linux-foundation.org> 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@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt