From owner-freebsd-net@FreeBSD.ORG Sat Nov 27 04:24:55 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 DA9EE106566C for ; Sat, 27 Nov 2010 04:24:55 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 658DD8FC0A for ; Sat, 27 Nov 2010 04:24:55 +0000 (UTC) Received: by wyf19 with SMTP id 19so2565720wyf.13 for ; Fri, 26 Nov 2010 20:24:54 -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=EqNXLMce0PziEoti8emAvGwsO4H+2Sp6XgoL4FHdlo4=; b=bqchObVvDnxYTncz1DhPCUZK8pKnVRX+3xl3uhWiKWxFtKM4MrbCVUhB4nsEXx/tU3 j3/3mkaFjUEaLf3mpMXb41eW5OYXMF4NBkD88kVa41gLJ63LFdSuHstF+fx7E0gPtUld O7viOGI/hl2mFmL6HFhrBwhr2iiF9ZvfUbTek= 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=vU9bXy+ekDHbGXsYJ0HPnN9herPXOrDDj88571nbZbEA11EriGBtQ1S5UVl5URjjn1 3IVQPkdKv8h8TRy1G5xXKqWgXAiwNvNnEYufNI1ZgaHsvq9/jS1YDf5iu0P4DDeCciAZ j2LBlLkrGRAOPS1dJQRMqMAA/VP7az7xJtmu8= MIME-Version: 1.0 Received: by 10.216.179.210 with SMTP id h60mr2713113wem.42.1290831893919; Fri, 26 Nov 2010 20:24:53 -0800 (PST) Received: by 10.216.2.206 with HTTP; Fri, 26 Nov 2010 20:24:53 -0800 (PST) In-Reply-To: <201011270946271408828@yahoo.com.cn> References: <201011261037105152721@yahoo.com.cn> <201011270946271408828@yahoo.com.cn> Date: Fri, 26 Nov 2010 20:24:53 -0800 Message-ID: From: Jack Vogel To: beezarliu Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net , Ryan Stone Subject: Re: Re: 82599 receiving packets with vlan tag=0 (vlan strip problem)? 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: Sat, 27 Nov 2010 04:24:55 -0000 Will you please test with the code I just checked in and see if it also eliminates the problem, if not I can change it to your method. Just for the record, I was not aware of a hardware bug, and for right now no one is around :) I will ask around next week to see if something was known that I missed. Thanks, Jack 2010/11/26 beezarliu > On 2010-11-27 05:01:11, Ryan Stone wrote: > >On Fri, Nov 26, 2010 at 3:46 PM, Jack Vogel wrote: > >> Ahh, OK, so how would this solution work: > >> > >> In rxeof, in addition to requiring VP to be set, also check that > >> adapter->num_vlans is non-zero, in order to store the tag. > >> > >> Jack > > > >Yes, I believe that will work. > > > >Ryan Stone > >_______________________________________________ > >freebsd-net@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-net > >To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > From ixgbe_init -> ixgbe_init_lock -> ixgbe_setup_vlan_hw_support, > I'm sure the VME bit is set for all rx queues. > But in my testing, the vlan tag is not stripped but VP bit is set. > It's very strange, and I'm not sure it's hardware bug. > > I currently fix it by checking vlan tag is not zero before add M_VLANTAG, > because vlan tag id 0 is not used. > > if ((staterr & IXGBE_RXD_STAT_VP) && vtag)= { > sendmp->m_pkthdr.ether_vtag =3D vt= ag; > sendmp->m_flags |=3D M_VLANTAG; > } > > > Thanks > Beezar > > > __________________________________________________ > =B8=CF=BF=EC=D7=A2=B2=E1=D1=C5=BB=A2=B3=AC=B4=F3=C8=DD=C1=BF=C3=E2=B7=D1= =D3=CA=CF=E4? > http://cn.mail.yahoo.com >