Hello Jonathan,

I think it makes sense to turn it on on inbound path. we certainly
get a performance boost if HW verifies header checksums for us.

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. 

</snip>

> @@ -6343,6 +6657,7 @@ mcx_start(struct ifqueue *ifq)
>               sqe->sqe_signature = htobe32(MCX_SQE_CE_CQE_ALWAYS);
>  
>               /* eth segment */
> +             sqe->sqe_mss_csum = htobe32(MCX_SQE_L3_CSUM | MCX_SQE_L4_CSUM);
>               sqe->sqe_inline_header_size = htobe16(MCX_SQ_INLINE_SIZE);
>               m_copydata(m, 0, MCX_SQ_INLINE_SIZE,
>                   (caddr_t)sqe->sqe_inline_headers);
> 

    I assume code above turns out HW chksums on outbound packets. I think
    it does not matter much, because outbound packet currently arrives with
    chksum calculated by OS anyway.

    Also there might be some edge-cases, when we want to deliberately inject a
    packet with broken header checksums to network. I'm afraid the HW would
    fix such broken packets for us.

As I've said: I think it makes sense to enable HW offload on inbound path to
verify chksums. 

thanks and
regards
sashan

Reply via email to