> On 19/05/2020, at 11:19 AM, Alexandr Nedvedicky
> <[email protected]> wrote:
>
> I'm not sure about outbound path. chksum offload on outbound side got killed
> back in 2016 (I think). All that logic behind dealing with various HW did not
> pay off. If PF is doing NAT it's far more simple and reliable if we compute
> chksum in OS.
This is not quite correct: although we stopped regenerating checksums in 2016,
we continue to compute checksums late in the output path if needed[0], and
offload that to the card if supported.
The mbuf M_*_CSUM_OUT flags indicate if checksumming is needed, and offloading
drivers pass this state through to the card; the diff should do this, too.
cheers,
Richard.
[0] i.e. for packets of local origin;
see netinet/ip_output.c:in_proto_cksum_out()