mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
nic: Fix incorrect wrap handling of RX circular buffer
nic: move other nic functions into the dedicated nic files uip: alloc buffer multiple of 8 bytes Signed-off-by: João Silva <jgc3silva@gmail.com>
This commit is contained in:
18 files changed
+435
-117
No files matched your search
@@ -132,6 +132,10 @@ typedef unsigned short uip_stats_t;
|
||||
*/
|
||||
#define UIP_CONF_BUFFER_SIZE 1556
|
||||
|
||||
/* Backing storage includes padding for the NIC's eight-byte DMA transfers.
|
||||
* Keep UIP_CONF_BUFFER_SIZE as the logical frame/MSS limit. */
|
||||
#define UIP_CONF_BUFFER_ALLOC_SIZE ((UIP_CONF_BUFFER_SIZE + 7U) & ~7U)
|
||||
|
||||
/**
|
||||
* Bytes of the buffer kept out of the advertised MSS.
|
||||
*
|
||||
|
||||
@@ -136,7 +136,7 @@ static __code const uip_ipaddr_t all_zeroes_addr =
|
||||
#endif /* UIP_CONF_IPV6 */
|
||||
|
||||
#ifndef UIP_CONF_EXTERNAL_BUFFER
|
||||
u8_t uip_buf[UIP_BUFSIZE + 2]; /* The packet buffer that contains
|
||||
u8_t uip_buf[UIP_CONF_BUFFER_ALLOC_SIZE]; /* The packet buffer that contains
|
||||
incoming packets. */
|
||||
#endif /* UIP_CONF_EXTERNAL_BUFFER */
|
||||
|
||||
|
||||
+1
-1
@@ -419,7 +419,7 @@
|
||||
#endif /* UIP_CONF_BUFFER_EXTRA */
|
||||
|
||||
|
||||
extern __xdata uint8_t uip_buf[UIP_CONF_BUFFER_SIZE+2];
|
||||
extern __xdata uint8_t uip_buf[UIP_CONF_BUFFER_ALLOC_SIZE];
|
||||
|
||||
/**
|
||||
* Determines if statistics support should be compiled in.
|
||||
|
||||
Reference in new issue
Block a user