From owner-cvs-all@FreeBSD.ORG Fri Aug 26 14:27:38 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE5CA16A41F; Fri, 26 Aug 2005 14:27:38 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B174643D45; Fri, 26 Aug 2005 14:27:38 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j7QERcR3054009; Fri, 26 Aug 2005 14:27:38 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j7QERcj5054008; Fri, 26 Aug 2005 14:27:38 GMT (envelope-from jhb) Message-Id: <200508261427.j7QERcj5054008@repoman.freebsd.org> From: John Baldwin Date: Fri, 26 Aug 2005 14:27:38 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/pci if_de.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2005 14:27:39 -0000 jhb 2005-08-26 14:27:38 UTC FreeBSD src repository Modified files: sys/pci if_de.c Log: - Use m_defrag() instead of homerolling our own variant tulip_mbuf_compress(). If we fail to allocate a new mbuf to copy the data into, put the mbuf back in the driver's send queue so that we can retry it later rather than throwing the packet away. - Use m_devget() instead of doing it inline ourselves in the TULIP_COPY_RXDATA case. If we fail to allocate an mbuf to copy the data into, don't forget about the original mbuf cluster. The old code would lose the pointer and leak the cluster in that case. Now it doesn't lose it but always sticks the original rx buffer back into the receive ring after trying to copy the data out and send it up the stack. Also, if we fail to allocate a new mbuf to copy the data into, log an input error. Also, don't combine the priming case with the received-a-packet case to make the code flow a bit clearer and easier to follow. Revision Changes Path 1.173 +55 -68 src/sys/pci/if_de.c