Date: Sun, 9 Jul 2000 14:04:41 -0700 From: Alfred Perlstein <bright@wintelcom.net> To: net@freebsd.org Subject: weird things with M_EXT and large packets Message-ID: <20000709140441.T25571@fw.wintelcom.net>
next in thread | raw e-mail | index | archive | help
I have some code here sending a mbuf via: error = (*so->so_proto->pr_usrreqs->pru_send)(so, 0, m, 0, 0, p); m is setup like so: m->m_ext.ext_free = kblob_mbuf_free; m->m_ext.ext_ref = kblob_mbuf_ref; m->m_ext.ext_buf = (void *)kb; m->m_ext.ext_size = kb->kb_len; m->m_data = (char *) kb->kb_data + uap->offset; m->m_flags |= M_EXT; m->m_pkthdr.len = m->m_len = uap->nbytes; uap->nbytes is 59499. It looks like the packet is being broken up or referenced to be sent, but at a certain point it hangs. this is a sort of trace going on: kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 2 kblob_mbuf_ref: size = 59499 kblob_mbuf_ref: size = 59499 kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 4 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 3 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 2 kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 2 kblob_mbuf_ref: size = 59499 kblob_mbuf_ref: size = 59499 kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 4 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 3 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 2 kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 2 kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 2 kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 which is the output of the ext_free and ext_ref functions, after that for a couple of seconds i get this as long as the remote side doesn't close the connection: kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 1 ... kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 1 kblob_mbuf_ref: size = 59499 kblob_mbuf_free: size = 59499 deref, id = 0, refcnt = 1 as if it's retrying. after the remote side closes the connection, the mbuf is finally free'd after a short delay. Is there some weird limit i'm bumping into? Will I have to break this down into multiple mbufs with external storage? FYI I'm using fxp and: 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Jul 2 11:59:25 PDT 2000 thanks, -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000709140441.T25571>