From owner-freebsd-net@FreeBSD.ORG Fri Oct 14 11:05:50 2005 Return-Path: X-Original-To: net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CD6016A421 for ; Fri, 14 Oct 2005 11:05:50 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 821CD43D49 for ; Fri, 14 Oct 2005 11:05:49 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j9EB5lQj031524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 14 Oct 2005 15:05:48 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j9EB5lNQ031523 for net@FreeBSD.org; Fri, 14 Oct 2005 15:05:47 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 14 Oct 2005 15:05:47 +0400 From: Gleb Smirnoff To: net@FreeBSD.org Message-ID: <20051014110547.GR14542@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.6i Cc: Subject: [glebius@FreeBSD.org: cvs commit: src/sys/dev/em if_em.c] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2005 11:05:50 -0000 Colleagues, since there were a lot of em(4) related discussions on list, I decided to forward this commit mail here. This change should fix a big problem in if_em(), that you may have experienced. If you experience long wedges in receive part, for about minute or more, than you should try this patch, test it and please report to list. The more reports we get, the faster the change will enter RELENG_6_0. Thanks in advance! ----- Forwarded message from Gleb Smirnoff ----- From: Gleb Smirnoff To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/em if_em.c Date: Fri, 14 Oct 2005 11:00:16 +0000 (UTC) Delivered-To: glebius@freebsd.org Delivered-To: src-committers@FreeBSD.org Precedence: bulk glebius 2005-10-14 11:00:16 UTC FreeBSD src repository Modified files: sys/dev/em if_em.c Log: From the PR: The receive function em_process_receive_interrupts() unlocks the adapter while ether_input() processes the packet, and then locks it back. In the meantime, em_init() may be called, either from em_watchdog() from softclock interrupt or from the ifconfig(8) program. The em_init() resets the card, in particular it sets adapter->next_rx_desc_to_check to 0 and resets hardware RX Head and Tail descriptor pointers. The loop in em_process_receive_interrupts() does not expect these things to change, and a mess may result. This fixes long wedges of em(4) interfaces receive part under high load and IP fastforwarding enabled. PR: kern/87418 Submitted by: Dmitrij Tejblum Revision Changes Path 1.77 +14 -14 src/sys/dev/em/if_em.c ----- End forwarded message ----- -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE