grub/grub-core/net/drivers
Stanislav Kholmanskikh 130234bc78 ofnet: implement the receive buffer
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 <stanislav.kholmanskikh@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2016-12-14 14:13:34 +01:00
..
efi efinet: handle get_status() on buggy firmware properly 2015-08-09 16:37:26 +03:00
emu emunet: Fix init error checking. 2015-03-20 12:59:00 +01:00
i386/pc net/pxe: fix error condition 2015-01-30 22:39:11 +03:00
ieee1275 ofnet: implement the receive buffer 2016-12-14 14:13:34 +01:00
uboot Leif's API fixes 2013-05-03 15:07:39 +02:00