From owner-freebsd-net Sun Jul 9 14: 4:49 2000 Delivered-To: freebsd-net@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id E805537BFFD for ; Sun, 9 Jul 2000 14:04:42 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e69L4fJ03861 for net@freebsd.org; Sun, 9 Jul 2000 14:04:41 -0700 (PDT) Date: Sun, 9 Jul 2000 14:04:41 -0700 From: Alfred Perlstein To: net@freebsd.org Subject: weird things with M_EXT and large packets Message-ID: <20000709140441.T25571@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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