RFC: Can the NFS code determine what NIC will be used?

From: Rick Macklem <rick.macklem_at_gmail.com>
Date: Wed, 28 Jan 2026 00:03:56 UTC
Hi,

Basically, the subject line says it all.

I am wondering if the NFS/krpc code (send side) can
determine what NIC will be used to send the RPC message.

Why?

Right now, the NFS code fills the RPC message into
M_EXTPG mbufs for the KTLS case only.
However, some NICs (Chelsio and Mellanox?) can
handle M_EXTPG mbufs, as indicated by the
IFCAP_MEXTPG flag being set.

As such, it would be nice if the NFS/krpc code could
determine if IFCAP_MEXTPG is set, so that it can
use M_EXTPG mbufs.
--> Yes, for other NICs, the mbuf chain will be copied
      in ip_output() by calling mb_unmapped_to_ext(),
      so they work, but I don't see any reason to fill the
      RPC message into M_EXTPG mbufs if ip_output()
      just ends up copying them?

The NFS/krpc code does know the IP host address of the
other end, so I think the question becomes "can the NFS/krpc
code do a routing call to find out what NIC will be used?".

Thanks for any info, rick

Thanks for any info, rick