From patchwork Thu Dec 8 12:19:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Schmidt X-Patchwork-Id: 120582 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67F76A00C2; Thu, 8 Dec 2022 13:19:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CBC240E28; Thu, 8 Dec 2022 13:19:44 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4D19740A7E for ; Thu, 8 Dec 2022 13:19:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670501981; 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=ARWcJvaTLvshXAtN1PyLA7dlg9lFmiyD8QVMCEpPb/A=; b=c4qyGcdOHd3kaY647V+k/3oFZD1O3aWOhq5l0zYF5KSgEjrtIaYrjmDJqMuDRJWuOEN08C vPlNJYYRak7cFgjQGoAcev6CM4m1/6ruYWzBHEBIfixq6dKr5rACuDX1FExbbz8zvrsCvs Ejz3KSmpqAXle100T3r5FVhpN6unwW0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-doSMPwZkOpirelvI6PUbAw-1; Thu, 08 Dec 2022 07:19:38 -0500 X-MC-Unique: doSMPwZkOpirelvI6PUbAw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2F494101A56C; Thu, 8 Dec 2022 12:19:38 +0000 (UTC) Received: from localhost.localdomain (ovpn-194-148.brq.redhat.com [10.40.194.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16F71492CA4; Thu, 8 Dec 2022 12:19:36 +0000 (UTC) From: Michal Schmidt To: dev@dpdk.org Cc: Bruce Richardson , Jingjing Wu , Beilei Xing , Haiyue Wang Subject: [PATCH] net/iavf: fix mbuf VLAN offload flags in the L2TAG2 path with AVX2 Date: Thu, 8 Dec 2022 13:19:16 +0100 Message-Id: <20221208121916.155132-1-mschmidt@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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. Fixes: 3a1aca384d3a ("net/iavf: fix VLAN tag extraction handling") Signed-off-by: Michal Schmidt Reviewed-by: Maxime Coquelin Acked-by: Wenzhuo Lu --- drivers/net/iavf/iavf_rxtx_vec_avx2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c index 862f6eb0c0..b4ebac9d34 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c +++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c @@ -1074,7 +1074,10 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq, _mm256_set_epi8(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,