Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Nov 2010 12:46:13 -0800
From:      Jack Vogel <jfvogel@gmail.com>
To:        Ryan Stone <rysto32@gmail.com>
Cc:        beezarliu <beezarliu@yahoo.com.cn>, freebsd-net <freebsd-net@freebsd.org>
Subject:   Re: 82599 receiving packets with vlan tag=0 (vlan strip problem)?
Message-ID:  <AANLkTikwcRW%2BdqY=NTSbJsr3daEd-8usPo0Rw%2BhA_D-8@mail.gmail.com>
In-Reply-To: <AANLkTik%2B4Ag1HYXDWJvn2fTx6M%2Bpa9o29-A8j6qVRhZ_@mail.gmail.com>
References:  <201011261037105152721@yahoo.com.cn> <AANLkTikYZN0hoH6Ht-ZhukM2OVXZOyvU9-O%2BpbJ%2BsBj9@mail.gmail.com> <AANLkTimWVJhtu8LrZ_tn0Tdr-vs9PmPnW9SjebT7jnyM@mail.gmail.com> <AANLkTik%2B4Ag1HYXDWJvn2fTx6M%2Bpa9o29-A8j6qVRhZ_@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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


On Fri, Nov 26, 2010 at 12:42 PM, Ryan Stone <rysto32@gmail.com> wrote:

> If vlan stripping is disabled on the 82599(i.e. RXDCTL.VME is 0 for
> that queue is clear) and a vlan-tagged packet is received, then the
> descriptor for that packet will have the VP bit set even though the
> vlan was not stripped, and the VLAN Tag field in the descriptor is set
> to 0.  ixgbe_rxeof will see that the VP bit is set and set the
> M_VLANTAG on the mbuf, and put 0 in m_pkthdr.ether_vtag.  This means
> that the stack will treat the packet as if it was double vlan tagged,
> with outer tag being 0.
>
> Ryan Stone
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikwcRW%2BdqY=NTSbJsr3daEd-8usPo0Rw%2BhA_D-8>