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 2968EA0A0E; Fri, 14 May 2021 00:19:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CE1940041; Fri, 14 May 2021 00:19:29 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2065.outbound.protection.outlook.com [40.107.21.65]) by mails.dpdk.org (Postfix) with ESMTP id BE3354003F for ; Fri, 14 May 2021 00:19:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pQnfb/cCnrWf2/LHVu5C7a+aMqK7gA864lHuVtBwNMo=; b=vw4azZpscUPv6TThuS7DgfOySJFkLDWh9Ag7GerocG3F4ifwNjWCXcB0VbXdAYFe8hEtL8R95gI93Kge8GReUG8w+ttGgHwD+jIEXnz5L/KEKjsk5UEq++lnK2xRt/11yO3tQCURWSzYGN098n2R72mcN/BNJiacr226IZcncCE= Received: from AM6P194CA0059.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::36) by VE1PR08MB5166.eurprd08.prod.outlook.com (2603:10a6:803:10a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Thu, 13 May 2021 22:19:24 +0000 Received: from AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::ff) by AM6P194CA0059.outlook.office365.com (2603:10a6:209:84::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Thu, 13 May 2021 22:19:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT055.mail.protection.outlook.com (10.152.17.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Thu, 13 May 2021 22:19:23 +0000 Received: ("Tessian outbound 13cdc29c30b8:v91"); Thu, 13 May 2021 22:19:23 +0000 X-CR-MTA-TID: 64aa7808 Received: from 0532326192fa.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2CA93232-51D6-4332-95A9-464FF4D6D500.1; Thu, 13 May 2021 22:19:13 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0532326192fa.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 13 May 2021 22:19:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JlLQ3uPdek7mH6SAfHqcn6YlZ5RDxRgs6CR70FwcwvkLcbKIxvGhZkWIhMYkRhiFAaOxkXvgivsIOhqCj3tRfNDoiwWwfUYBLyNosG64UTVShceVF/f7KuorNJmbIDELV/sWUw/0twDwFgldfV2fN+bZ+ZExg9tLt4+MFRzRFILBx+iBeMz0KuM5Anb2YiNphiV4+uGGllIu0sUprOobu2UIdSvQx8GQ6v55dx8F8w+U+z95v5n4Hyo/xgQAbe+mNKcUz7nVQvfGq+tUtxlXYG4YrtiOeZPEG1a6Lq1B6YNVub4RdthNvlq6JFyzshVe92JWiAIjXTvD5mY4hXAHqA== 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=pQnfb/cCnrWf2/LHVu5C7a+aMqK7gA864lHuVtBwNMo=; b=lzencUmQlQOrTwHUZI6paYL+hQQb2LxCG4V9u7v1FzC47f/4W983ouTTkrq15Jvoq+YAHyJGLiaeQn41Ry7CBpT1YxWzhpBgXuBjLsxcA41N/64wfHgFG0/Cv4cnB/uyYucWtqV6Y30IRHm/JeTBHJFnLUSgnCwIO9jiZ4YdlUOYG0syYe3DUOtppb6yLuRY/cQbmn3CFgvXolXt/kQ86MVS8+dFOL5EruPKXJv/1HvmS5lhijsxpYQ5UYlyezZYnrtxOeRmS7ilalXQ4uAHD698KELnYcPJL/smei6kvnoxzdfZyXHtEpvoKvfTBeyru0jSFHOirToLaC75LGHzXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pQnfb/cCnrWf2/LHVu5C7a+aMqK7gA864lHuVtBwNMo=; b=vw4azZpscUPv6TThuS7DgfOySJFkLDWh9Ag7GerocG3F4ifwNjWCXcB0VbXdAYFe8hEtL8R95gI93Kge8GReUG8w+ttGgHwD+jIEXnz5L/KEKjsk5UEq++lnK2xRt/11yO3tQCURWSzYGN098n2R72mcN/BNJiacr226IZcncCE= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB7PR08MB3754.eurprd08.prod.outlook.com (2603:10a6:10:73::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Thu, 13 May 2021 22:19:09 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::f15f:821c:74c5:2482]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::f15f:821c:74c5:2482%2]) with mapi id 15.20.4129.025; Thu, 13 May 2021 22:19:09 +0000 From: Honnappa Nagarahalli To: Chengwen Feng , "thomas@monjalon.net" , "ferruh.yigit@intel.com" CC: "dev@dpdk.org" , "jerinj@marvell.com" , Ruifeng Wang , "viktorin@rehivetech.com" , "bruce.richardson@intel.com" , "jerinjacobk@gmail.com" , "juraj.linkes@pantheon.tech" , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v4 2/2] net/hns3: refactor SVE code compile method Thread-Index: AQHXR/l8IQAZ+o/usUm9vd6dC2dlgarh4tpg Date: Thu, 13 May 2021 22:19:09 +0000 Message-ID: References: <1620808126-18876-1-git-send-email-fengchengwen@huawei.com> <1620911283-55627-1-git-send-email-fengchengwen@huawei.com> <1620911283-55627-3-git-send-email-fengchengwen@huawei.com> In-Reply-To: <1620911283-55627-3-git-send-email-fengchengwen@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 3F303C042B3AB4459CC316545DF9F7ED.0 x-checkrecipientchecked: true Authentication-Results-Original: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [107.77.217.67] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: bcb54ce1-c2ca-4a0a-e7ca-08d9165d29d9 x-ms-traffictypediagnostic: DB7PR08MB3754:|VE1PR08MB5166: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: y5nw+6edrBW2qHDiZqS9bCsRo9wiNCjJvu9ybaj5WRbz8tKN8Dn8+cEk0chUkxMtFUvM1e7lC3zUUo15QvUpEKGM4fJ8XErehPJv2Bf4jg3oRERR0DPCErOjCqrMO7KMLc2nodKWaZGeculGLImDn+lnSC0fkR/rQ43kZaaUkNaqaqetIl7mLayaCMC/0eBCygMKXkKQOBXUb0s6/rzYMrXOhfC42S+sUYB+05xkLqRgldsToho534TvGTKwAj87MRZzEQL/MErptavGEIee9E/6dqCx4DMHIdYyajodwdKOUq79uz7eDXRzHSQOr6ihyzxHNGgDBiQrorM1UTLirbPzkciWDUrgoIdfqMpLbgaIgmPw+FmztNC5smreMkig0V7PUPlRhEJlfEtwS0uJK8WZAnNm9Ry1687aaJRm0tjPDJpFu8omjT48HopbQpFo+8uv26QgX0Lw7Yaikf7+MpBY7/74hVnD2y+9/08rDmLIHm5VjOApt+RkDov4iM+2slc68Yikmk5AWX42FOmZ6gZet2VH7IDOxGuDdgUgzn8dHFD0peaptR2Cik789MjWbjGnJDpQiIXxnEQk/tZuinkMjlm4gVPRbKP3/E7btDwMuukJKKY/Wksz6nHfwcRpKcGi89eLf0tFl8+UNxK9lWKDDN8hJgk/wfW/QxtefarK80K+GVeaBkGROFU9Mthe X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(366004)(136003)(346002)(39850400004)(966005)(6506007)(55016002)(478600001)(33656002)(7696005)(2906002)(86362001)(26005)(186003)(110136005)(8676002)(316002)(66446008)(66476007)(66556008)(64756008)(54906003)(122000001)(52536014)(5660300002)(83380400001)(38100700002)(4326008)(71200400001)(8936002)(66946007)(9686003)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam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ExNmPIZGl+l1S3OuNtVfMmtPcVLT1RtO6vlk?= =?us-ascii?Q?cLbt0no+MI4+FI+PfqZNa+6hm6Rv9me3FVeQlSJSjKC6emwmU+Ss9zLGYPvj?= =?us-ascii?Q?dI7uGLRwecJ34fPV+EpomHZRhJk4csIQVhehq9xGZl7cdEg4nZrB680VoRHF?= =?us-ascii?Q?mNjWxtBooMLGawNuCHAZ5XtOrC8aP4VE1FdXuvM+GKNdVOwWGKLMWFB65DCp?= =?us-ascii?Q?5XFHgM1e+jXNW948eiiy0hOEoBaR5lfOGIHxbHCM8fxCxwC5fhXDAlljXqbx?= =?us-ascii?Q?pJGvXnxBBB2KL/gPEX8hovMJ+mg6aYg1+jNmOKE7YS7NfKw6msXbQ/ShbNDX?= =?us-ascii?Q?UqK+GV5JWpYFIkbIxZMzI9CAF7KKKbBwOsgkofukmHMOBl0w1xRWqvqemxFU?= =?us-ascii?Q?gKDWp7nkRYTdYHMC9VIupi6niu2l0OwtDDbdjxOJbwLInXxjToqAGpxsXbV+?= =?us-ascii?Q?/fmO5FhSz3dARa9yXfYnmZMf?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3754 Original-Authentication-Results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 3a0f1f5c-7c2d-4224-c6ee-08d9165d2159 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vq8KS3Xj6UCx1I3sVTbG9SC+lRcBHXnrympyAR7xJTO4dNWYQscNikj8SV6RSfl6Jav+k3tCZ2nsuN9m31LUlhluO3nRW+wNz/MAomnPPLsJaIYooaR0aUD19ihchR6PE2XNntwReZlol8bi0UK3scyTJzO+P6P6UlFdFcMG+ujpUGBYKU8PCR38tgKQpJqgxV1c75ksEN6eg4egkgjeaqtbY7xSAyyVGasY/866vwAvBQx1zpKwpTVJivAK23gWQLCVK1pUfzCRZ1vN+4lDxQJD4x+kvaTupYf7Thrc5J/vj/9zJl4boF4NO77ilXmjc6F3ANBPHK6vZ4zHqbjBzhbFm2HLm9keeDi+Sdgv9+vafCnywSizFC1qjXvlaEdZ7+vManzVWi8Pk2yzO1p4mot+1p/7N41w6Ab5nGrNhQChjDJN6cuaBwH56GO8hFErJLLYrf1St8T0jgFdwQ8SwMbzrkxTrjSamqVAAmLMzxnPF63haC139eexazGuyb4KmC7dSxBzF8w0y/eYWNb8innhCUFVNI7SGl95wAIoV11EHinpnk8j0SJv6FNhwmxFOPWTxN/IyYo+cQe6t4wAMWnef+fPpQaT9i4s43WbDXpbhFqn0GkCIKv37aGWDDFxnD9Nk9C9pdvdSJC0QD0850VvV5d07mc1K4IzzHNgC/jjQkfuOOS/4mB6ALB6mfgmXvztnUEj51QX/eO15rMJcuWQ1qxnjo2MmBFnKjkCBNTe2cbJ+RBHzoFFWbYzdLZ2FMa0pDMdrxQLoHj2qRwlig== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(39850400004)(376002)(136003)(346002)(396003)(36840700001)(46966006)(8676002)(33656002)(356005)(4326008)(55016002)(26005)(336012)(47076005)(2906002)(6506007)(70206006)(81166007)(82740400003)(9686003)(82310400003)(70586007)(52536014)(8936002)(54906003)(110136005)(316002)(86362001)(966005)(36860700001)(7696005)(5660300002)(478600001)(186003)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2021 22:19:23.8972 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bcb54ce1-c2ca-4a0a-e7ca-08d9165d29d9 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5166 Subject: Re: [dpdk-dev] [PATCH v4 2/2] net/hns3: refactor SVE code compile method 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" >=20 > Currently, the SVE code is compiled only when -march supports SVE (e.g. '= - > march=3Darmv8.2a+sve'), there maybe some problem[1] with this approach. >=20 > The solution: > a. If the minimum instruction set support SVE then compiles it. > b. Else if the compiler support SVE then compiles it. > c. Otherwise don't compile it. >=20 > [1] https://mails.dpdk.org/archives/dev/2021-April/208189.html >=20 > Fixes: 8c25b02b082a ("net/hns3: fix enabling SVE Rx/Tx") > Fixes: 952ebacce4f2 ("net/hns3: support SVE Rx") > Cc: stable@dpdk.org >=20 > Signed-off-by: Chengwen Feng > --- > drivers/net/hns3/hns3_rxtx.c | 2 +- > drivers/net/hns3/meson.build | 13 +++++++++++++ > 2 files changed, 14 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c > index 1d7a769..4ef20c6 100644 > --- a/drivers/net/hns3/hns3_rxtx.c > +++ b/drivers/net/hns3/hns3_rxtx.c > @@ -2808,7 +2808,7 @@ hns3_get_default_vec_support(void) > static bool > hns3_get_sve_support(void) > { > -#if defined(RTE_ARCH_ARM64) && defined(__ARM_FEATURE_SVE) > +#if defined(CC_SVE_SUPPORT) > if (rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_256) > return false; > if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SVE)) > diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build > index 53c7df7..8563d70 100644 > --- a/drivers/net/hns3/meson.build > +++ b/drivers/net/hns3/meson.build > @@ -35,7 +35,20 @@ deps +=3D ['hash'] >=20 > if arch_subdir =3D=3D 'arm' and dpdk_conf.get('RTE_ARCH_64') > sources +=3D files('hns3_rxtx_vec.c') > + > + # compile SVE when: > + # a. support SVE in minimum instruction set baseline > + # b. it's not minimum instruction set, but compiler support > if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) !=3D '' > + cflags +=3D ['-DCC_SVE_SUPPORT'] Can you please look at commit 21c4f1c7b2f8e637ecff9b9180e21f6b4505715f? Thi= s commit removed the CC_SVE_SUPPORT flag due to a compilation error. > sources +=3D files('hns3_rxtx_vec_sve.c') > + elif cc.has_argument('-march=3Darmv8.2-a+sve') > + cflags +=3D ['-DCC_SVE_SUPPORT'] > + hns3_sve_lib =3D static_library('hns3_sve_lib', > + 'hns3_rxtx_vec_sve.c', > + dependencies: [static_rte_ethdev], > + include_directories: includes, > + c_args: [cflags, '-march=3Darmv8.2-a+sve']) > + objs +=3D hns3_sve_lib.extract_objects('hns3_rxtx_vec_sve.c') > endif > endif > -- > 2.8.1