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 3B0EFA0C53; Fri, 3 Sep 2021 12:01:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DADF40DF7; Fri, 3 Sep 2021 12:01:05 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 4AA3D40DF4 for ; Fri, 3 Sep 2021 12:01:03 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10095"; a="280396420" X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="280396420" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2021 03:00:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="429583224" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 03 Sep 2021 03:00:38 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 3 Sep 2021 03:00:36 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 3 Sep 2021 03:00:36 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 3 Sep 2021 03:00:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WjjnYdxbEIiHQ2U9xTLOVuKQA70GQ90974elIBHacbrasRag/4nJu4cw6VJS7E+lMHR62WrL/8FgL1jGIfEXvU7ct+wOpdORXKwBR58Nfvzb9pZlTXcqJfyfBs7QI/ex+c5HUq1zeCCFDNXqGquJor5VUVkef/NVI6VdUvBpCOC6+HJe15KZGQqFoRZOIEOhG2POJP4HsxzKuONq6YkCqtvTlhIcozdPMApRBI32kKRIcGERhpOL7dtrYdy2h9u1bv0I5Dfckd3LMLeCdVuRjyKYZj2Duyh7ei89U/rrFIQYj3IVKFjFfER47OClbgpfNlyrjwPEaBpWxCDpvPakQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GnTPuF+xUYQf4ApQA/yrfwXprGIv7uCKBlFvzGiiHjo=; b=cWVC0z/9LdjCJb31VcvhN4Ej7JQILq5qamUcgD5XrW+h4NvKYXFbFebnLXnkWcjB6O3Swwv5mQ1JnZl9MxdEC4NRwiB8sENzdabwQc5Cdy5Vf+9x4NLq93h5KLxGiNQnKmsPSuOSFzD8mAQSA1A0HaIzxlATEWVJWj0KJPRvz1FO8w8kpNbILIxbWElOO/n1RK/8/x2F5xw3FVLKrGx+PRP6oY5xhOMfFTpBmqA1oUavQGXRMPncdhfUKLPgbaUfLaS4X87PdHXFVh3qnrHu8DKQQBGqLmACkDv7rX7jirJtmyXs9dK+Nx19Y1ohfhZ61S+qw77Xs5tQibDCypha0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GnTPuF+xUYQf4ApQA/yrfwXprGIv7uCKBlFvzGiiHjo=; b=GdJL2XbkDPowwBqI+tMhr07slboiNapFb1EpEJGGTxaOf+KLXL8HiBfGrFDvj/3fmcSgWxi/SLKuuWDCVvABjH7JG8y2MsnCXPvsP4gY8rcGyHggW0TvmLm8DxzaWpmBD00XjJOUgJxfV6/t3FPKQGtqoWbBhCzCKO6GzPoOXNk= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5005.namprd11.prod.outlook.com (2603:10b6:a03:2d3::21) by SJ0PR11MB5069.namprd11.prod.outlook.com (2603:10b6:a03:2ad::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Fri, 3 Sep 2021 10:00:34 +0000 Received: from SJ0PR11MB5005.namprd11.prod.outlook.com ([fe80::cd8e:780f:5a1c:298a]) by SJ0PR11MB5005.namprd11.prod.outlook.com ([fe80::cd8e:780f:5a1c:298a%7]) with mapi id 15.20.4478.022; Fri, 3 Sep 2021 10:00:34 +0000 To: Bruce Richardson , CC: , Beilei Xing References: <20210818163816.19143-1-bruce.richardson@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <960c2977-1355-5105-94b8-31c2eaf1713c@intel.com> Date: Fri, 3 Sep 2021 11:00:28 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB8P191CA0006.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::16) To SJ0PR11MB5005.namprd11.prod.outlook.com (2603:10b6:a03:2d3::21) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB8P191CA0006.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.20 via Frontend Transport; Fri, 3 Sep 2021 10:00:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3f7cceb2-7269-4d23-d3c6-08d96ec1abe4 X-MS-TrafficTypeDiagnostic: SJ0PR11MB5069: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dZMUbZWWxzu6pxHYuab2YdvjT/0jvm8FwXIMTgjAhKsgkN4opIjUnMGhJY3y5XCyX+pQh9YOISehgHBoTB7/CYYunTJhSFr2lZnLQWEDyXWF9NUB09IzpN2sovrrbWhj2T9IOMLmcedb+XET5tUf01CaC+/DlcnAOM5p94VTrib97yoTKhQRDuDBqvU4WezzKPOYYiR0Q3hmd8qUfI4fJU3ZKQhKs9dPgV7/oKYymR97QGv337xdDF0CPPk+qShGyYuGXZueuyweDZ0oj4+/lRuMT5yakMlbBL5yORqSzbGbr+0cdbM3gn0sHXIbJk6nQG0e2C8E/A35JQlLzmA77W8GKZxU4addEfQQRo2RXdgwLG8cCJocVDbAiYKfMCLq1BEbzjEl3v9d1WAHL+dYMS2S4ozI2PdyTAi1CKx6Pza0A7SPVsWgtBtBLAb/YzrqpZKSbXJX8TQ7tJpQkbQ49E923gFESHdDskd07Ylo+i8ojIY77eatR2YA9Q0nrX3V45FW/D0iQd2o4LuqPxtE62Aw+hA/piKVH/a6hhVTa56dHHDwmnsmXC8/O+PFtgS7/ER/JoXcOkS8Rd5/vE5ATsIhg4w5WUvX5Zyn846jwDXMth9lQCyfZMFDr9iLh3LC5ohTOO8Lwb2EDodK7TiHLeuFcgIw51U0C0STskb9Nowne13RIGUsrvScTa0ClUhC6fmYh7nzHSMafBfnwPTHeldqGjuaiuInzPgSyINEu3U= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5005.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(396003)(366004)(346002)(39860400002)(4326008)(38100700002)(6486002)(36756003)(8676002)(2616005)(66556008)(31696002)(66946007)(8936002)(478600001)(6666004)(5660300002)(83380400001)(31686004)(86362001)(2906002)(316002)(44832011)(107886003)(53546011)(16576012)(956004)(186003)(66476007)(26005)(41533002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eEd3RGk5Q1N5QkVGL29wSXRibW5JQ2tvejU1c0JNUi93Y3FGOXhiemdNN3FG?= =?utf-8?B?Um1XUGlkS21iWHFxUUlHQkhWMzV0OU1xcm4zUTR4cEI2RTZqMW8rR3l5MzdI?= =?utf-8?B?elRaYUZQdEhzd2ttWlc0cW84b2o1MVRqcWw1eld0QW1jYXhxamVPNVdMUERl?= =?utf-8?B?T1pIbmxQaDJZeVZFSlZNNENCb2NDWXZJRXFMakpsa25wWEtxMVlJdnI1YjBp?= =?utf-8?B?YUl5cmVLYWlzWHBWV2JqRE05R1FzcFZkRGs2UVAzeDBXRzlGVTA2V3VkelRH?= =?utf-8?B?K05KRFhKR2k1RFBSVHd1dmhEOXF1UldEa3h2V1dGQTlSQXg1WFRhZ3p0azNx?= =?utf-8?B?bjAzbFVGeFBoNXhQV2ZHUVdLbmZzVjZhazREZzk1RmIyejNZZ1l5anhGNGpC?= =?utf-8?B?UTMwZnFrUFBqWm82M1RxU2hjaVNLamFpeDk2bExJaStYVlRKVWcvc3FQTGJK?= =?utf-8?B?cS91cWFmcitEWnNmWXFLQ1R1Vz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VrYzBnZ0FKTldrL0lzNFVhbGcyUWJCRWRqRGZTc0FEUW1Q?= =?utf-8?B?aldhN2RKcExhZXNsZDBka2JhQ2xmT3lHTExJWi84b2NsR3hUamI4eGNOZmlx?= =?utf-8?B?Z1BkT2VDT3RmNHVFdTFabTJUay81V2hWcGZVNVZ2SEs5Sk1ESHh4ZWkvOGdn?= =?utf-8?B?RnhXMXQwZGFYWk5ybm5YcjFUUFNFQ2lGREJvYUNGQzB6amdYTGExd3ROYUdK?= =?utf-8?B?TFZhWnlQTVZRZ0kvQTNFbnZpMDdmSGlmYWR2TGNqYkp2U0t5eU5HUkxTejU1?= =?utf-8?B?NFZ2MnQ0QmxQbVNkVlk0cnM5UmlDUGF0eVhvVS9NcTN2SW8rS0ZCMU80Q3cz?= =?utf-8?Q?imgJF4fekGlUO2V/Lspm/vJ6tpHyTEsvTyNr62p?= X-MS-Exchange-CrossTenant-Network-Message-Id: 3f7cceb2-7269-4d23-d3c6-08d96ec1abe4 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5005.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2021 10:00:34.3599 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1TwoR3/Rpe89Hh/hhqkKPgvIlr2maP2D4c+vB6EkKYdN8Gms3+EzUtBxuUQ2k12HwqT9YuWfHLprG11EQ162Zw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5069 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/2] net/i40e: fix generic build on FreeBSD 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 Sender: "dev" On 8/18/2021 5:42 PM, Bruce Richardson wrote: > On Wed, Aug 18, 2021 at 05:38:15PM +0100, Bruce Richardson wrote: >> The common header file for vectorization is included in multiple files, >> and so must use macros for the current compilation unit, rather than the >> compiler-capability flag set for the whole driver. With the current, >> incorrect, macro, the AVX512 or AVX2 flags may be set when compiling up >> SSE code, leading to compilation errors. Changing from "CC_AVX*_SUPPORT" >> to the compiler-defined "__AVX*__" macros fixes this issue. >> >> Bugzilla ID: 788 >> Fixes: 0604b1f2208f ("net/i40e: fix crash in AVX512") >> Cc: wenzhuo.lu@intel.com >> Cc: stable@dpdk.org >> >> Signed-off-by: Bruce Richardson >> --- >> drivers/net/i40e/i40e_rxtx_vec_common.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h >> index f52ed98d62..65715ed1ce 100644 >> --- a/drivers/net/i40e/i40e_rxtx_vec_common.h >> +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h >> @@ -268,7 +268,7 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev) >> #endif >> } >> >> -#ifdef CC_AVX2_SUPPORT >> +#ifdef __AVX2__ >> static __rte_always_inline void >> i40e_rxq_rearm_common(struct i40e_rx_queue *rxq, __rte_unused bool avx512) >> { > > On a higher-level, I'd suggest we look to remove the use of these macros > and AVX code in general from this header file (and ice driver equivalent). > IIRC this file was originally meant to contain only the "common" code i.e. > the scalar code, to be shared among vector implementations. Having AVX code > in this file can lead to these sorts of bugs and just makes the file no > longer truely common. The code in question here, should probably go in a > "common_avx" header, which means that we can remove the AVX2 conditions > from it etc. > Indeed I come to this thread to make exact same comment, I think better to move avx specific code into a "common_avx" header.