From patchwork Thu Jan 27 03:45:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1584784 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=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=CeGAe6Sn; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 4JkmhX2z2Dz9tk5 for ; Thu, 27 Jan 2022 14:45:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C4B5541C34; Thu, 27 Jan 2022 03:45:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HT-gsqQQOkln; Thu, 27 Jan 2022 03:45:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0FA2941C1F; Thu, 27 Jan 2022 03:45:41 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D1C23C0011; Thu, 27 Jan 2022 03:45:41 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1EA15C000B for ; Thu, 27 Jan 2022 03:45:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id EC1DC61073 for ; Thu, 27 Jan 2022 03:45:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 284ajd0M5hMA for ; Thu, 27 Jan 2022 03:45:39 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3117F6106E for ; Thu, 27 Jan 2022 03:45:39 +0000 (UTC) Received: by mail-pl1-x629.google.com with SMTP id h14so1411025plf.1 for ; Wed, 26 Jan 2022 19:45:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1EJH8V43jaA3mMBTghukWPrgB6PSbc2x43jzhmC6HqY=; b=CeGAe6SngBvC/mgQyhxXqWwn395/09zP8SB6Mbl193VTbiP0CM7GiuMsdnNBTl3VhN taULjU8kWjY61eSyF5L/YHB1vK8s/FAxJANql044alnmoEZBzL/z7f+hskD4AKkbmfzO ecKCMef6hRYqE75MvPJcg7P8ydnCilTtY7jqur8KUOizAS31o7I4aC36xGpnEzsSc0ru rYG9wZ8WaEsMf8UDCQW3VaGr4TryQaHifvojB6e5kJcEAW/zUWL8Cdf1OBhRON+daUZZ U0Ok9rsPZ4pe46NRpatM1Ca5QaTp98rY5bIdsbldICR0Id7hNc4/ZaBDBKLK9GcHEZ+r 2t6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1EJH8V43jaA3mMBTghukWPrgB6PSbc2x43jzhmC6HqY=; b=1z3Iurlnl+APGeW9OpPQujSxteHJLuqtyXMARYLrYhpD2LmfaP3YJzbHAzX8eKZU8Y mDC2CcF5p/1GsZH0Zwd/3jDCWUlYCFexA7jgEIGaQ3T7Knq+b7a9liIIq4xPCDBK0Aw6 tS/vZB0kX7Rz75D+nIOMG1175gjbErtPf6f+PP0tZGwNzD3Hou/Igc77Klou6xAz6iG1 +VdiMbVBkuWxN6YTMUYhjQlbL+o0EJTsBz6yi8sMCS7vrTUC5ES4QRKb/qQk+tNIPC8n fQ3AJ3/eEKH5Xgve0GCJeNZywCaYwUiUOiiL0oqENrKLwpMedKVTg5oVXMrdPes7ssXa aT9Q== X-Gm-Message-State: AOAM5318zqt3Vt/J0+FeFAzW9RWCyev4YYzLyY4l/MMLEFKO6xMW+HYJ nl3Cu0FkyFqT7oE8v/VQ2a95jbNw1QA= X-Google-Smtp-Source: ABdhPJxLbuKj5eFUExRzvLZQuGd8qSFMYCdl0NWDjDXazv4SzP2G9hedquuSW5S9umiHqmwpCsZm7Q== X-Received: by 2002:a17:903:24f:: with SMTP id j15mr2035749plh.89.1643255137965; Wed, 26 Jan 2022 19:45:37 -0800 (PST) Received: from tuc-a02.vmware.com.com ([124.6.29.59]) by smtp.gmail.com with ESMTPSA id f13sm2926894pfc.80.2022.01.26.19.45.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jan 2022 19:45:37 -0800 (PST) From: William Tu To: dev@openvswitch.org Date: Wed, 26 Jan 2022 19:45:26 -0800 Message-Id: <20220127034526.11692-1-u9012063@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Subject: [ovs-dev] [PATCH] acinclude: Detect avx512 vpopcntdq compiler support. 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" Ubuntu Xenial 16.04 is using GCC 5.4 and it does not support target "-mavx512vpopcntdq" and cuases error lib/dpif-netdev-lookup-avx512-gather.c:356:47: error: attribute(target("avx512vpopcntdq")) is unknown GCC 7+ supports vpopcntdq: https://gcc.gnu.org/gcc-7/changes.html The patch detects vpopcntdq and disables AVX512 when not found. Reported-by: Greg Rose Signed-off-by: William Tu Tested-by: Greg Rose Reviewed-by: Greg Rose Acked-by: Cian Ferriter --- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 5c971e98ce91..0c360fd1ef73 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -77,7 +77,7 @@ dnl Checks if compiler and binutils supports AVX512. AC_DEFUN([OVS_CHECK_AVX512], [ OVS_CHECK_BINUTILS_AVX512 OVS_CHECK_CC_OPTION( - [-mavx512f], [ovs_have_cc_mavx512f=yes], [ovs_have_cc_mavx512f=no]) + [-mavx512f -mavx512vpopcntdq], [ovs_have_cc_mavx512f=yes], [ovs_have_cc_mavx512f=no]) AM_CONDITIONAL([HAVE_AVX512F], [test $ovs_have_cc_mavx512f = yes]) if test "$ovs_have_cc_mavx512f" = yes; then AC_DEFINE([HAVE_AVX512F], [1],