mirage-tcpip icon indicating copy to clipboard operation
mirage-tcpip copied to clipboard

Should q.xmit return value be ignored?

Open emillon opened this issue 5 years ago • 1 comments

Originally posted by @cfcs in https://github.com/mirage/mirage-tcpip/pull/370#issuecomment-443269244

@avsm Do you remember what this function (xmit) actually does?

@hannesm suggested that we could make it log when we get a Error _, but I can't figure out if this is supposed to fail, and I felt reluctant to add it in case it was supposed to fail 10k times per second in some cases. If it is not supposed to fail often, I think adding a warning message to the log sounds like a very sensible suggestion, especially if it is supposed to never fail and there are bugs to be fixed hiding in here.

emillon avatar Feb 03 '19 22:02 emillon

xmit will be some invocation of WIRE.xmit which is this function. It should fail only if the buffer given is too small or if the underlying interface fails to write the IP packet, if I'm reading correctly.

yomimono avatar Mar 08 '19 22:03 yomimono