There was a bug in the way we were computing the remaining capacity
of a XSK frame, because we forgot to account for the network headers.
This caused some XSK responses to be discarded by the kernel (`tx_invalid_descs`)
because there was not enough space left in the frame (less than
`XDP_PACKET_HEADROOM`).
Thanks to `ednaq` for reporting this via ou YesWeHack program.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
size_t XskPacket::getCapacity() const noexcept
{
- return frameSize;
+ return frameSize - getDataOffset();
}
void XskPacket::changeDirectAndUpdateChecksum() noexcept