> On Jan 28, 2026, at 8:03 AM, Rick Macklem <[email protected]> wrote:
> 
> 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?".

Given the dest IP address is known, you can find the nexthop
info from fib4_lookup() and then extract the ifnet from the nexthop
info. The usage of fib4_lookup() in ip_output() is a good example.

> 
> Thanks for any info, rick
> 
> Thanks for any info, rick
> 

Best regards,
Zhenlei


Reply via email to