From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130071.outbound.protection.outlook.com [40.107.13.71]) by dpdk.org (Postfix) with ESMTP id 25BEA1B3B8 for ; Mon, 15 Apr 2019 22:43:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tknhGGuv7PKxBMOUuuvNOX8VqJhjXufTq8GEI1/1a4c=; b=XteY4dyuh4pOkA7e6eFrqhVQXDBd8dnpw2/MPGwtkj7RsRy/iAR4qFcpao0YGpPSFBBRiW6vIsoGQhbpr/tygIM+bF536HwYkt6M0/A4mvgCSVFdqMOTjabFexi1mjgFgUkeTMBqMrU9ToecaW1ZbS+MfQlmPt+U2/oNE+Xtx5E= Received: from AM0PR08MB3379.eurprd08.prod.outlook.com (20.177.109.142) by AM0PR08MB3059.eurprd08.prod.outlook.com (52.134.93.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.19; Mon, 15 Apr 2019 20:43:55 +0000 Received: from AM0PR08MB3379.eurprd08.prod.outlook.com ([fe80::287d:1c71:2689:7bfe]) by AM0PR08MB3379.eurprd08.prod.outlook.com ([fe80::287d:1c71:2689:7bfe%5]) with mapi id 15.20.1792.018; Mon, 15 Apr 2019 20:43:54 +0000 From: Dharmik Thakkar To: "vivkong@ca.ibm.com" CC: "dev@dpdk.org" , nd Thread-Topic: [dpdk-dev] [RFC 08/12] hash: add support for s390x architecture Thread-Index: AQHU7weWrbTwTAv0W0OFZg/XiCNfe6Y9udEA Date: Mon, 15 Apr 2019 20:43:54 +0000 Message-ID: <3B1CE4FA-0C44-4A92-9810-B85EFED4CD89@arm.com> References: <20190409190630.31975-1-vivkong@ca.ibm.com> <20190409190630.31975-9-vivkong@ca.ibm.com> In-Reply-To: <20190409190630.31975-9-vivkong@ca.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Dharmik.Thakkar@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1f193626-5888-4d71-8ce1-08d6c1e31397 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:AM0PR08MB3059; x-ms-traffictypediagnostic: AM0PR08MB3059: nodisclaimer: True x-microsoft-antispam-prvs: x-forefront-prvs: 000800954F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(136003)(396003)(346002)(376002)(189003)(199004)(33656002)(97736004)(8676002)(25786009)(1730700003)(66066001)(81156014)(5640700003)(8936002)(2906002)(105586002)(478600001)(5660300002)(7736002)(305945005)(2351001)(6116002)(3846002)(81166006)(6512007)(36756003)(106356001)(6916009)(6486002)(99286004)(6506007)(102836004)(256004)(14444005)(6246003)(82746002)(53546011)(76176011)(186003)(486006)(2616005)(72206003)(316002)(11346002)(446003)(476003)(83716004)(26005)(54906003)(68736007)(6436002)(71200400001)(71190400001)(14454004)(86362001)(53936002)(4326008)(229853002)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3059; H:AM0PR08MB3379.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: SovODH6lpSlr/c976krrSW6t10pjfgf46rc5Dd3kjHLgpVsRwkmDMLU5AQd1pZ3YtE7hot8b0uXGSoJrD6X2nWOzPpaGFPLe4Qa/37luMxcqt5Go8Q54+4lBS+VSS3PrJjyIidaXKLmhdER9VYuEO2WofQ/QwLudGLWlM8Ppsu1a5EdPDneBryzGEfzvl5cp1MdZGwlGJN/6d3NGqlVhB+qgXMPQwOsLreVGmcxJiAFuFuhsS7MmtugqDik+EUvEDY8VufndJssZIY/3gvgWaYA2EEg+2l10lZskQ9L9Ncd2LiqmXxaHVyt6I+k1DgwPlKyOKayyAeYzfQZucoAV3JAX6TY6JeqVDd9M4VL+GgygV8YEZT8NXNISMSa+HWf2S+iwSPiP5nD77U4FcpM6NiDMZQDnIvRVFIjhbvxG5Os= Content-Type: text/plain; charset="us-ascii" Content-ID: <32656F9E6D421846A763044912BC2527@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f193626-5888-4d71-8ce1-08d6c1e31397 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2019 20:43:54.8518 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3059 Subject: Re: [dpdk-dev] [RFC 08/12] hash: add support for s390x architecture 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: , X-List-Received-Date: Mon, 15 Apr 2019 20:43:56 -0000 Hi, Please find the inline comment. > On Apr 9, 2019, at 2:06 PM, Vivian Kong wrote: >=20 > Add big endian support for s390x architecture. >=20 > Signed-off-by: Vivian Kong > --- > lib/librte_hash/rte_fbk_hash.h | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/lib/librte_hash/rte_fbk_hash.h b/lib/librte_hash/rte_fbk_has= h.h > index c4d6976d2..5e49950a7 100644 > --- a/lib/librte_hash/rte_fbk_hash.h > +++ b/lib/librte_hash/rte_fbk_hash.h > @@ -125,9 +125,16 @@ rte_fbk_hash_add_key_with_bucket(struct rte_fbk_hash= _table *ht, > * corrupted due to race conditions, but it's still possible to > * overwrite entries that have just been made valid. > */ > + #if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > const uint64_t new_entry =3D ((uint64_t)(key) << 32) | > ((uint64_t)(value) << 16) | > 1; /* 1 =3D is_entry bit. */ > + #else > + const uint64_t new_entry =3D > + ((uint64_t)(1) << 48) | /* 1 =3D is_entry bit. */ ((uint64_t)(1) << 56)? > + ((uint64_t)(value) << 32) | > + (uint64_t)(key); > + #endif > uint32_t i; >=20 > for (i =3D 0; i < ht->entries_per_bucket; i++) { > --=20 > 2.17.1 >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 21C33A00E6 for ; Mon, 15 Apr 2019 22:43:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C1D801B3BA; Mon, 15 Apr 2019 22:43:57 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130071.outbound.protection.outlook.com [40.107.13.71]) by dpdk.org (Postfix) with ESMTP id 25BEA1B3B8 for ; Mon, 15 Apr 2019 22:43:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tknhGGuv7PKxBMOUuuvNOX8VqJhjXufTq8GEI1/1a4c=; b=XteY4dyuh4pOkA7e6eFrqhVQXDBd8dnpw2/MPGwtkj7RsRy/iAR4qFcpao0YGpPSFBBRiW6vIsoGQhbpr/tygIM+bF536HwYkt6M0/A4mvgCSVFdqMOTjabFexi1mjgFgUkeTMBqMrU9ToecaW1ZbS+MfQlmPt+U2/oNE+Xtx5E= Received: from AM0PR08MB3379.eurprd08.prod.outlook.com (20.177.109.142) by AM0PR08MB3059.eurprd08.prod.outlook.com (52.134.93.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.19; Mon, 15 Apr 2019 20:43:55 +0000 Received: from AM0PR08MB3379.eurprd08.prod.outlook.com ([fe80::287d:1c71:2689:7bfe]) by AM0PR08MB3379.eurprd08.prod.outlook.com ([fe80::287d:1c71:2689:7bfe%5]) with mapi id 15.20.1792.018; Mon, 15 Apr 2019 20:43:54 +0000 From: Dharmik Thakkar To: "vivkong@ca.ibm.com" CC: "dev@dpdk.org" , nd Thread-Topic: [dpdk-dev] [RFC 08/12] hash: add support for s390x architecture Thread-Index: AQHU7weWrbTwTAv0W0OFZg/XiCNfe6Y9udEA Date: Mon, 15 Apr 2019 20:43:54 +0000 Message-ID: <3B1CE4FA-0C44-4A92-9810-B85EFED4CD89@arm.com> References: <20190409190630.31975-1-vivkong@ca.ibm.com> <20190409190630.31975-9-vivkong@ca.ibm.com> In-Reply-To: <20190409190630.31975-9-vivkong@ca.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Dharmik.Thakkar@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1f193626-5888-4d71-8ce1-08d6c1e31397 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:AM0PR08MB3059; x-ms-traffictypediagnostic: AM0PR08MB3059: nodisclaimer: True x-microsoft-antispam-prvs: x-forefront-prvs: 000800954F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(136003)(396003)(346002)(376002)(189003)(199004)(33656002)(97736004)(8676002)(25786009)(1730700003)(66066001)(81156014)(5640700003)(8936002)(2906002)(105586002)(478600001)(5660300002)(7736002)(305945005)(2351001)(6116002)(3846002)(81166006)(6512007)(36756003)(106356001)(6916009)(6486002)(99286004)(6506007)(102836004)(256004)(14444005)(6246003)(82746002)(53546011)(76176011)(186003)(486006)(2616005)(72206003)(316002)(11346002)(446003)(476003)(83716004)(26005)(54906003)(68736007)(6436002)(71200400001)(71190400001)(14454004)(86362001)(53936002)(4326008)(229853002)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3059; H:AM0PR08MB3379.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: SovODH6lpSlr/c976krrSW6t10pjfgf46rc5Dd3kjHLgpVsRwkmDMLU5AQd1pZ3YtE7hot8b0uXGSoJrD6X2nWOzPpaGFPLe4Qa/37luMxcqt5Go8Q54+4lBS+VSS3PrJjyIidaXKLmhdER9VYuEO2WofQ/QwLudGLWlM8Ppsu1a5EdPDneBryzGEfzvl5cp1MdZGwlGJN/6d3NGqlVhB+qgXMPQwOsLreVGmcxJiAFuFuhsS7MmtugqDik+EUvEDY8VufndJssZIY/3gvgWaYA2EEg+2l10lZskQ9L9Ncd2LiqmXxaHVyt6I+k1DgwPlKyOKayyAeYzfQZucoAV3JAX6TY6JeqVDd9M4VL+GgygV8YEZT8NXNISMSa+HWf2S+iwSPiP5nD77U4FcpM6NiDMZQDnIvRVFIjhbvxG5Os= Content-Type: text/plain; charset="UTF-8" Content-ID: <32656F9E6D421846A763044912BC2527@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f193626-5888-4d71-8ce1-08d6c1e31397 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2019 20:43:54.8518 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3059 Subject: Re: [dpdk-dev] [RFC 08/12] hash: add support for s390x architecture 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" Message-ID: <20190415204354.L5jFEyudUVI9zOPllBMN427YOHsuPX08YCQ3ygdHcRg@z> Hi, Please find the inline comment. > On Apr 9, 2019, at 2:06 PM, Vivian Kong wrote: >=20 > Add big endian support for s390x architecture. >=20 > Signed-off-by: Vivian Kong > --- > lib/librte_hash/rte_fbk_hash.h | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/lib/librte_hash/rte_fbk_hash.h b/lib/librte_hash/rte_fbk_has= h.h > index c4d6976d2..5e49950a7 100644 > --- a/lib/librte_hash/rte_fbk_hash.h > +++ b/lib/librte_hash/rte_fbk_hash.h > @@ -125,9 +125,16 @@ rte_fbk_hash_add_key_with_bucket(struct rte_fbk_hash= _table *ht, > * corrupted due to race conditions, but it's still possible to > * overwrite entries that have just been made valid. > */ > + #if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > const uint64_t new_entry =3D ((uint64_t)(key) << 32) | > ((uint64_t)(value) << 16) | > 1; /* 1 =3D is_entry bit. */ > + #else > + const uint64_t new_entry =3D > + ((uint64_t)(1) << 48) | /* 1 =3D is_entry bit. */ ((uint64_t)(1) << 56)? > + ((uint64_t)(value) << 32) | > + (uint64_t)(key); > + #endif > uint32_t i; >=20 > for (i =3D 0; i < ht->entries_per_bucket; i++) { > --=20 > 2.17.1 >=20