From patchwork Fri Jan 15 17:38:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Stokes, Ian" X-Patchwork-Id: 1427201 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DHT2274nNz9sVk for ; Sat, 16 Jan 2021 04:39:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 612AE22F05; Fri, 15 Jan 2021 17:39:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vm4hF1h5bwrh; Fri, 15 Jan 2021 17:39:03 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 9B4B620768; Fri, 15 Jan 2021 17:39:03 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8172BC088B; Fri, 15 Jan 2021 17:39:03 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id A624DC013A for ; Fri, 15 Jan 2021 17:39:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 99EA7203D1 for ; Fri, 15 Jan 2021 17:39:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iOzJns-ATaOu for ; Fri, 15 Jan 2021 17:38:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by silver.osuosl.org (Postfix) with ESMTPS id 554A1203BD for ; Fri, 15 Jan 2021 17:38:59 +0000 (UTC) IronPort-SDR: C+ACUH5VYeNQMUSAzQJVQco9xADNt+Cga6sgE6W3D4nXisT4M/4MVBS6X0rxAnK4smZJl9DcUk u/xMMA0A1VkA== X-IronPort-AV: E=McAfee;i="6000,8403,9865"; a="175079280" X-IronPort-AV: E=Sophos;i="5.79,350,1602572400"; d="scan'208";a="175079280" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 09:38:58 -0800 IronPort-SDR: H8RX7gJwvoLwja+MrlCdP5utSLML+3S38FRU1JUDgnZgwhetqnQV12EgjnFmAPvFi33ybvt/eV nINr3q/7HHqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,350,1602572400"; d="scan'208";a="405542454" Received: from sivswdev08.ir.intel.com (HELO localhost.localdomain) ([10.237.217.47]) by FMSMGA003.fm.intel.com with ESMTP; 15 Jan 2021 09:38:57 -0800 From: Ian Stokes To: dev@openvswitch.org Date: Fri, 15 Jan 2021 17:38:55 +0000 Message-Id: <1610732335-3775-1-git-send-email-ian.stokes@intel.com> X-Mailer: git-send-email 1.7.0.7 Cc: david.marchand@redhat.com, bluca@debian.org, i.maximets@ovn.org Subject: [ovs-dev] [PATCH v1 branch-2.13 2/2] acinclude: Strip out -mno-avx512f provided by DPDK. 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: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" DPDK forces '-mno-avx512f' flag for the application if the toolchain used to build DPDK had broken AVX512 support. DPDK forces '-mno-avx512f' flag for the application if the toolchain used to build DPDK had broken AVX512 support. But OVS could be built with a completely different or fixed toolchain with correct avx512 support. Fix that by stripping out `-mno-avx512f` as we already do for '-march'. This will allow the OVS to decide if the AVX512 can be used. Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not an option since autotools might reorder them back later and it's very unpredictable. Reported-at: openvswitch/ovs-issues#201 Signed-off-by: Ilya Maximets Co-authored-by: Ilya Maximets Signed-off-by: Ian Stokes --- acinclude.m4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 9922c69b0..4033e28eb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -433,7 +433,13 @@ AC_DEFUN([OVS_CHECK_DPDK], [ fi # Force in pkg-config since this could override user-specified options. # It's enough to have -mssse3 to build with DPDK headers. - DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g') + DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g' + # Also stripping out '-mno-avx512f'. Support for AVX512 will be disabled + # if OVS will detect that it's broken. OVS could be built with a + # completely different toolchain that correctly supports AVX512, flags + # forced by DPDK only breaks our feature detection mechanism and leads to + # build failures: https://github.com/openvswitch/ovs-issues/issues/201 + DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-mno-avx512f//g')) OVS_CFLAGS="$OVS_CFLAGS $DPDK_INCLUDE" OVS_ENABLE_OPTION([-mssse3])