lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] IP frag/reassembly


From: Jonathan Larmour
Subject: Re: [lwip-users] IP frag/reassembly
Date: Thu, 26 Oct 2006 14:33:15 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060913)

Kieran Mansley wrote:
On Thu, 2006-10-26 at 15:01 +0200, Christiaan Simons wrote:

Please send it to the lwIP savannah patch manager.
http://savannah.nongnu.org/patch/?group=lwip

They may be lost in the noise on this list.

Of course, yes. Done.

Worth CC'ing the list too as there will be a much wider audience here
that might have opinions on the patch.

OK, attached. It turns out that nothing uses IP_REASS_TMO (which was renamed at some point to IP_REASS_INTERVAL).

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
------["The best things in life aren't things."]------      Opinions==mine

Index: CHANGELOG
===================================================================
RCS file: /sources/lwip/lwip/CHANGELOG,v
retrieving revision 1.49
diff -u -5 -p -r1.49 CHANGELOG
--- CHANGELOG   11 Oct 2006 12:04:04 -0000      1.49
+++ CHANGELOG   26 Oct 2006 13:23:21 -0000
@@ -25,10 +25,17 @@ HISTORY
 
   * [Enter new changes just after this line - do not remove this line]
 
   ++ New features:
 
+  2006-10-26 Jonathan Larmour
+  * src/core/ipv4/ip_frag.c: rename MAX_MTU to IP_FRAG_MAX_MTU and move define
+    to include/lwip/opt.h.
+  * include/ipv4/lwip/ip_frag.h: Remove unused IP_REASS_INTERVAL.
+    Move IP_REASS_MAXAGE and IP_REASS_BUFSIZE to include/lwip/opt.h.
+  * include/lwip/opt.h: Add above new options.
+  
   2006-08-18 Christiaan Simons
   * tcp_{in,out}.c: added SNMP counters.
   * ipv4/ip.c: added SNMP counters.
   * ipv4/ip_frag.c: added SNMP counters.
 
Index: src/core/ipv4/ip_frag.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/ipv4/ip_frag.c,v
retrieving revision 1.23
diff -u -5 -p -r1.23 ip_frag.c
--- src/core/ipv4/ip_frag.c     11 Aug 2006 14:12:05 -0000      1.23
+++ src/core/ipv4/ip_frag.c     26 Oct 2006 13:23:21 -0000
@@ -296,12 +296,11 @@ nullreturn:
   IPFRAG_STATS_INC(ip_frag.drop);
   pbuf_free(p);
   return NULL;
 }
 
-#define MAX_MTU 1500
-static u8_t buf[MEM_ALIGN_SIZE(MAX_MTU)];
+static u8_t buf[MEM_ALIGN_SIZE(IP_FRAG_MAX_MTU)];
 
 /**
  * Fragment an IP datagram if too large for the netif.
  *
  * Chop the datagram in MTU sized chunks and send them in order
Index: src/include/ipv4/lwip/ip_frag.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/ipv4/lwip/ip_frag.h,v
retrieving revision 1.6
diff -u -5 -p -r1.6 ip_frag.h
--- src/include/ipv4/lwip/ip_frag.h     11 Aug 2006 14:12:05 -0000      1.6
+++ src/include/ipv4/lwip/ip_frag.h     26 Oct 2006 13:23:21 -0000
@@ -37,23 +37,10 @@
 #include "lwip/err.h"
 #include "lwip/pbuf.h"
 #include "lwip/netif.h"
 #include "lwip/ip_addr.h"
 
-/* IP reassemly timer interval in milliseconds */
-#define IP_REASS_INTERVAL 1000
-
-/* IP reassemly default age in seconds */
-#ifndef IP_REASS_MAXAGE
-#define IP_REASS_MAXAGE 3
-#endif
-
-/* IP reassembly buffer size (minus IP header) */
-#ifndef IP_REASS_BUFSIZE
-#define IP_REASS_BUFSIZE 5760
-#endif
-
 void ip_frag_init(void);
 void ip_reass_tmr(void);
 struct pbuf * ip_reass(struct pbuf *p);
 err_t ip_frag(struct pbuf *p, struct netif *netif, struct ip_addr *dest);
 
Index: src/include/lwip/opt.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/opt.h,v
retrieving revision 1.37
diff -u -5 -p -r1.37 opt.h
--- src/include/lwip/opt.h      20 Sep 2006 13:33:51 -0000      1.37
+++ src/include/lwip/opt.h      26 Oct 2006 13:23:21 -0000
@@ -209,15 +209,30 @@ a lot of data that needs to be copied, t
 /** Reassemble incoming fragmented IP packets */
 #ifndef IP_REASSEMBLY
 #define IP_REASSEMBLY                   1
 #endif
 
+/* IP reassembly default age in seconds */
+#ifndef IP_REASS_MAXAGE
+#define IP_REASS_MAXAGE 3
+#endif
+
+/* IP reassembly buffer size (minus IP header) */
+#ifndef IP_REASS_BUFSIZE
+#define IP_REASS_BUFSIZE 5760
+#endif
+
 /** Fragment outgoing IP packets if their size exceeds MTU */
 #ifndef IP_FRAG
 #define IP_FRAG                         1
 #endif
 
+/* Assumed max MTU on any interface for IP frag buffer */
+#ifndef IP_FRAG_MAX_MTU
+#define IP_FRAG_MAX_MTU 1500
+#endif
+
 /** Global default value for Time To Live used by transport layers. */
 #ifndef IP_DEFAULT_TTL
 #define IP_DEFAULT_TTL                  255
 #endif
 

reply via email to

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