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 84EB6A053A; Tue, 4 Aug 2020 08:05:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFBD229D2; Tue, 4 Aug 2020 08:05:51 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60059.outbound.protection.outlook.com [40.107.6.59]) by dpdk.org (Postfix) with ESMTP id D00D9F04 for ; Tue, 4 Aug 2020 08:05:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nbsICDdkdNyRKjttO47II+s4Xb3JQfyH57N5XjLHmsqWUGGpIK+LQYMITTOh+kOzTxU4AvAdSM0aU+uLkVYkVxE81nETK9Z2QXiF84RDSQtAD8h9GMmTAwZ3/4G6g/JwR2fdhKWearsAKK/GE/2hAMcIWGBo3yct99rxPdaMLp+JOR+H5YuJagozIKY3WKbC9vD+Dij9d7Yj93Xzkw5S2nJoK63264Ei2bGpY0EkgWxiEyHlTwsvIrST60CNbs/RZav+D1tWMFYVcUJ1kYz6qKSLaqN9OFOmW0GpL+M8tAbTGdPocqLzbHPFzoCPzOAVkDHV8ZWmRJJNRmfi5KO77w== 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=XKC0hmDrN+pMu8Gk+gqpwW40NYqT0wnp0jRZyDdrT68=; b=XFg8NM1zkNhnQnw/DYcpIYfXhGuPfpyuxFNJRPRXdGRi4rgBO3M2G86uhFhWw90syAKyFdluA5K6PoleekbnDnsbVEiPxZeJ3TGsPx7Nb+0x5J9P6R7SNMeUxHb4hjo8dRtsiSy2DB+9I8a9ycFEC9IZYXHVH70wMjoBQ2sAU7a4p3ONGtT/f3u7owNSDlS90xPZYb+ZnIRybwwXNJwaFKLWO0bP3NXfi72QrNOFHNQ1JN91CfwJ4IaewlZkGuAc4jeW1yT7JCxXNgKrd3ry9nYhJ5zk2j67JfTbO60pKPAMLkBwQNeQS3JRReV5TZxlgCee9P/3xhsR9ieCQdmVEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XKC0hmDrN+pMu8Gk+gqpwW40NYqT0wnp0jRZyDdrT68=; b=KM7OFWO+Ph8hCzfI6F4OyWrVw6QklRD/nd+MDXjNd/27XIOKIWO5i+N1+qnOclVYzpVAc9yAfEAW+bCaJLsbYc8eC3v7zzGMQqF1rK+S7c6FQ5dRRgMWraNZgNKDNaAM5zsByrCoY3x8R+72nGXhUb9iqUbXDEdq35GoddiKP+8= Received: from VI1PR05MB5872.eurprd05.prod.outlook.com (2603:10a6:803:de::17) by VI1PR05MB3199.eurprd05.prod.outlook.com (2603:10a6:802:17::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Tue, 4 Aug 2020 06:05:49 +0000 Received: from VI1PR05MB5872.eurprd05.prod.outlook.com ([fe80::ec95:ae9e:77c8:63ae]) by VI1PR05MB5872.eurprd05.prod.outlook.com ([fe80::ec95:ae9e:77c8:63ae%6]) with mapi id 15.20.3239.022; Tue, 4 Aug 2020 06:05:49 +0000 From: Fady Bader To: Narcisa Ana Maria Vasile CC: "dev@dpdk.org" , Thomas Monjalon , Tasnim Bashar , Tal Shnaiderman , Yohad Tor , "dmitry.kozliuk@gmail.com" , "harini.ramakrishnan@microsoft.com" , "ocardona@microsoft.com" , "pallavi.kadam@intel.com" , "ranjit.menon@intel.com" , "kevin.laatz@intel.com" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "ciara.power@intel.com" Thread-Topic: [PATCH v3 4/5] telemetry: implement empty stubs for Windows Thread-Index: AQHWaf5W7j0lfvlHzEm5sqt+SiavKKkndmKw Date: Tue, 4 Aug 2020 06:05:48 +0000 Message-ID: References: <20200625133038.25180-1-fady@mellanox.com> <20200803103843.6928-1-fady@mellanox.com> <20200803103843.6928-5-fady@mellanox.com> <20200804012650.GA127568@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20200804012650.GA127568@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [109.64.57.88] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3e28fdd6-8b12-4367-04fa-08d8383c6f77 x-ms-traffictypediagnostic: VI1PR05MB3199: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LgM1I/NAI0f2RBxaSVbe2dt3YzBzDhHqapQu5bpv+rSgUr6rWP4ggJICEFviVv6LgyuymrU42kYTX/JKxoudkriS4p20EdvowRvasJzoAaUDbbbyTpBnnL9VFX2q1JBbc1dODCJRLQSVMS5ALljBF0OPDGmnSmiMx5LASXMnqo1kjrMLRXZ/7nHNGChjZ2jxNKwgIUPujO5CtQu7lsom2GEOyYFqP6I8of5aIeVlTLkSsBE57055PX0GG3oGVfg9tpdgmVYmojtDvJYI1n2uDHSHekRU/jW5VSYJRAiRsOepIC84wUnigh3aqkJfg2Odk65TzuE7HkRipox2L8QuMQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5872.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(136003)(366004)(376002)(39860400002)(346002)(7416002)(52536014)(316002)(86362001)(508600001)(66446008)(76116006)(64756008)(33656002)(6916009)(66476007)(5660300002)(8936002)(54906003)(66946007)(66556008)(83380400001)(4326008)(26005)(6506007)(8676002)(55016002)(7696005)(71200400001)(45080400002)(9686003)(186003)(53546011)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 4myhA/N3ls9lrwuTHLkpyerqrBBIJPj65cQu6DcuWI0W3b/E0yFCoMzfi4GJ8o1FsWYoTbd7IjePFMolr0bIUShIanq+4J+XZ8LRgHZ8dZdAk2ady+gtU2n3PR+e2BB38x012kEnj65Ej6Jo0h6r7w9FewL2aesd0XyP39XpviEvTTsEI/ZoRmWaQppBYZ2rkUV5iMHheTm6idrOQsdlH001dLZT/hc9rU5oAq6NmcwnIhCtk9ypJgonlmBR23nZeHFpFtEZvJkLBAbAlt5XXSH4HcsOfsThRSnEbwBEvLY5zM9nhtjjsTpDySny9loRG7uGVr2gcmb3dwllmUvOb/w7vHGJheUyZIeDGHECKd3J0wUgT9Mon56kEF/nIWW4BAJAzj3JQNs5r4/cZmZoDVMrbDIsK98DVDIDm9/BY4TOE4JrePR6Rd2pIAe+gkG2HoPfyROYrOXKqox8VPp4p43VgCsJ/ttR6L8UOdr541s2pLpeU4SJLlWwWmDK5NhlMLVaQQh1i0l9bCYQTp1ETa0YnxOnO0JD4LqwWWohAdV4kEeVZy4hosjjMrgkXcMLWloUSMJ3z0g1dLjc/nxVs1al95zQaLs0GGk8Kh+A8ObvhaEGAC4V4sMLOPGE/nUjcIBfdf0qDtx8IqGVEHXNpw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR05MB5872.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e28fdd6-8b12-4367-04fa-08d8383c6f77 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2020 06:05:49.0020 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: gDD5QBB2hgFw+BiIHzO4BkPlJa4ighpCRoSJevxUdPeQrlLFE05YDH4ZHciNRa9B3bKwSJnCPr/csGw9MbyfTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3199 Subject: Re: [dpdk-dev] [PATCH v3 4/5] telemetry: implement empty stubs for Windows 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: Narcisa Ana Maria Vasile > Sent: Tuesday, August 4, 2020 4:27 AM > To: Fady Bader > Cc: dev@dpdk.org; Thomas Monjalon ; Tasnim Bashar > ; Tal Shnaiderman ; Yohad Tor > ; dmitry.kozliuk@gmail.com; > harini.ramakrishnan@microsoft.com; ocardona@microsoft.com; > pallavi.kadam@intel.com; ranjit.menon@intel.com; kevin.laatz@intel.com; > ferruh.yigit@intel.com; arybchenko@solarflare.com; ciara.power@intel.com > Subject: Re: [PATCH v3 4/5] telemetry: implement empty stubs for Windows >=20 > On Mon, Aug 03, 2020 at 01:38:42PM +0300, Fady Bader wrote: > > Telemetry didn't compile under Windows. > > Empty stubs implementation was added for Windows. > > > > Signed-off-by: Fady Bader > > --- > > lib/librte_telemetry/rte_telemetry.h | 4 +++ > > lib/librte_telemetry/telemetry.c | 52 > ++++++++++++++++++++++++++++++++- > > lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++- > > 3 files changed, 80 insertions(+), 2 deletions(-) > > > > + > > +#ifndef RTE_EXEC_ENV_WINDOWS > > /* list of command callbacks, with one command registered by default > > */ static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS]; > > static int num_callbacks; /* How many commands are registered */ > > /* Used when accessing or modifying list of command callbacks */ > > static rte_spinlock_t callback_sl =3D RTE_SPINLOCK_INITIALIZER; static > > uint16_t v2_clients; > > +int > Remove 'int' >=20 OK. > > +#endif > > > > int > > rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const > > char *help) { > > +#ifndef RTE_EXEC_ENV_WINDOWS > > + > > int i =3D 0; > > > > if (strlen(cmd) >=3D MAX_CMD_LEN || fn =3D=3D NULL || cmd[0] !=3D '/' > > @@ -76,8 +98,19 @@ rte_telemetry_register_cmd(const char *cmd, > telemetry_cb fn, const char *help) > > rte_spinlock_unlock(&callback_sl); > > > > return 0; > > + > > +#else > > + > > + RTE_SET_USED(cmd); > > + RTE_SET_USED(fn); > > + RTE_SET_USED(help); > > + > > + return 0; > > + > > +#endif > Maybe add a comment like /* RTE_EXEC_ENV_WINDOWS */ next to each > #else/#endif, to be easier to follow what's being guarded out. Your guard= s are > rather small, so it's easy to follow, but sometimes when big chunks of co= de are > being guarded, it's harder to tell what the guard was for (e.g. line 446 = it's the end > of a big #ifdef/#endif). Ok, I'll send a new patch soon. > > } > > > > +#ifndef RTE_EXEC_ENV_WINDOWS