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 0F7C1A0679 for ; Thu, 28 Mar 2019 20:27:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0C6512C55; Thu, 28 Mar 2019 20:27:24 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-eopbgr790113.outbound.protection.outlook.com [40.107.79.113]) by dpdk.org (Postfix) with ESMTP id 550AC1DB8 for ; Thu, 28 Mar 2019 20:27:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pFpIYd1IoBqiUdvp1hfOJ0UqjDOyEV7ynV187UxJ9Bc=; b=aE7KIr9xqDhPfH5jKrq0sP5ryTMriTJ9Qcfhg0aoBb0UEkg75P9r0Jv9rZh2JKUkHPDThZQyd0yyxCgm47Fm+4ggC2aRdYJpYoUV+qxuZGaFh7Cz6z7qCWYc7t4ifSiDGoGsxtz4+2CQCMVszod4ybGAFxe5tkXjZmQA2/+g+uk= ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=ilgOR1spf6R3Uzp2DPpMOKpsLvmQjbtUgPYjwPRHIcm7MuAHLpEUCBqGyZRRT2uUQwa1pByThd2aSbWc4VL73KIRxgVfWnSkgYiBBvHZOua8imrKVfDhwuBzrrRIPCzAXUK6mo5I8i9qfKgxXOaVakuNvuR6hqQeFbSEG/2DXtA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pFpIYd1IoBqiUdvp1hfOJ0UqjDOyEV7ynV187UxJ9Bc=; b=S9u0xoWyLrKzB2RlJ1/7xZlhqfC9S8BYZBbW9dJZbKBQlvbp/Fl0pLI/Otvew5B8vtNB++zc7adxiRaMOSAR26yLfMTrY7W4d0R0crWaRz13t4SWQdJP9R+4p4wdj5fawwH0tgmAD9jLPI8LbjXK/OL8K/vkwM83uNXfX5/oo4M= ARC-Authentication-Results: =?us-ascii?Q?i=3D1; _test.office365.com_1; =0D=0A=09=09dmarc=3Dnone_action?= =?us-ascii?Q?=3Dnone_header.from=3Dmicrosoft.com;=0D=0A=09=09arc=3Dnone?= Received: from MWHPR21MB0638.namprd21.prod.outlook.com (10.175.141.139) by MWHPR21MB0768.namprd21.prod.outlook.com (10.173.51.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1771.2; Thu, 28 Mar 2019 19:27:20 +0000 Received: from MWHPR21MB0638.namprd21.prod.outlook.com ([fe80::c4e7:ece1:887e:b983]) by MWHPR21MB0638.namprd21.prod.outlook.com ([fe80::c4e7:ece1:887e:b983%3]) with mapi id 15.20.1771.002; Thu, 28 Mar 2019 19:27:20 +0000 From: Harini Ramakrishnan To: Anand Rawat , "dev@dpdk.org" CC: "pallavi.kadam@intel.com" , "ranjit.menon@intel.com" , "jeffrey.b.shaw@intel.com" , "bruce.richardson@intel.com" , "thomas@monjalon.net" Thread-Topic: [dpdk-dev] [PATCH v6 2/8] eal: add header files to support os specifics Thread-Index: AQHU5QzwjnAbOPsKqkOBXfp567n4EaYhbj3A Date: Thu, 28 Mar 2019 19:27:20 +0000 Message-ID: References: <20190306041634.12976-1-anand.rawat@intel.com> <20190328022115.4660-1-anand.rawat@intel.com> <20190328022115.4660-3-anand.rawat@intel.com> In-Reply-To: <20190328022115.4660-3-anand.rawat@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=haramakr@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2019-03-28T19:27:18.7422568Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=3549519f-ee3f-4174-9507-4720dd2857c9; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic x-originating-ip: [2001:4898:80e8:a:84e2:1334:627:d48e] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2d894ac2-6a64-4ce4-5b1f-08d6b3b365c7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:MWHPR21MB0768; x-ms-traffictypediagnostic: MWHPR21MB0768: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Harini.Ramakrishnan@microsoft.com; x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:826; x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(366004)(136003)(396003)(39860400002)(376002)(189003)(199004)(13464003)(6116002)(186003)(25786009)(102836004)(6506007)(256004)(8936002)(68736007)(105586002)(53546011)(4326008)(71190400001)(99286004)(486006)(2906002)(71200400001)(476003)(81166006)(11346002)(446003)(74316002)(46003)(9686003)(33656002)(305945005)(7736002)(22452003)(10090500001)(86612001)(54906003)(110136005)(8990500004)(55016002)(316002)(2501003)(81156014)(53936002)(76176011)(7696005)(6436002)(5660300002)(52536014)(10290500003)(72206003)(14454004)(97736004)(229853002)(106356001)(6246003)(86362001)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR21MB0768; H:MWHPR21MB0638.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: pjUo6C+pJZHJZGylBwhv0EGHhEXo91t7P/BsPDKyqnCJ3E+xjltxe+N7CymRIqaINvRY9NMDyjNrK8w23Y4MVxPlB12Q/WhvbfomZR2XBNLiHhAAzgQO5CCNyBcdzjOoEbs3ljqeEoAiI6R5V6LZuBCqbRp44p8zwSTQBVhIq2DTpogO0lUzgiNR8k13JmIsykNjFQ0kzY31oCy7S/DwyQLHPrzNXsQd69YXFziv2Q5suNCb9oeFjJqM+iPmxkzPy4MivJ/RfoJtJhO15kUOyGJ4y1VNUUwMn5sGGFyTyS411dpGI8fIrgl00BDDlQsj8lIbHh71chn4CTTo+TdmIg2xmN194LE1wFlCS7RIX5SVBNj6cSsvNBjqVMc6rANj3VGao+70zuCfiL/GG/Ats7+FZfVlK0NhR6O6AulbQr0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d894ac2-6a64-4ce4-5b1f-08d6b3b365c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2019 19:27:20.6844 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0768 Subject: Re: [dpdk-dev] [PATCH v6 2/8] eal: add header files to support os specifics 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: <20190328192720._Hja216VUXcfx4R_47h1eoUf-BuCWn8xBBO-zOV6mpo@z> Acked-by: Harini Ramakrishnan -----Original Message----- From: dev On Behalf Of Anand Rawat Sent: Wednesday, March 27, 2019 7:21 PM To: dev@dpdk.org Cc: anand.rawat@intel.com; pallavi.kadam@intel.com; ranjit.menon@intel.com;= jeffrey.b.shaw@intel.com; bruce.richardson@intel.com; thomas@monjalon.net Subject: [dpdk-dev] [PATCH v6 2/8] eal: add header files to support os spec= ifics Added rte_os.h files to support os specific functionality. Updated rte_common.h to include rte_os.h. Updated lib/meson.build to inject= rte_os.h in every library. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- lib/librte_eal/common/include/rte_common.h | 5 +++- .../common/include/rte_string_fns.h | 4 ++- .../freebsd/eal/include/exec-env/rte_os.h | 10 +++++++ .../linux/eal/include/exec-env/rte_os.h | 8 +++++ .../windows/eal/include/exec-env/rte_os.h | 30 +++++++++++++++++++ lib/meson.build | 7 ++++- 6 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 lib/= librte_eal/freebsd/eal/include/exec-env/rte_os.h create mode 100644 lib/librte_eal/linux/eal/include/exec-env/rte_os.h create mode 100644 lib/librte_eal/windows/eal/include/exec-env/rte_os.h diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/co= mmon/include/rte_common.h index bcf8afd39..3e4768f4a 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2010-2014 Intel Corporation + * Copyright(c) 2010-2019 Intel Corporation */ =20 #ifndef _RTE_COMMON_H_ @@ -24,6 +24,9 @@ extern "C" { =20 #include =20 +/* os specific include */ +#include + #ifndef typeof #define typeof __typeof__ #endif diff --git a/lib/librte_eal/common/include/rte_string_fns.h b/lib/librte_ea= l/common/include/rte_string_fns.h index 85bfe6c9a..8bac8243c 100644 --- a/lib/librte_eal/common/include/rte_string_fns.h +++ b/lib/librte_eal/common/include/rte_string_fns.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2010-2014 Intel Corporation + * Copyright(c) 2010-2019 Intel Corporation */ =20 /** @@ -18,6 +18,8 @@ extern "C" { #include #include =20 +#include + /** * Takes string "string" parameter and splits it at character "delim" * up to maxtokens-1 times - to give "maxtokens" resulting tokens. Like di= ff --git a/lib/librte_eal/freebsd/eal/include/exec-env/rte_os.h b/lib/librt= e_eal/freebsd/eal/include/exec-env/rte_os.h new file mode 100644 index 000000000..bda0c2d92 --- /dev/null +++ b/lib/librte_eal/freebsd/eal/include/exec-env/rte_os.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +/* stub file for os specific logic */ + +#endif /* _RTE_OS_H_ */ diff --git a/lib/librte_eal/linux/eal/include/exec-env/rte_os.h b/lib/librt= e_eal/linux/eal/include/exec-env/rte_os.h new file mode 100644 index 000000000..c43ec6da5 --- /dev/null +++ b/lib/librte_eal/linux/eal/include/exec-env/rte_os.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +#endif /* _RTE_OS_H_ */ diff --git a/lib/librte_eal/windows/eal/include/exec-env/rte_os.h b/lib/lib= rte_eal/windows/eal/include/exec-env/rte_os.h new file mode 100644 index 000000000..65230cae9 --- /dev/null +++ b/lib/librte_eal/windows/eal/include/exec-env/rte_os.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* macro substitution for windows supported strerror_r */ #define=20 +strerror_r(a, b, c) strerror_s(b, c, a) + +/* macro substitution for windows supported strdup */ +#define strdup(str) _strdup(str) + +/* macro substitution for windows supported ssize_t type */ typedef=20 +SSIZE_T ssize_t; + +/* macro substitution for windows supported strtok_r */ #define=20 +strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr) + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_OS_H_ */ diff --git a/lib/meson.build b/lib/meson.build index 99957ba7d..a81faf0ed 1= 00644 --- a/lib/meson.build +++ b/lib/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corpora= tion +# Copyright(c) 2017-2019 Intel Corporation =20 =20 # process all libraries equally, as far as possible @@ -64,6 +64,11 @@ for= each l:libraries dir_name =3D 'librte_' + l subdir(dir_name) =20 + if host_machine.system() =3D=3D 'windows' + # injecting rte_os.h in every library in windows + includes +=3D include_directories('librte_eal/windows/eal/include/exec-e= nv') + endif + if build enabled_libs +=3D name dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1) -- 2.17.1.windows.2