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 00B82A0544 for ; Fri, 11 Nov 2022 14:52:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 780C24014F; Fri, 11 Nov 2022 14:52:08 +0100 (CET) Received: from mail-proxy2.massresponse.com (mail-proxy2.massresponse.com [193.9.253.221]) by mails.dpdk.org (Postfix) with ESMTP id E00E840141 for ; Fri, 11 Nov 2022 14:52:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail-proxy2.massresponse.com (Postfix) with ESMTP id 47EC02098F; Fri, 11 Nov 2022 14:52:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spusu.at; s=mail; t=1668174727; bh=la/u0wRBx5jh81qQsHBFHiLIHacsjosThEuNb1kTw1U=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=Q8A3f1sjT5FHLu3IgMVbgPh06g46Q2xAHLm+W9Ac/PZU17a8Zt0Dv5ArkcLBej83H +Nr5hwqAd/QJGHcCGlnBNeKS+6TCqRJop3xb6ZPr0z82EIgepF1CHZFwNVd9loAQ+u dRS9bfss7cLLNHpr6npsqEzI5ihMMfE142JVfpRY= X-Virus-Scanned: Debian amavisd-new at mail-proxy2.massresponse.com X-Spam-Flag: NO X-Spam-Score: -0.951 X-Spam-Level: X-Spam-Status: No, score=-0.951 tagged_above=-9999 required=4 tests=[AWL=0.049, BAYES_00=-1, RCVD_IN_DNSWL_HI=-0.1, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, querysenderbaseorg=0.1] autolearn=ham autolearn_force=no X-Spam-Languages: en Received: from mail-proxy2.massresponse.com ([193.9.253.221]) by localhost (wepmail1.mip.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cRCRiMsuV9si; Fri, 11 Nov 2022 14:51:49 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2056.outbound.protection.outlook.com [104.47.13.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-proxy2.massresponse.com (Postfix) with ESMTPS id 456F220AC5; Fri, 11 Nov 2022 14:51:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VY+pT4AmgKyZrQaMOqb60QZZswdC5FhfOi1XNFldafpFZIjiofd5yz4Cwinb5v23/Utanp2HMW407vEZdh3tCmv6sZ2lu5uHCJ8hGcsAg7l6a1mz78u+iUYW5C2p9d9zJIeM3+eYtv30w7VDF608faetGWseMesswABbOovlfJ8H2uAFogvXXlqMTyFb9AVfJSd1KODHe8O0gGqBDsCsopoLoJL8InzfjuGv3/66zeuJMGYRaaeNJ1vNcFfNGVbqRswJkpFjdaKnG+JFrygpuOCRRIJTxGQzfSDh+XaufFnPiBKKpfCx68+tYgoV4hUqTZUPYHUMxB904pX2uM1e+A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=raspT9bJ3ZrvlMyo3Ct5qyW0wEba34arGsqitVdIbh8=; b=ixkHkUy7DhnldZIrHoLNNjDzGDKf+NuQt+WAqm+Bds2YkKfRhp+Yv6UXiX2wTNXEowjJ2SfVRS1q8uN4S2iyoQRQKoBIuZCTQIsXLs8P0rznvvi6s9o19h6js6MjcbmumuXyqCBPTfgOQZbu88qZOLnDYlw1kR4n3uz1mxTqTqQSGmyad13glRDk6zHFDwSlIf6jcBeNep/d0SLQFNQf8qE/SQSrkjOcKDWrgpIz+m0WbR7AFv5xel2FKBTy+Di2apGd0rB/WeVH2aQHIf4T4obguiFl1DvygNJvGur4kPj5+EFEe2Fhds+rl7p1Gymzv66HrJ2hwL37MDoZEY5nTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=spusu.at; dmarc=pass action=none header.from=spusu.at; dkim=pass header.d=spusu.at; arc=none Received: from PAXP190MB1741.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:28a::22) by AS8P190MB1984.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:52c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Fri, 11 Nov 2022 13:51:47 +0000 Received: from PAXP190MB1741.EURP190.PROD.OUTLOOK.COM ([fe80::b8ef:564c:bd44:770b]) by PAXP190MB1741.EURP190.PROD.OUTLOOK.COM ([fe80::b8ef:564c:bd44:770b%8]) with mapi id 15.20.5813.013; Fri, 11 Nov 2022 13:51:45 +0000 From: Robert Hable To: Dmitry Kozlyuk CC: "users@dpdk.org" Subject: AW: rte_eth_dev_count_avail returns different value in library Thread-Topic: rte_eth_dev_count_avail returns different value in library Thread-Index: AdjqsT8t0rmZJCGcQYi54+pH7mlI9QACYTIAAsNUhnA= Date: Fri, 11 Nov 2022 13:51:45 +0000 Message-ID: References: <20221028134808.78435c9d@sovereign> In-Reply-To: <20221028134808.78435c9d@sovereign> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=spusu.at; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAXP190MB1741:EE_|AS8P190MB1984:EE_ x-ms-office365-filtering-correlation-id: fddd811b-38a8-4c7b-016d-08dac3ebdf52 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Z5Moq+N4rEIeGIiU7c152OgVvbekA4WUWIkztA/LDJGbJ5C/1+l5P1qArLonUHcqqm9GrOdSqcFchFYK9kPcsou6Oi5NL5MKkpVstCfhHAItEQHq2niR2GmaEv7rNHk6suoF/Iz4uzFnD6Rhk783vQfhQnKO1xejIHdFZ9UTtg6270HBYTF0cME+Mm/x6Tu8WsOdyx3hXIVcIvrspAhP752KkpVAQ+2W2+rDePLv+2use27g/LApB3gh8jcimRukY6ELA2/tJH1NUlwu8eEFcseaiizv05DFZKwCK1CoJDD860SWmSRB9GLEGvYlOR49S+BPp9JWuApY3j02rEIwGsC8Tt2laCpSURhY0A2OrCgxEupW1rEgn2ZUpT7ke1nBRKncQNuqT5Gb5MEU+mkWkk1vjl6yKGA87GkR2yKqMNaELYvZmKUjn29DYu5H9N5eAIssk5IiSvOPbRpwQYvvNRlpCU1h75G7/nPI1OyK/bqkmPH/1I7iZwMFlAyBhBWM/cLZtfaZeC4GHo2rGMWd/VbaxFRAYwObIfkjfxYHFZTyJg82xZAtp9w1OyZY35DqbK/belQqB5XnrkANvx/CNdt9rrztc2CjvXTxVKuuon3UYLy4rztMFCIXICGUUwARMTHmYCJAGFcj+4sjDI1CdEli9YscpuLZTw15sHntKrFlrtybXxdVx21gkmpvd4kywmYR2tLiP7lRz+4UBw4rYH5xA2Otqz0T98mXMvbytRkO+Ns9hSB/RT//HfTOlUklm6bTRJk/eMDL/o1rWkopwg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXP190MB1741.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(396003)(39850400004)(376002)(346002)(136003)(451199015)(2906002)(4001150100001)(41300700001)(33656002)(66476007)(76116006)(66446008)(66556008)(83380400001)(64756008)(66946007)(4326008)(38100700002)(8676002)(86362001)(52536014)(8936002)(316002)(5660300002)(26005)(9686003)(71200400001)(38070700005)(7696005)(6506007)(6916009)(186003)(122000001)(478600001)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?rNdIYEnDzGpmiBtZH0cwhpmvNH8D1pdluL98YFxQZlx5fx6MFvYKrjQuzX?= =?iso-8859-1?Q?Kg5jS/qKG59IJxZpxJkw5pI28FsCIoOk3EaFYGb9WVHRPlPwS2tmIdEbNv?= =?iso-8859-1?Q?iGzFD+/nPMCv3dWJCf88MXQCuftcVzDFyXM2lIsRMN4r2DG2UZ5tng3FYf?= =?iso-8859-1?Q?seksHPQFWYYD47HBnOXI/5DowpIJXlVaTDoJ/lHO9pYoeGfAaX4MTysGar?= =?iso-8859-1?Q?AhINTpvrPl4ANBeomUtwKu9eYe4Cf4/LrajjTAWFPuqyQkDvHt7iggSr42?= =?iso-8859-1?Q?1zeXvGzpFJ+jXDBT+vmaq++Shhgj97B35dtJ0tUVvTZiQE7y7zHsEEDd+m?= =?iso-8859-1?Q?Y898xXtyqsyw22SSCK7e0r3ToRIUvoDXyvLhGCpX6hPbzyNqa8P64BdaWJ?= =?iso-8859-1?Q?urqqSElvhtTBO/hqjVQXd3I3mj2phIggHMOth17JW7ctmLUkjcUE13whZ7?= =?iso-8859-1?Q?WkVqBCoee9awfSNPEX1Gh3NlvGWy83Fjrj3+0HDx7oi4ZwQiKm9tKoDzK4?= =?iso-8859-1?Q?ZOQqglT5uD7pEkySO+m5UhAuKKLr2L8//qHK/SYRETwyxDOlept9byUSPl?= =?iso-8859-1?Q?mdP1NuXsrFaBXcf4c1mQELiLzo9y5QqA9SK4iP8WrdcTZ6bPUsUPaVdq2q?= =?iso-8859-1?Q?CHS4dgl169OD5hkEbcmKukvztsaw5kC0cJam8nnMcuCt9L5W8rsiIgTlJQ?= =?iso-8859-1?Q?HS/S4eNiUkyojoE75AG7wVKs7UHjLY7NGld4MEl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Q?CC6i2xTv36tHpJ/3riulZkTNRxeDMrZcAT?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: spusu.at X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXP190MB1741.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: fddd811b-38a8-4c7b-016d-08dac3ebdf52 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2022 13:51:45.7146 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 287dd7f9-0481-43c3-b6cf-51c237c0cab4 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EuDkaEy+/SbKPioqnOadyJd45spfuO1rBElP2gcM0XH5IXjIf+ONkdZaW3swTSGUExr9LTqVDjcYK6iEwpaelQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P190MB1984 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Hello Dimitry, Yes, I am building DPDK as static library. As far as I have seen it should = also be the default option on windows builds? I tried linking the following libraries to my application, which is using m= y own dpdk-library, but I had no success in using any dpdk functionality (r= te_eth_dev_count_avail() returns 0). In the linker output I found out that the libraries are currently unused: 1>Unused libraries: 1> C:\Dev\Extern\dpdk\build\lib\librte_eal.a 1> C:\Dev\Extern\dpdk\build\lib\librte_mbuf.a 1> C:\Dev\Extern\dpdk\build\lib\librte_mempool.a 1> C:\Dev\Extern\dpdk\build\lib\librte_ethdev.a 1> C:\Dev\Extern\dpdk\build\drivers\librte_common_mlx5.a 1> C:\Dev\Extern\dpdk\build\drivers\librte_net_mlx5.a Do you have any other ideas what I am missing there and why they are not li= nked to it? Is it may be possible to include all the PMD libraries already = in my own library, so I only need to link against one library? Yes, rte_eth_dev_count_avail() is called directly after rte_eal_init(). By the way I am using the visual studio 2022 compiler to build my own appli= cation and clang for compiling dpdk if that matters. Kind regards, Robert -----Urspr=FCngliche Nachricht----- Von: Dmitry Kozlyuk =20 Gesendet: Freitag, 28. Oktober 2022 12:48 An: Robert Hable Cc: users@dpdk.org Betreff: Re: rte_eth_dev_count_avail returns different value in library 2022-10-28 09:45 (UTC+0000), Robert Hable: > Hello, >=20 > I am trying to build a static library based on the skeleton example. My p= roblem is when calling rte_eth_dev_count_avail() I always receive 0 in the = static library. When I start the skeleton example app as a regular exe file= , then it returns 2. > What could be the reason that rte_eth_dev_count_avail() returns different= values depending on if it is an exe application or a static library? >=20 > rte_eal_init() is called in both applications with the default parameters= . > Both processes are running under the same administrator user. >=20 > I am using Windows Server 2022 with a Mellanox ConnectX-4 on DPDK V 22.11= .0-rc0. >=20 > Kind regards, > Robert Hable >=20 Hi Robert, Are you building DPDK as static libraries? Shared build is currently non-functional on Windows. If so, are you linking PMD libraries (librte_common_mlx5, librte_net_mlx5) = to the application that is using your static library? If relevant PMD libraries are not linked, HW will not be discovered (same f= or mempools BTW). It is irrelevant from where rte_eth_dev_count_avail() is called, but please= check that in both cases it is done after rte_eal_init().