BUG/MEDIUM: h3: fix incorrect DATA size block on DEM FULL
The following patch fixes h3_data_to_htx() to ensure the correct value
is returned in case of buffer wrapper.
bcdbc399d34f82a21c49162f203f2ff16b0aed79
BUG/MEDIUM: h3: fix end-of-input report on DATA wrapping
However, this introduces a regression when HTX buffer is smaller than
the copied block. In this case, QCS is flagged with QC_SF_DEM_FULL, but
early goto skip the increment on <htx_sent> total value.
This causes corrupted transfers with H3 POST larger than a bufsize
resulting in a larger payload. This is caused by duplicated data blocks
when copy resumes after hitting QC_SF_DEM_FULL condition.
Fix this by ensuring <htx_sent> is always updated before the early goto
path. Intent of the above fix is kept as well as <ret> still serves as a
comparison for QC_SF_DEM_FULL / EOM cases.
This must be backported along the above patch, planned up to 2.6 (after
a period of observation).