From patchwork Wed Jan 12 16:23:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Van Haaren, Harry" X-Patchwork-Id: 1579214 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eaSMvIpf; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JYtJn24xKz9sRR for ; Thu, 13 Jan 2022 03:27:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 696746FBEE; Wed, 12 Jan 2022 16:27:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cGMu80KUF3n9; Wed, 12 Jan 2022 16:27:49 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9780F6FBE0; Wed, 12 Jan 2022 16:27:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 69E5BC0030; Wed, 12 Jan 2022 16:27:48 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 593AFC001E for ; Wed, 12 Jan 2022 16:27:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 37A154042B for ; Wed, 12 Jan 2022 16:27:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iJdtxdw10YYk for ; Wed, 12 Jan 2022 16:27:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by smtp2.osuosl.org (Postfix) with ESMTPS id 870BB4020B for ; Wed, 12 Jan 2022 16:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642004865; x=1673540865; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/AJE1N/+7oX5YM98j7HmnYUjucqtyqSXOlJcxmXyl1k=; b=eaSMvIpfnZ8QDIyv/lKrdmdmdXa6R/KJbKG2N3t0yNldXEtYZownlQiE IF+rt5id85DwTN+IKAO44MZhnQFN0Hrb8i7rt0vUR23q5+dexoxd53G4o KSm1stMBJDwWjZGlWHPN/6ajA0gQnXOVksyPUm7v6xmI7Zhe7tQMkV8tY ffpAO93DGW/NjYM4XOaXZ0xGh7ZgA+9tMPkJjTmhHGXPxOIPt4mdbMbXB ukraUMfP5Xqog9fSSBqOwTr6utwWbmpTkdKAb2pvvJtlYgfwHc/LqQbhF xlcQX0w0MHy2L2Y2ImGSlAihnLMvAS0vMY6ZTM7e7e9g1KqFWvEJc4dN5 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10224"; a="330119703" X-IronPort-AV: E=Sophos;i="5.88,282,1635231600"; d="scan'208";a="330119703" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2022 08:24:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,282,1635231600"; d="scan'208";a="576596000" Received: from silpixa00401120.ir.intel.com ([10.55.128.255]) by fmsmga008.fm.intel.com with ESMTP; 12 Jan 2022 08:23:58 -0800 From: Harry van Haaren To: ovs-dev@openvswitch.org Date: Wed, 12 Jan 2022 16:23:53 +0000 Message-Id: <20220112162353.1468468-1-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH] dpif-netdev: fix handling of vlan and ipv4 parsing in avx512 X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This commit fixes the minimum packet size for the vlan/ipv4/tcp traffic profile, which was previously incorrectly set. This commit also disallows any fragmented IPv4 packets from being matched in the optimized miniflow-extract, avoiding complexity of handling fragmented packets and using scalar fallback instead. Fixes: aa85a25095 ("dpif-netdev/mfex: Add more AVX512 traffic profiles.") Signed-off-by: Harry van Haaren --- This patch should be applied to 2.16 as well. I expect it applies cleanly, but volunteer to rebase/fixup on 2.16 release and send new patch if required. --- lib/dpif-netdev-extract-avx512.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dpif-netdev-extract-avx512.c b/lib/dpif-netdev-extract-avx512.c index d23349482..7b21a3af9 100644 --- a/lib/dpif-netdev-extract-avx512.c +++ b/lib/dpif-netdev-extract-avx512.c @@ -157,7 +157,7 @@ _mm512_maskz_permutexvar_epi8_wrap(__mmask64 kmask, __m512i idx, __m512i a) 0, 0, 0, 0, /* Src IP */ \ 0, 0, 0, 0, /* Dst IP */ -#define PATTERN_IPV4_MASK PATTERN_IPV4_GEN(0xFF, 0xFE, 0xFF, 0xFF) +#define PATTERN_IPV4_MASK PATTERN_IPV4_GEN(0xFF, 0xFF, 0xFF, 0xFF) #define PATTERN_IPV4_UDP PATTERN_IPV4_GEN(0x45, 0, 0, 0x11) #define PATTERN_IPV4_TCP PATTERN_IPV4_GEN(0x45, 0, 0, 0x06) @@ -389,7 +389,7 @@ static const struct mfex_profile mfex_profiles[PROFILE_COUNT] = .dp_pkt_offs = { 14, UINT16_MAX, 18, 38, }, - .dp_pkt_min_size = 46, + .dp_pkt_min_size = 58, }, };