This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

configurable tftp server stack size


The tftp server stack size should be configurable since the user can
supply the file io operations and tftp can't estimate the stack
requirements for those fn's.

-- 
Øyvind Harboe
http://www.zylin.com

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/ChangeLog,v
retrieving revision 1.64
diff -u -w -r1.64 ChangeLog
--- ChangeLog	17 Jun 2004 14:19:29 -0000	1.64
+++ ChangeLog	20 Jul 2004 12:38:26 -0000
@@ -1,3 +1,9 @@
+2004-06-17  Oyvind Harboe  <oyvind.harboe@zylin.com>
+
+	* src/tftp_server.c:
+	* cdl/net.cdl:
+	Made tftp server stack size .cdl configurable
+
 2004-06-17  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* src/ifaddrs.c (getifaddrs): Return destination address for P2P
Index: cdl/net.cdl
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/cdl/net.cdl,v
retrieving revision 1.14
diff -u -w -r1.14 net.cdl
--- cdl/net.cdl	9 Mar 2004 08:00:12 -0000	1.14
+++ cdl/net.cdl	20 Jul 2004 12:38:26 -0000
@@ -167,6 +167,14 @@
             threads can have precedence over TFTP server processing."
         }
 
+        cdl_option CYGPKG_NET_TFTPD_THREAD_STACK_SIZE {
+            display "Stack size for TFTP threads."
+            flavor  data
+            default_value (CYGNUM_HAL_STACK_SIZE_TYPICAL+(3*(SEGSIZE+4)))
+            description   "
+            Stack size."
+        }
+
 	cdl_component CYGSEM_NET_TFTPD_MULTITHREADED {
 	    display "Multiple TFTPD server threads on the same port."
 	    flavor  bool
Index: src/tftp_server.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/src/tftp_server.c,v
retrieving revision 1.7
diff -u -w -r1.7 tftp_server.c
--- src/tftp_server.c	29 Apr 2004 07:19:58 -0000	1.7
+++ src/tftp_server.c	20 Jul 2004 12:38:27 -0000
@@ -96,7 +96,7 @@
 static struct tftpd_sem tftpd_sems[CYGNUM_NET_TFTPD_MULTITHREADED_PORTS];
 #endif //CYGSEM_NET_TFTPD_MULTITHREADED
 
-#define STACK_SIZE (((CYGNUM_HAL_STACK_SIZE_TYPICAL+(3*(SEGSIZE+sizeof(struct tftphdr)))) + CYGARC_ALIGNMENT-1) & ~(CYGARC_ALIGNMENT-1))
+#define STACK_SIZE (((CYGPKG_NET_TFTPD_THREAD_STACK_SIZE) + CYGARC_ALIGNMENT-1) & ~(CYGARC_ALIGNMENT-1))
 static char *TFTP_tag = "TFTPD";
 #define CYGNUM_NET_MAX_INET_PROTOS 2
 struct tftp_server {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]