From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EA24CA04B7; Wed, 14 Oct 2020 10:28:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA91D1DB60; Wed, 14 Oct 2020 10:28:48 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60045.outbound.protection.outlook.com [40.107.6.45]) by dpdk.org (Postfix) with ESMTP id D5AA41D5D4 for ; Wed, 14 Oct 2020 10:28:46 +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=e1wBY4sg7WpiFyheitRuvGV65sW5fKAFGFgdXLsd9s0=; b=3VCM9UWm9UwVSQwi0f14XaAtDCY+n0fN4kRsTTrD0aqQSjHYaKiNnFJFzNMTa0Ck3yY5W1vlqpEnbnV8uJoGfnY+s4qVwWoABtW5dSTqiZZRVFX2rrKgUM5Zh2MzFjUOuAP/4E1S4ney6ML1vX0XUfeADzpZRAxkQdf5PSBVHG0= Received: from AM6PR05CA0016.eurprd05.prod.outlook.com (2603:10a6:20b:2e::29) by HE1PR0802MB2170.eurprd08.prod.outlook.com (2603:10a6:3:ca::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Wed, 14 Oct 2020 08:28:43 +0000 Received: from AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2e:cafe::dd) by AM6PR05CA0016.outlook.office365.com (2603:10a6:20b:2e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Wed, 14 Oct 2020 08:28:43 +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 AM5EUR03FT011.mail.protection.outlook.com (10.152.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Wed, 14 Oct 2020 08:28:43 +0000 Received: ("Tessian outbound c189680f801b:v64"); Wed, 14 Oct 2020 08:28:43 +0000 X-CR-MTA-TID: 64aa7808 Received: from d17335a6d75e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E9BA9B99-919B-4B25-B61E-1119D1CB318E.1; Wed, 14 Oct 2020 08:28:38 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d17335a6d75e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 14 Oct 2020 08:28:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ARRuq+0NWrXQGRFphdCArrPbNq0c6VTrepXIaojL3vncrSAAY+xN/xDnZ0NY7DpquD4l0UmcmMgq5hBgLK6amhTKeK1zFeuYbgTlHFdfZ2Bi/7kja1sQ85RNEV9+8U/b+4/Wpl2FAp2Y8B+HEY0WUVgGYgMMcnFRRusEiMn7j3rfAGTeEZUBWWa2E9TUvhbLiMFmXHJCAkiNBG60Y1O5u0isbUmvoraGe12T5+yOqd+vi3AoTJ+7LG1d2iItGSaWrsylf/JYc4OfVzAbqn2M6C3C4yoTojCmj+rl629QM0R0Gb0zMS/LcuZUPPi4Ue3h1zS5xRE0xz6Xr/I1Khx6AA== 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=e1wBY4sg7WpiFyheitRuvGV65sW5fKAFGFgdXLsd9s0=; b=jHeGrWXnJQ+QPg3pVzy20Crsk+5MSrRNMYRNkEezn7Cf0SFftRtKP8xb60/wKtn9jiNRm4fr/K4XhMu7A4riwP9NLBBepMc/iuRI0Igye0tD3a5ZVfPG/uYaISOrIO6lb+sJGNrC090YhiQtycuuWCAXhzG2JL65dsMnzDdQZ4C2N8tOOy3knRJP0/dmPDNxJfRv4uzb3sQDlhatGgeQzUxvt6+vW5hDVQrRCTC0douxBWz+pFbQtfz75l1Pg6sZPe7o6BmNPl5+R5yb9tbw2rQlAAF0KWaNl1THMc8YHixlPFIMq+r04+sDdM43f3/Sl5VVMSa+ye9adM74xCMYLA== 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=e1wBY4sg7WpiFyheitRuvGV65sW5fKAFGFgdXLsd9s0=; b=3VCM9UWm9UwVSQwi0f14XaAtDCY+n0fN4kRsTTrD0aqQSjHYaKiNnFJFzNMTa0Ck3yY5W1vlqpEnbnV8uJoGfnY+s4qVwWoABtW5dSTqiZZRVFX2rrKgUM5Zh2MzFjUOuAP/4E1S4ney6ML1vX0XUfeADzpZRAxkQdf5PSBVHG0= Received: from VI1PR0802MB2351.eurprd08.prod.outlook.com (2603:10a6:800:a0::10) by VI1PR08MB2879.eurprd08.prod.outlook.com (2603:10a6:802:20::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.26; Wed, 14 Oct 2020 08:28:36 +0000 Received: from VI1PR0802MB2351.eurprd08.prod.outlook.com ([fe80::14d4:6ade:368a:204b]) by VI1PR0802MB2351.eurprd08.prod.outlook.com ([fe80::14d4:6ade:368a:204b%3]) with mapi id 15.20.3455.031; Wed, 14 Oct 2020 08:28:35 +0000 From: Ruifeng Wang To: Ciara Power , "dev@dpdk.org" CC: "viktorin@rehivetech.com" , "jerinj@marvell.com" , "drc@linux.vnet.ibm.com" , "bruce.richardson@intel.com" , "konstantin.ananyev@intel.com" , Nithin Dabilpuram , Pavan Nikhilesh , Kiran Kumar K , nd Thread-Topic: [PATCH v5 17/17] node: choose vector path at runtime Thread-Index: AQHWoVDPWRr60i7X5UKl5xr/NqYBu6mWxHog Date: Wed, 14 Oct 2020 08:28:35 +0000 Message-ID: References: <20200807155859.63888-1-ciara.power@intel.com> <20201013110437.309110-1-ciara.power@intel.com> <20201013110437.309110-18-ciara.power@intel.com> In-Reply-To: <20201013110437.309110-18-ciara.power@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 11C3A08150B2A8419F06A48035272453.0 x-checkrecipientchecked: true Authentication-Results-Original: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [203.126.0.112] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 50e1b3a0-9b69-41bf-a71f-08d8701b2978 x-ms-traffictypediagnostic: VI1PR08MB2879:|HE1PR0802MB2170: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:2276;OLM:2276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 4oN2gdvf4OLIJ5mttkPmhNgev4K7ypXX18qGJ1ATKC3b5T1SFeE7GUakJ5GSRqh0cR7hZkMquLWZ9+ozJLz9yjrqSnh7OJ2K/43pZ/lBe0evRXsMAZN1lccAprQA1M8rJcMakZJGnZMLU7lE6DAU/KVMn+RtaL7tSvlUVuhkGgIQgVNcNsSRW4VKZ87iWbtAwfA5KLGi/zvpif9SU/Dm3z311/ZlgFDuiJcmX6jCkLzj1nG9Vl+vfoxQG1r3t2m/1GyCYFm3GOSPw17FOda8PjiiKl/Goyywj7Lq8S3bcl+ZXPoUxqEaHXCCgqj2kn5dLcEXeVulgym/SZKerEzM+A== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0802MB2351.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(39860400002)(396003)(346002)(376002)(66446008)(66556008)(66476007)(316002)(66946007)(5660300002)(86362001)(33656002)(76116006)(7416002)(54906003)(52536014)(9686003)(26005)(55016002)(478600001)(186003)(2906002)(8936002)(7696005)(110136005)(64756008)(71200400001)(6506007)(4326008)(53546011)(83380400001)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: yh9bg8sue8MfCdvKQSnGHaI2sVWLJv8GoU+88P2PAMsa0NlNjoF32+6x37uS6+XdDLvJzTOKNgvZHIrRUbuVMTXrbK3lK5DawGhfawX85cCxtbWNcw4be4Ur8+YepSmrWJPn+TWrq3PdDQQ8fshf4LdPEm7HJMgahAqkCQoHWfJzgvOybgRCLp4SnNwyen7J6kR+y9NVs8ZYE42puw4DV5SnbuaTTezWzxM2hULL+KvCexgq8FTqsKkOyYp0KPwvMLpPFdA0WoimAe+Kmxr25Jx2J7DK7B9O/B+D9kk9ewMn/Z3eQ38GGt/n6XqAWEaiSm0vM+DN9J/bvGU4W6R+5kD1CKFJVL2IUtYd7teBBieFVMQ71l4npNqhqSjK4ZbNambx3j48qKQi+m7SUWDKcUqVM69cLRQtLVFGtmHuhdw2Gvul5jvCpiQM9ch69AKA/qu/u1pPWza1AIIIATd7F9C0DUs/lOvOjUf9o/V+Qg2ziGX9onzELJYBh1vJo6bNV2o+k9p/+1DtEPW6f1YF8/T1Rfh/vvp8wEyCbtQI3/fouS/C9mX0bk/DZCzMCWfWfoUYG8WsIN53qh5M4/k1wdAbjvFP9qu9sVeo68O3SK6nI7zOOHWbv3pOeTTJ+b61WxdLA2TOzjI6GElwXAUDlw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2879 Original-Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4a5624b3-605b-4492-b74c-08d8701b249b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sieGQXc1+8HP7nN5q+O9LFHfFLzMWvRic55Y1QlOu5qlXO/kNnpiyTBiOA9c4UvjZoA/xObjXylpCV3vikPPCGWnAnbR0WyZ1dGDi257dUBHaTxM8PRw3U1W2lJV5N4W830g+4gsqsQUsmvoh7HGP638SkJhEZKcCls3dgeEwb/W/hh69xBCoQgJT1u59ZbeldInV+N0123Pn9M+IpCARxImeipNTIOPejYN3kzbVIiiK2ekLse9XKApQhHd1bhuKB4Dt027fjNxbTAEidckS3iYRpZpvOe/xpE8AAjwIfwRzBgMryYqZNJCG94h8dDXvdchXTZxg98xO9TKsSpEe1IJh70+YwbWqA3QMO750lcohxkB/rLn7ucVNdotawr+zEISZcBYAa4pgpJGHvX3cw== 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)(136003)(396003)(376002)(39860400002)(346002)(46966005)(336012)(26005)(9686003)(55016002)(478600001)(8936002)(81166007)(4326008)(82740400003)(47076004)(8676002)(2906002)(186003)(7696005)(83380400001)(356005)(53546011)(82310400003)(36906005)(33656002)(6506007)(86362001)(5660300002)(54906003)(316002)(70586007)(70206006)(110136005)(52536014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2020 08:28:43.4566 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 50e1b3a0-9b69-41bf-a71f-08d8701b2978 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: AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2170 Subject: Re: [dpdk-dev] [PATCH v5 17/17] node: choose vector path at runtime X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > -----Original Message----- > From: Ciara Power > Sent: Tuesday, October 13, 2020 7:05 PM > To: dev@dpdk.org > Cc: viktorin@rehivetech.com; Ruifeng Wang ; > jerinj@marvell.com; drc@linux.vnet.ibm.com; bruce.richardson@intel.com; > konstantin.ananyev@intel.com; Ciara Power ; > Nithin Dabilpuram ; Pavan Nikhilesh > ; Kiran Kumar K > Subject: [PATCH v5 17/17] node: choose vector path at runtime >=20 > When choosing the vector path, max SIMD bitwidth is now checked to > ensure the vector path is suitable. To do this, rather than the scalar/ve= ctor > lookup functions being called directly from the apps, a generic function = is > called which will then call the scalar or vector lookup function. >=20 > Cc: Nithin Dabilpuram > Cc: Pavan Nikhilesh > Cc: Jerin Jacob > Cc: Kiran Kumar K >=20 > Signed-off-by: Ciara Power > --- > lib/librte_node/ip4_lookup.c | 13 +++++++++++-- > lib/librte_node/ip4_lookup_neon.h | 2 +- > lib/librte_node/ip4_lookup_sse.h | 2 +- > 3 files changed, 13 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/librte_node/ip4_lookup.c b/lib/librte_node/ip4_lookup.c > index 293c77f39e..b3edbc1f4d 100644 > --- a/lib/librte_node/ip4_lookup.c > +++ b/lib/librte_node/ip4_lookup.c > @@ -34,10 +34,10 @@ static struct ip4_lookup_node_main ip4_lookup_nm; > #include "ip4_lookup_neon.h" > #elif defined(RTE_ARCH_X86) > #include "ip4_lookup_sse.h" > -#else > +#endif >=20 > static uint16_t > -ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node, > +ip4_lookup_node_process_scalar(struct rte_graph *graph, struct rte_node > +*node, > void **objs, uint16_t nb_objs) > { > struct rte_ipv4_hdr *ipv4_hdr; > @@ -109,7 +109,16 @@ ip4_lookup_node_process(struct rte_graph *graph, > struct rte_node *node, > return nb_objs; > } >=20 > +static uint16_t > +ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node, > + void **objs, uint16_t nb_objs) > +{ > +#if defined(RTE_MACHINE_CPUFLAG_NEON) || defined(RTE_ARCH_X86) Machine flags has been removed recently. RTE_MACHINE_CPUFLAG_NEON is replac= ed by __ARM_NEON. Looks like the patch set needs a rebase. > + if (rte_get_max_simd_bitwidth() >=3D RTE_SIMD_128) > + return ip4_lookup_node_process_vec(graph, node, objs, > nb_objs); > #endif > + return ip4_lookup_node_process_scalar(graph, node, objs, > nb_objs); } >=20 > int > rte_node_ip4_route_add(uint32_t ip, uint8_t depth, uint16_t next_hop, di= ff > --git a/lib/librte_node/ip4_lookup_neon.h > b/lib/librte_node/ip4_lookup_neon.h > index 5e5a7d87be..0ad2763b82 100644 > --- a/lib/librte_node/ip4_lookup_neon.h > +++ b/lib/librte_node/ip4_lookup_neon.h > @@ -7,7 +7,7 @@ >=20 > /* ARM64 NEON */ > static uint16_t > -ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node, > +ip4_lookup_node_process_vec(struct rte_graph *graph, struct rte_node > +*node, > void **objs, uint16_t nb_objs) > { > struct rte_mbuf *mbuf0, *mbuf1, *mbuf2, *mbuf3, **pkts; diff --git > a/lib/librte_node/ip4_lookup_sse.h b/lib/librte_node/ip4_lookup_sse.h > index a071cc5919..264c986071 100644 > --- a/lib/librte_node/ip4_lookup_sse.h > +++ b/lib/librte_node/ip4_lookup_sse.h > @@ -7,7 +7,7 @@ >=20 > /* X86 SSE */ > static uint16_t > -ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node, > +ip4_lookup_node_process_vec(struct rte_graph *graph, struct rte_node > +*node, > void **objs, uint16_t nb_objs) > { > struct rte_mbuf *mbuf0, *mbuf1, *mbuf2, *mbuf3, **pkts; > -- > 2.22.0