[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V2 4/4] ofnet: implement the receive buffer

From: Daniel Kiper
Subject: Re: [PATCH V2 4/4] ofnet: implement the receive buffer
Date: Mon, 5 Dec 2016 17:12:00 +0100
User-agent: Mutt/1.3.28i

On Fri, Dec 02, 2016 at 06:10:05PM +0300, Stanislav Kholmanskikh wrote:
> get_card_packet() from ofnet.c allocates a netbuff based on the device's MTU:
>  nb = grub_netbuff_alloc (dev->mtu + 64 + 2);
> In the case when the MTU is large, and the received packet is
> relatively small, this leads to allocation of significantly more memory,
> than it's required. An example could be transmission of TFTP packets
> with 0x400 blksize via a network card with 0x10000 MTU.
> This patch implements a per-card receive buffer in a way similar to efinet.c,
> and makes get_card_packet() allocate a netbuff of the received data size.
> Signed-off-by: Stanislav Kholmanskikh <address@hidden>

Reviewed-by: Daniel Kiper <address@hidden>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]