HomeFreeBSD

Modify handling of EOF on socket and m_split() returning NULL.

Description

Modify handling of EOF on socket and m_split() returning NULL.

This patch modifies the behaviour of the krpc TCP client side socket
upcall function for certain failure scenarios.
When the soreceive() returns a fatal error or EOF on the socket,
the unpatched code would fail RPCs in progress immediately.
This patch modifies the behaviour so that it processes the ct_raw mbuf
list (data already received) before failing RPCs in progress, in case
the reply for an RPC is already in ct_raw.

For the case where m_split() returns NULL, the code now just returns
instead of failing RPCs in progress.
If the lack of mbufs is transient, a subsequent TCP segment might be
received so that progress on parsing RPC messages from the ct_raw
list can continue.
If not, clnt_reconnect_call() will eventually time out and try to
establish a new TCP connection to retry RPCs on.
Hopefully the transient lack of mbufs will be resolved so that a
new TCP connection can be established.

Details

Provenance
rmacklemAuthored on
Parents
rS362353: Add support for bcm54213PE in brgphy.
Branches
Unknown
Tags
Unknown