From owner-freebsd-net@FreeBSD.ORG Mon Nov 29 19:10:53 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 299EA1065693 for ; Mon, 29 Nov 2010 19:10:53 +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 A887F8FC15 for ; Mon, 29 Nov 2010 19:10:52 +0000 (UTC) Received: by mail-ww0-f50.google.com with SMTP id 26so583844wwf.31 for ; Mon, 29 Nov 2010 11:10:52 -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=+DS99DfDSyivEZ/YEFw5Xh0MNAOIAS4+lBYEoexPQQc=; b=gPQ9pXvvPwG9xUIFCJMDdBoC3kf1JXq+L+UgFIYPN8A3rTuTjfXnuTcqNH7d0OcCzW Iad+9hjFHYYywEoK1/de3ykxGxgIUtaQhd/a7HA0Tr2o00TB7f3kZJy+ocY09zatiifA p+oE4WQV4416ae4mQkwX3COKQJkaUclb1Y+Iw= 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=YFxE/yrLeH8PNsy6IMIrJZLYLZ/3PcBA7qidjcxjUqkgkJj+nqzj2jNe1JIX5J8eHu wF+2rSwIyzasDOq+spbRCFy0w8hm74MeAFwXK/nUvPyn9AUWfGuOgObHMIiJgbFfE2FT OdnSdUZdxmtDeWxxBqAtt//QV5HBsutPdUfCU= MIME-Version: 1.0 Received: by 10.216.3.3 with SMTP id 3mr808169weg.57.1291057830115; Mon, 29 Nov 2010 11:10:30 -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:53 -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 >