From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98CBD3B27F6; Fri, 20 Mar 2026 14:31:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=141.14.17.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774017123; cv=none; b=QtA1JuBiDvvZXkuFksVwCHVD8Ho7MmvJmvNhvDtVHn+Dr1UsoCngSuBTVVrz2BWqdM0nzD/YHbfg1/cLqa2YwzBFOqrfHlt3iHJqn0nDjRTwxqbI8VldyMmV9SXB329k4e6jhiRDuMssHVXoEcGue7OT6Y7PfcXMbKv9DugrGOQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774017123; c=relaxed/simple; bh=YJoeI4MWB78LwS7XL71UYCE1MURj56ZO/Ym0YVp1R2g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tdQdvIRWYjsMsG7CloEPuq3POFsGaa+ruZNoKCyRLjJ6BhAePRzT+SgRwJBDWai4tc1/R2AH+GSKhXGXmSHVg2ZC0o/ZaVhRehysf0F6ZxOul6dfyUQ+5CqPr77ITUCbTAGisYEq4VQ4BydIHJOveoe+vAMkfYnX/03QIkEoriw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de; spf=pass smtp.mailfrom=molgen.mpg.de; arc=none smtp.client-ip=141.14.17.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=molgen.mpg.de Received: from [141.14.220.42] (g42.guest.molgen.mpg.de [141.14.220.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 89E154C28871A7; Fri, 20 Mar 2026 15:29:11 +0100 (CET) Message-ID: <310379eb-9b99-444d-bf02-2bde3bd79374@molgen.mpg.de> Date: Fri, 20 Mar 2026 15:29:10 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Intel-wired-lan] [PATCH iwl-net] iavf: fix wrong VLAN mask for legacy Rx descriptors L2TAG2 To: Petr Oros Cc: Przemek Kitszel , Eric Dumazet , linux-kernel@vger.kernel.org, Andrew Lunn , Tony Nguyen , Mateusz Polchlopek , Jacob Keller , Jakub Kicinski , Paolo Abeni , "David S. Miller" , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org References: <20260320135326.1171433-1-poros@redhat.com> Content-Language: en-US From: Paul Menzel In-Reply-To: <20260320135326.1171433-1-poros@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Dear Petr, Thank you for your patch. Am 20.03.26 um 14:53 schrieb Petr Oros: > The IAVF_RXD_LEGACY_L2TAG2_M mask was incorrectly defined as > GENMASK_ULL(63, 32), extracting 32 bits from qw2 instead of the > 16-bit VLAN tag. In the legacy Rx descriptor layout, the 2nd L2TAG2 > (VLAN tag) occupies bits 63:48 of qw2, not 63:32. > > The oversized mask causes FIELD_GET to return a 32-bit value where the > actual VLAN tag sits in bits 31:16. When this value is passed to > iavf_receive_skb() as a u16 parameter, it gets truncated to the lower > 16 bits (which contain the 1st L2TAG2, typically zero). As a result, > __vlan_hwaccel_put_tag() is never called and software VLAN interfaces > on VFs receive no traffic. > > This affects VFs behind ice PF (VIRTCHNL VLAN v2) when the PF > advertises VLAN stripping into L2TAG2_2 and legacy descriptors are > used. > > The flex descriptor path already uses the correct mask > (IAVF_RXD_FLEX_L2TAG2_2_M = GENMASK_ULL(63, 48)). Do you have a reproducer to verify the fix? > Fixes: 2dc8e7c36d80 ("iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors") (That first entered Linux v6.15-rc1, and Linux 6.12 and 6.18 are LTS series.) > Signed-off-by: Petr Oros > --- > drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/intel/iavf/iavf_type.h b/drivers/net/ethernet/intel/iavf/iavf_type.h > index 1d8cf29cb65ac5..5bb1de1cfd33b1 100644 > --- a/drivers/net/ethernet/intel/iavf/iavf_type.h > +++ b/drivers/net/ethernet/intel/iavf/iavf_type.h > @@ -277,7 +277,7 @@ struct iavf_rx_desc { > /* L2 Tag 2 Presence */ > #define IAVF_RXD_LEGACY_L2TAG2P_M BIT(0) > /* Stripped S-TAG VLAN from the receive packet */ > -#define IAVF_RXD_LEGACY_L2TAG2_M GENMASK_ULL(63, 32) > +#define IAVF_RXD_LEGACY_L2TAG2_M GENMASK_ULL(63, 48) > /* Stripped S-TAG VLAN from the receive packet */ > #define IAVF_RXD_FLEX_L2TAG2_2_M GENMASK_ULL(63, 48) > /* The packet is a UDP tunneled packet */ Nice find. Reviewed-by: Paul Menzel Kind regards, Paul