aboutsummaryrefslogtreecommitdiff
path: root/include/net/compat.h
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-05-02 20:21:35 +0000
committerDavid S. Miller <davem@davemloft.net>2011-05-05 11:10:14 -0700
commit228e548e602061b08ee8e8966f567c12aa079682 (patch)
tree4c79ecf071d6174d42da1557812a4646d0aaa5af /include/net/compat.h
parent1c5cae815d19ffe02bdfda1260949ef2b1806171 (diff)
net: Add sendmmsg socket system call
This patch adds a multiple message send syscall and is the send version of the existing recvmmsg syscall. This is heavily based on the patch by Arnaldo that added recvmmsg. I wrote a microbenchmark to test the performance gains of using this new syscall: http://ozlabs.org/~anton/junkcode/sendmmsg_test.c The test was run on a ppc64 box with a 10 Gbit network card. The benchmark can send both UDP and RAW ethernet packets. 64B UDP batch pkts/sec 1 804570 2 872800 (+ 8 %) 4 916556 (+14 %) 8 939712 (+17 %) 16 952688 (+18 %) 32 956448 (+19 %) 64 964800 (+20 %) 64B raw socket batch pkts/sec 1 1201449 2 1350028 (+12 %) 4 1461416 (+22 %) 8 1513080 (+26 %) 16 1541216 (+28 %) 32 1553440 (+29 %) 64 1557888 (+30 %) We see a 20% improvement in throughput on UDP send and 30% on raw socket send. [ Add sparc syscall entries. -DaveM ] Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/compat.h')
-rw-r--r--include/net/compat.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/compat.h b/include/net/compat.h
index 28d5428ec6a..9ee75edcc29 100644
--- a/include/net/compat.h
+++ b/include/net/compat.h
@@ -43,6 +43,8 @@ extern int compat_sock_get_timestampns(struct sock *, struct timespec __user *);
extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *);
extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int);
extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned);
+extern asmlinkage long compat_sys_sendmmsg(int, struct compat_mmsghdr __user *,
+ unsigned, unsigned);
extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned);
extern asmlinkage long compat_sys_recvmmsg(int, struct compat_mmsghdr __user *,
unsigned, unsigned,