From owner-freebsd-net@FreeBSD.ORG Mon Nov 29 19:10:34 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49EE4106566B for ; Mon, 29 Nov 2010 19:10:34 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id C91418FC17 for ; Mon, 29 Nov 2010 19:10:33 +0000 (UTC) Received: by wwf26 with SMTP id 26so583844wwf.31 for ; Mon, 29 Nov 2010 11:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=wXIJ43SoM6FenEvnGd1IaYHJF/jgpU9I2/NDB0Ma/fM=; b=CZ7l94zTe6+Y8ElSLExuE35dDv/Hf5PEAm+SlLPF5sne023xr5aNlj7VBbtN/L7oPe uYl5k60bmTzA2tcsQ8U5UQuBeSz2t60qaj2pvpxXZmb7DyHGzUCbjY+2Qsg+SDt8lUlH 82K8Kbk3duRJm3ufwEaE5iqKHwn80aNgHH7FM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Q7sRPpJrOUlNvoA36trP10AVRej6cwLz+Gw+YXwLH418r+fEUm8ukL0V+RRHJxtN2W fSr1zzP8Y7Je9pWp+VDmxTwDzq5Y7Wn7gAv5r7ZTxXtUaqRoMWRbaho32UDduOiO7n1C 8JVW2nSecsqZWQDHV9ZzgWTKFr0ynDixNA3lY= MIME-Version: 1.0 Received: by 10.216.59.193 with SMTP id s43mr815194wec.42.1291057831618; Mon, 29 Nov 2010 11:10:31 -0800 (PST) Received: by 10.216.2.206 with HTTP; Mon, 29 Nov 2010 11:10:22 -0800 (PST) In-Reply-To: <20101129182652.GA33150@rdtc.ru> References: <201011270946271408828@yahoo.com.cn> <20101128081617.GA90332@zibbi.meraka.csir.co.za> <20101129175128.GA32977@rdtc.ru> <20101129182652.GA33150@rdtc.ru> Date: Mon, 29 Nov 2010 11:10:22 -0800 Message-ID: From: Jack Vogel To: Eugene Grosbein Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net Subject: Re: em(4) updated to version 7.1.8 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: Mon, 29 Nov 2010 19:10:34 -0000 Not sure what code you created this from, but its not the new driver, things have been reorganized and I do not believe this issue exists. Please test with the latest. Jack On Mon, Nov 29, 2010 at 10:26 AM, Eugene Grosbein wrote: > On Mon, Nov 29, 2010 at 09:54:55AM -0800, Jack Vogel wrote: > > > Thanks for reporting that, will see it gets fixed! > > More serious problem. I had experienced kernel panics for two em(4)-based > heavy loaded routers. I've checked PR database and found this PR: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=150920 > > I've found the same lack of NULL pointer check in em(4), > applied following patch to if_em.c and panics have gone. > It seems for me that new driver code still has this problem, > now this code resides inside em_rx_discard() function. > Please take a look. > > --- if_em.c.orig 2010-11-02 15:45:56.000000000 +0600 > +++ if_em.c 2010-11-08 14:24:46.000000000 +0600 > @@ -4181,9 +4181,11 @@ > ifp->if_ierrors++; > /* Reuse loaded DMA map and just update mbuf chain > */ > mp = rxr->rx_buffers[i].m_head; > + if(mp) { > mp->m_len = mp->m_pkthdr.len = MCLBYTES; > mp->m_data = mp->m_ext.ext_buf; > mp->m_next = NULL; > + } > if (adapter->max_frame_size <= > (MCLBYTES - ETHER_ALIGN)) > m_adj(mp, ETHER_ALIGN); > > > Eugene Grosbein >