freebsd-dev/sys/rpc
Mark Johnston fcaa890c44 mbuf: Only allow extpg mbufs if the system has a direct map
Some upcoming changes will modify software checksum routines like
in_cksum() to operate using m_apply(), which uses the direct map to
access packet data for unmapped mbufs.  This approach of course does not
work on platforms without a direct map, so we have to disallow the use
of unmapped mbufs on such platforms.

I believe this is the right tradeoff: we only configure KTLS on amd64
and arm64 today (and one KTLS consumer, NFS TLS, requires a direct map
already), and the use of unmapped mbufs with plain sendfile is a recent
optimization.  If need be, m_apply() could be modified to create
CPU-private mappings of extpg mbuf pages as a fallback.

So, change mb_use_ext_pgs to be hard-wired to zero on systems without a
direct map.  Note that PMAP_HAS_DMAP is not a compile-time constant on
some systems, so the default value of mb_use_ext_pgs has to be
determined during boot.

Reviewed by:	jhb
Discussed with:	gallatin
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32940
2021-11-16 13:31:04 -05:00
..
rpcsec_gss rpc: Make function tables const 2021-08-14 11:26:12 -04:00
rpcsec_tls mbuf: Only allow extpg mbufs if the system has a direct map 2021-11-16 13:31:04 -05:00
auth_none.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
auth_unix.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
auth.h rpc: Make function tables const 2021-08-14 11:26:12 -04:00
authunix_prot.c
clnt_bck.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
clnt_dg.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
clnt_rc.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
clnt_stat.h
clnt_vc.c Don't require the socket lock for sorele(). 2021-11-09 10:50:12 -08:00
clnt.h rpc: Make function tables const 2021-08-14 11:26:12 -04:00
getnetconfig.c
krpc.h
netconfig.h
nettype.h
pmap_prot.h
replay.c
replay.h
rpc_callmsg.c
rpc_com.h
rpc_generic.c
rpc_msg.h
rpc_prot.c
rpc.h
rpcb_clnt.c
rpcb_clnt.h
rpcb_prot.c
rpcb_prot.h
rpcm_subs.h
rpcsec_gss.h
rpcsec_tls.h
svc_auth_unix.c
svc_auth.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
svc_auth.h
svc_dg.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
svc_generic.c
svc_vc.c Don't require the socket lock for sorele(). 2021-11-09 10:50:12 -08:00
svc.c
svc.h Fix a common typo in source code comments 2021-09-04 12:56:57 +02:00
types.h
xdr.h