From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2727B42808 for ; Mon, 27 Mar 2023 12:08:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F377540EE1; Mon, 27 Mar 2023 12:08:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id EC38340EE1 for ; Mon, 27 Mar 2023 12:08:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679911697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FHEmpupVpTxn4yP0bvTUaoVMLHbqt3N3cf/tLj0CnI0=; b=Reieh4BLiZ27u0OBFK9/YtnEvEqwzqUIdz4yPvc+lCRUrP8Qs4RnvutyBKBEJGzZvann8C lGaVpiu1wTU+osx/S01NZ6cw9AZjjQSxQBSqmn/tcT1mJolsV26dj4yogrDPmhB8CtwaOL qn4Dzvry+U+92VgyU55FXxvvqwgmXDw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-208-Wt2Pz_GtPfy80AonshZmrQ-1; Mon, 27 Mar 2023 06:08:13 -0400 X-MC-Unique: Wt2Pz_GtPfy80AonshZmrQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 99DE92A59572; Mon, 27 Mar 2023 10:08:12 +0000 (UTC) Received: from toolbox.redhat.com (ovpn-192-10.brq.redhat.com [10.40.192.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id B355543FBD; Mon, 27 Mar 2023 10:08:10 +0000 (UTC) From: Michal Schmidt To: dev@dpdk.org Cc: Bruce Richardson , Konstantin Ananyev , Jingjing Wu , Beilei Xing , Leyi Rong , Wenzhuo Lu , stable@dpdk.org Subject: [PATCH] net/iavf: fix VLAN offload with AVX512 Date: Mon, 27 Mar 2023 12:07:50 +0200 Message-Id: <20230327100750.448859-1-mschmidt@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org It has been observed that mbufs of some received VLAN packets had the VLAN tag correctly set in vlan_tci, but ol_flags were missing the VLAN-indicating flags. _mm256_shuffle_epi8 operates as two independent 128-bit operations, not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags reflected in the resulting vlan_flags for all 8 rx descriptors, the input l2tag2_flags_shuf must contain the required pattern in both 128-bit halves. This fix is for the AVX512 Rx path. The same bug in AVX2 was fixed by commit eb24917428a1 ("net/iavf: fix VLAN offload with AVX2"). Fixes: 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512 path") Cc: stable@dpdk.org Signed-off-by: Michal Schmidt --- drivers/net/iavf/iavf_rxtx_vec_avx512.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c index 4fe9b972786a..bd2788121b5a 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c +++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c @@ -1214,7 +1214,10 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq, (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, + 0, 0, + RTE_MBUF_F_RX_VLAN | + RTE_MBUF_F_RX_VLAN_STRIPPED, + 0, /* end up 128-bits */ 0, 0, 0, 0, 0, 0, 0, 0, -- 2.39.2