[kitten] push by BrianK...@gmail.com - Modified a few config options in lwipopts.h, to allow for larger Porta... on 2013-07-11 20:43 GMT

4 views
Skip to first unread message

kit...@googlecode.com

unread,
Jul 11, 2013, 4:43:42 PM7/11/13
to kitten-...@googlegroups.com
Revision: 464ce2e1b88f
Branch: default
Author: Brian Kocoloski <bko...@sandia.gov>
Date: Thu Jul 11 13:42:41 2013
Log: Modified a few config options in lwipopts.h, to allow for larger
Portals messages
http://code.google.com/p/kitten/source/detail?r=464ce2e1b88f

Modified:
/include/lwip/lwipopts.h
/kernel/netdev.c

=======================================
--- /include/lwip/lwipopts.h Mon Jul 8 14:58:49 2013
+++ /include/lwip/lwipopts.h Thu Jul 11 13:42:41 2013
@@ -8,6 +8,19 @@
#define LWIP_SO_SNDBUF 1
#define LWIP_SO_RCVBUF 1

+// BJK: These options are needed to support larger UDP messages. Tune as
needed.
+// Note: Need invariant PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS
+// Maximum outstanding messages in the mailbox. To be safe, message sizes
should be
+// less than MTU * TCPIP_MBOX_SIZE (other processes can consume slots as
well)
+#define TCPIP_MBOX_SIZE 32
+
+// Number of pbufs in the pool
+#define PBUF_POOL_SIZE 64
+
+// Number of pbufs that can be used in a single packet reassembly. Message
size,
+// then, is limited to MTU * IP_REASS_MAX_PBUFS
+#define IP_REASS_MAX_PBUFS 32
+
#ifdef CONFIG_LWIP_SOCKET
#define LWIP_SOCKET 1
#define LWIP_NETCONN 1
=======================================
--- /kernel/netdev.c Tue Jul 9 16:03:24 2013
+++ /kernel/netdev.c Thu Jul 11 13:42:41 2013
@@ -519,7 +519,6 @@
return ret;
}

-// Currently, non-blocking sendmsg/recvmsg are not implemented
static ssize_t
sys_sendmsg(
int sockfd,
@@ -534,10 +533,6 @@
uint8_t * kname;
int i;

- if (flags & O_NONBLOCK || flags & MSG_DONTWAIT) {
- return -EINVAL;
- }
-
// Copy msghdr in
if (copy_from_user(&kmsg, msg, sizeof(struct msghdr))) {
printk("%s: bad user address %p\n", __func__, (void*) msg);
@@ -628,7 +623,6 @@
return ret;
}

-// Currently, non-blocking sendmsg/recvmsg are not implemented
static ssize_t
sys_recvmsg(
int sockfd,
@@ -643,10 +637,6 @@
uint8_t kname[sizeof(struct sockaddr)];
int i;

- if (flags & O_NONBLOCK || flags & MSG_DONTWAIT) {
- return -EINVAL;
- }
-
// Copy msghdr in
if (copy_from_user(&kmsg, msg, sizeof(struct msghdr))) {
printk("%s: bad user address %p\n", __func__, (void*) msg);
@@ -674,6 +664,7 @@
default:
if (copy_to_user(msg->msg_iov[i].iov_base, databuf, kvec.iov_len)) {
kmem_free(databuf);
+ printk("%s: bad user address %p\n", __func__, (void*)
msg->msg_iov[i].iov_base);
return -EFAULT;
}
total += read;
Reply all
Reply to author
Forward
0 new messages