HomeFreeBSD

cxgbe nic TLS: Fix requests with 8 bytes of immediate data padding

Description

cxgbe nic TLS: Fix requests with 8 bytes of immediate data padding

Requests whose immediate data do not end on a 16-byte boundary are
padded with zeroes before the next WR command. Since ULP commands are
8 byte aligned, if there are more than 8 bytes of padding, the
immediate data is padded with zeroes up to an 8 byte boundary and the
last 8 bytes contain a ULP NOOP command.

In the case of exactly 8 bytes of padding, the result should be that
no zeroes are inserted, only the ULP NOOP. However, the code was
actually inserting 8 bytes of zero padding followed by the ULP NOOP
causing the following real command to be misaligned. Fix this by
skipping the zero padding if there exactly 8 padding bytes.

Reported by: Sony Arpita Das @ Chelsio
Sponsored by: Chelsio Communications

Details

Provenance
jhbAuthored on May 13 2025, 1:57 PM
Parents
rG313713b24c6d: column(1): add -l flag
Branches
Unknown
Tags
Unknown