From owner-cvs-all@FreeBSD.ORG Tue Mar 25 15:49:15 2003 Return-Path: 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 586FA37B401; Tue, 25 Mar 2003 15:49:15 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BAEF43F85; Tue, 25 Mar 2003 15:49:15 -0800 (PST) (envelope-from mux@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h2PNnE0U017039; Tue, 25 Mar 2003 15:49:14 -0800 (PST) (envelope-from mux@repoman.freebsd.org) Received: (from mux@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h2PNnEgE017038; Tue, 25 Mar 2003 15:49:14 -0800 (PST) Message-Id: <200303252349.h2PNnEgE017038@repoman.freebsd.org> From: Maxime Henrion Date: Tue, 25 Mar 2003 15:49:14 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Subject: cvs commit: src/sys/netinet ip_output.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 25 Mar 2003 23:49:16 -0000 mux 2003/03/25 15:49:14 PST FreeBSD src repository Modified files: sys/netinet ip_output.c Log: Try to make the MBUF_FRAG_TEST code work better. - Don't try to fragment the packet if it's smaller than mbuf_frag_size. - Preserve the size of the mbuf chain which is modified by m_split(). - Check that m_split() didn't return NULL. - Make it so we don't end up with two M_PKTHDR mbuf in the chain. - Use m->m_pkthdr.len instead of m->m_len so that we fragment the whole chain and not just the first mbuf. - Fix a nearby style bug and rework the logic of the loops so that it's more clear. This is still not quite right, because we're clearly abusing m_split() to do something it was not designed for, but at least it works now. We should probably move this code into a m_fragment() function when it's correct. Revision Changes Path 1.180 +10 -12 src/sys/netinet/ip_output.c