Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/net/lib/libvirtif Bump iovec lazy bum magic value t...



details:   https://anonhg.NetBSD.org/src/rev/342fb8bcb4f8
branches:  trunk
changeset: 748064:342fb8bcb4f8
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Oct 12 02:25:44 2009 +0000

description:
Bump iovec lazy bum magic value to 32: nfsd likes to write mbufs
with 17 per chain (previous i'm-too-lazy-for-my-forloop value was
of course 16).

diffstat:

 sys/rump/net/lib/libvirtif/if_virt.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r 72c580fbd3b3 -r 342fb8bcb4f8 sys/rump/net/lib/libvirtif/if_virt.c
--- a/sys/rump/net/lib/libvirtif/if_virt.c      Sun Oct 11 23:23:09 2009 +0000
+++ b/sys/rump/net/lib/libvirtif/if_virt.c      Mon Oct 12 02:25:44 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_virt.c,v 1.11 2009/09/16 13:29:42 pooka Exp $       */
+/*     $NetBSD: if_virt.c,v 1.12 2009/10/12 02:25:44 pooka Exp $       */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.11 2009/09/16 13:29:42 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.12 2009/10/12 02:25:44 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/condvar.h>
@@ -237,13 +237,15 @@
        panic("virtif_workin is a lazy boy %d\n", error);
 }
 
+/* lazy bum stetson-harrison magic value */
+#define LB_SH 32
 static void
 virtif_sender(void *arg)
 {
        struct ifnet *ifp = arg;
        struct virtif_sc *sc = ifp->if_softc;
        struct mbuf *m, *m0;
-       struct rumpuser_iovec io[16];
+       struct rumpuser_iovec io[LB_SH];
        int i, error;
 
        mutex_enter(&sc->sc_sendmtx);
@@ -256,12 +258,12 @@
                mutex_exit(&sc->sc_sendmtx);
 
                m = m0;
-               for (i = 0; i < 16 && m; i++) {
+               for (i = 0; i < LB_SH && m; i++) {
                        io[i].iov_base = mtod(m, void *);
                        io[i].iov_len = m->m_len;
                        m = m->m_next;
                }
-               if (i == 16)
+               if (i == LB_SH)
                        panic("lazy bum");
                rumpuser_writev(sc->sc_tapfd, io, i, &error);
                m_freem(m0);



Home | Main Index | Thread Index | Old Index