On Mon, Jan 8, 2024 at 7:36 AM Philippe Mathieu-Daudé <phi...@linaro.org> wrote: > Don't we want to initialize min_pktsz here ... > > min_pktsz = sizeof(min_pkt); > > > + if (eth_pad_short_frame(min_pkt, &min_pktsz, pkt, pktsz)) { > > ... because eth_pad_short_frame() update it?
Thanks for the review. The results would be the same, since eth_pad_short_frame() sets min_pktsz, if at all, to ETH_ZLEN, the same value as the initializer. I have no objection to re-initializing min_pktsz for each packet, however, if only to reduce the risk of a bug being introduced if this behavior of eth_pad_short_frame() were ever to be changed. Would you like me to post a revised patch?