Fixed bug #29148 (Incorrect PBUF_POOL_BUFSIZE for ports where ETH_PAD_SIZE > 0) by moving definition of ETH_PAD_SIZE to opt.h and basing PBUF_LINK_HLEN on it.

This commit is contained in:
goldsimon 2010-03-14 10:16:43 +00:00
parent 67f5e17588
commit 4e764017c1
3 changed files with 16 additions and 5 deletions

View File

@ -158,6 +158,11 @@ HISTORY
++ Bugfixes:
2010-03-14: Simon Goldschmidt
* opt.h, etharp.h: Fixed bug #29148 (Incorrect PBUF_POOL_BUFSIZE for ports
where ETH_PAD_SIZE > 0) by moving definition of ETH_PAD_SIZE to opt.h
and basing PBUF_LINK_HLEN on it.
2010-03-08: Simon Goldschmidt
* netif.c, ipv4/ip.c: task #10241 (AutoIP: don't break existing connections
when assiging routable address): when checking incoming packets and

View File

@ -435,6 +435,16 @@
#define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT)
#endif
/** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure
* alignment of payload after that header. Since the header is 14 bytes long,
* without this padding e.g. addresses in the IP header will not be aligned
* on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms.
*/
#ifndef ETH_PAD_SIZE
#define ETH_PAD_SIZE 0
#endif
/*
--------------------------------
---------- IP options ----------
@ -997,7 +1007,7 @@
* Ethernet.
*/
#ifndef PBUF_LINK_HLEN
#define PBUF_LINK_HLEN 14
#define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
#endif
/**

View File

@ -48,10 +48,6 @@
extern "C" {
#endif
#ifndef ETH_PAD_SIZE
#define ETH_PAD_SIZE 0
#endif
#ifndef ETHARP_HWADDR_LEN
#define ETHARP_HWADDR_LEN 6
#endif