From owner-svn-src-stable-8@FreeBSD.ORG Wed Jun 8 19:45:47 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACD091065674; Wed, 8 Jun 2011 19:45:47 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 642278FC16; Wed, 8 Jun 2011 19:45:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p58JjlCG044553; Wed, 8 Jun 2011 19:45:47 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p58JjltS044551; Wed, 8 Jun 2011 19:45:47 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201106081945.p58JjltS044551@svn.freebsd.org> From: Martin Matuska Date: Wed, 8 Jun 2011 19:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222867 - stable/8/sys/dev/xen/netfront X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2011 19:45:47 -0000 Author: mm Date: Wed Jun 8 19:45:47 2011 New Revision: 222867 URL: http://svn.freebsd.org/changeset/base/222867 Log: MFC r218056: Fix bug in the netfront driver that caused excessive packet drops during receive processing. Remove unnecessary restrictions on the mbuf chain length built during an LRO receive. This restriction was copied from the Linux netfront driver where the LRO implementation cannot handle more than 18 discontinuities. The FreeBSD implementation has no such restriction. Approved by: gibbs (private e-mail) Modified: stable/8/sys/dev/xen/netfront/netfront.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/8/sys/dev/xen/netfront/netfront.c Wed Jun 8 19:38:31 2011 (r222866) +++ stable/8/sys/dev/xen/netfront/netfront.c Wed Jun 8 19:45:47 2011 (r222867) @@ -1272,7 +1272,6 @@ xennet_get_responses(struct netfront_inf struct mbuf *m, *m0, *m_prev; grant_ref_t ref = xennet_get_rx_ref(np, *cons); RING_IDX ref_cons = *cons; - int max = 5 /* MAX_TX_REQ_FRAGS + (rx->status <= RX_COPY_THRESHOLD) */; int frags = 1; int err = 0; u_long ret; @@ -1415,20 +1414,10 @@ next_skip_queue: frags++; } *list = m0; - - if (unlikely(frags > max)) { - if (net_ratelimit()) - WPRINTK("Too many frags\n"); - printf("%s: too many frags %d > max %d\n", __func__, frags, - max); - err = E2BIG; - } - *cons += frags; - *pages_flipped_p = pages_flipped; - return err; + return (err); } static void