[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] net/vmnet: Pad short Ethernet frames
|
From: |
William Hooper |
|
Subject: |
Re: [PATCH] net/vmnet: Pad short Ethernet frames |
|
Date: |
Tue, 9 Jan 2024 21:34:35 -0800 |
On Mon, Jan 8, 2024 at 7:36 AM Philippe Mathieu-Daudé <philmd@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?