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 1079EA0544 for ; Thu, 17 Nov 2022 10:17:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDB2E40DDC; Thu, 17 Nov 2022 10:17:33 +0100 (CET) Received: from mail-proxy2.massresponse.com (mail-proxy2.massresponse.com [193.9.253.221]) by mails.dpdk.org (Postfix) with ESMTP id 73F6040DDA for ; Thu, 17 Nov 2022 10:17:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail-proxy2.massresponse.com (Postfix) with ESMTP id E860B20B32; Thu, 17 Nov 2022 10:17:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spusu.at; s=mail; t=1668676652; bh=0AdJh8QFoCmLqwLZJYI/RH/SoRxf+CpL4i+K57WZpx8=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=ecB3O54CJNEy0Wj9MGP6qIp4j3VXW8Z2xkVcQPj+M1NlYVnYg44HghYksbtL1AmSy kWrye3Se5mYDyBcEhijcDiqbJvpnI+TjKUBtUVKUuGjU00WFJ45ihUMVzfuEUfH2ew y+ZAh0UU8hCCEAq1yoC+DppFW6rzOi6fVD56QObE= X-Virus-Scanned: Debian amavisd-new at mail-proxy2.massresponse.com X-Spam-Flag: NO X-Spam-Score: -0.949 X-Spam-Level: X-Spam-Status: No, score=-0.949 tagged_above=-9999 required=4 tests=[AWL=-0.050, BAYES_00=-1, RCVD_IN_DNSWL_BLOCKED=0.001, 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=no 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 bQjUuvgp7So4; Thu, 17 Nov 2022 10:17:13 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2104.outbound.protection.outlook.com [104.47.17.104]) (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 741AE20C1E; Thu, 17 Nov 2022 10:17:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M0qaDBy9QKFWzHcYMQHIuEr4eptBc3+lReYs73ymMihEHrGHqZogph+H+SBy8OkYovq46U80wKjY65yf54efN489/2AhX6fkqqPROuCDC2YOpOcnCivB252+IYsHdD/3C8YlZAr6YZACI7RImd0Sp3gIZF1oifCDsknF+8OwZgZY+sJCdVRJmg9cv9Lr0OCmFfNX5cR/k/RuYAlhgstBSbx9kEhpEY1lwTqTxxj9rGk9JCTvXBE0Tg/2eV/xzKEeOZrZ7uyV8guvcoVqn2uNIgbXomYf9TjRnMGXAB07k1zA4rE9WXvQwvt4bFlzf47VpWY4feHi5ZpT5WMKyRbt4w== 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=453gKmyPV/dKMM0pJwdonBVnfDpS36nqAP8oTkD7Eeg=; b=JlpwrdZw+zsXHTKOcp6NBzEo5x1SUZ2DryDI6QfyZXwQNB6vj8m22+XjAA0Mv+57vJojDcmEwCOuquAyBM/omIxh8ycv11C1Kbnau9jA/Mt+/BOfblyKPT+qqAnV4BXdHfYkJYLTHIVhVwaTH4hC+QZGGEQTC8cQwVU4tfks1sEH0Cx6gCPnrimoQAq8+jL5R5at5h65qC7w59Z0EOS4/KZM0v8bZEhzZnnTsjV/q8zrA5oWr83AmmbmInmlYMfsBORpb3GFpts6MaFqwEf32xFJLQDbIbW/7hWpBv31Mr0YT40wNDZJGXhhrDb+2m53A6whProWKwiNDUl7okxOxA== 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 DB9P190MB1963.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:397::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Thu, 17 Nov 2022 09:17:08 +0000 Received: from PAXP190MB1741.EURP190.PROD.OUTLOOK.COM ([fe80::b8ef:564c:bd44:770b]) by PAXP190MB1741.EURP190.PROD.OUTLOOK.COM ([fe80::b8ef:564c:bd44:770b%9]) with mapi id 15.20.5813.020; Thu, 17 Nov 2022 09:17:08 +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+pH7mlI9QACYTIAAsNUhnAABSj+gAEhDISQ Date: Thu, 17 Nov 2022 09:17:08 +0000 Message-ID: References: <20221028134808.78435c9d@sovereign> <20221111174857.71cdc2f7@sovereign> In-Reply-To: <20221111174857.71cdc2f7@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_|DB9P190MB1963:EE_ x-ms-office365-filtering-correlation-id: 2d8d2605-6ed3-4972-f25d-08dac87c8089 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aTn8rh9SVa40/gRllcW1UylKC8Ogfeg62b0N5uoRI5lnhSK7D3fqphVbs2sTKuFJCBO1HoiM5dgau29y/4lWoZXgV17Cw3w1ZPQUtYkkRMp2NbSFAJ0WhoCgbqRMkAOcIoWGUIvAT3RRfrJmSpvREueO46sXk1clB4Vs3WDJZpo3f6wwylrmvpk5v5BIyZI67TmoxcL3GxSRFeUopcEBWP3OvwK79WT3hxdwOIegOqqBxYwegu/kWhuPPu4p2Qcua7DdFUU0yqJ+Axvexr6d5paVomTBLeUIvQ/v+9Wi2dQZbz3osLiyqK8HTZ/N/bNYPp8dQ59P9G2UyDEdsXEadxV+xSntEOSbMnuHbFFd3SwDBHiVWOfjFB+K2UOV/bIHCE+06kpaWU3cy4TicHGRr704XFbjNhY3rirk32qHYp163L47dHYodjLtRKHFsQJ2rzSDdiVFdUeEOieU9hyJQiF9kEvWwTCWnQ2l5GhAk9LRg6D3OItuBqyU/PPa3a7jHFa9mZ7pdo1/e9yN/XcGfebVGqFzN/sB/GJm6385z331eQO5YC3jVsr6A7NLj/yqEDNY5GmYRRWAz8kWQ6OwLJRmhDiENpxB75Zyo2S6+8b8ORPTLYKEqyGl1CrvQxhus1BPBoTf64dv263kGVOh/+pKFGWB/hTf9HCRumpCbjGqkIAYJRUjtZcIpuJjDAmmJQ4Mrmfk2L30JhlQbpjVoGmj04HKTsEXoNv2tLkw8+M= 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)(39850400004)(396003)(376002)(136003)(346002)(451199015)(9686003)(38100700002)(83380400001)(7696005)(6506007)(122000001)(186003)(55016003)(66574015)(26005)(2906002)(8936002)(41300700001)(66946007)(71200400001)(66556008)(6916009)(4001150100001)(478600001)(8676002)(316002)(76116006)(5660300002)(52536014)(4326008)(66446008)(966005)(66476007)(64756008)(86362001)(38070700005)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?/gvFvyxrOOPHyLAG6Zebv92iljcqf3jWTUc+datkSnTA1iwrJRJ33Ec0Tk?= =?iso-8859-1?Q?61aP8oSWBU2FqJ0DC8Hren8n/fBqmRaBo02fQkGAV9NKWvkt8AwzFMo6VQ?= =?iso-8859-1?Q?P2HFwReJitRRoLCzeZQ+bNEiSkm/VjVGMe9GOQilQp1LwageSwXO930hRf?= =?iso-8859-1?Q?/XH7yZ6FkgdS3Lj4FvksF2Jp6v0X0qiLf3dSuecLXu/3p5bnuleoQ1BY6u?= =?iso-8859-1?Q?J6p+xMdUC/fds6005bWiYusJrOQolde3OAS3Q/FzlmsWDYH50d4b5BZuOA?= =?iso-8859-1?Q?zhyLA4K9BOpjx+UbTOVsu4oUuwhXba1DpEiLG1QxBF68RSeh+Kl53J+FIu?= =?iso-8859-1?Q?NT670XmcJBMszekB5ENO1RsrnyOG5ze6ZiK38pSOX/Br9ZSIDLVkp4syYB?= =?iso-8859-1?Q?0TI/C/GBodsCQxYgYFGcZCLtntCyMk1qDMBbH5viOQF212WYSL6FJonxzb?= =?iso-8859-1?Q?xnbY0fshUrJtniHTJTLYSs2bkPgWqQuiVZPEYDpixSdeqc4naO//Rv/5Uv?= =?iso-8859-1?Q?u7EkOi8sdJAmg0IT1LwChQvIYC/z5VZXHW9cgQV/8L5x7c0kPS2taWx94g?= =?iso-8859-1?Q?aOl2Tb3q/sHQe0YntOGUg08bkAec9WLZW5w7gaTKldQZD6YtZxTLLbRcUv?= =?iso-8859-1?Q?UNiZtaq/17lI2gzE7c61zDBaT4GKp/8cStAR+qZ1ohIeqRF3jOaG356sni?= =?iso-8859-1?Q?tMx5WOOCDYv3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5NkULt?= =?iso-8859-1?Q?rOzGvL2FX9Y5BW53JGpNNBuc8OY03YvkgO?= 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: 2d8d2605-6ed3-4972-f25d-08dac87c8089 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2022 09:17:08.3745 (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: 0NhiZS2pvaZ/GSIEd56pgxZne/o2WzjnAbhA9AjfIDmMJEhsGKn0n2IVqQB2XEY9LqqasNLaH2uNeAh7Hed/tA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P190MB1963 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, thank you! I got it working now using /WHOLEARCHIVE. I just needed to link mlx5devx.lib from the DevX SDK as well to my applicat= ion. Kind regards, Robert -----Urspr=FCngliche Nachricht----- Von: Dmitry Kozlyuk =20 Gesendet: Freitag, 11. November 2022 15:49 An: Robert Hable Cc: users@dpdk.org Betreff: Re: rte_eth_dev_count_avail returns different value in library 2022-11-11 13:51 (UTC+0000), Robert Hable: > Hello Dimitry, >=20 > Yes, I am building DPDK as static library. As far as I have seen it shoul= d also be the default option on windows builds? DPDK builds both static and dynamic libraries by default ("default_library= =3Dstatic" means that DPDK apps will use static libraries). However, DLLs don't work on Windows currently. > I tried linking the following libraries to my application, which is using= my own dpdk-library, but I had no success in using any dpdk functionality = (rte_eth_dev_count_avail() returns 0). > In the linker output I found out that the libraries are currently unused: >=20 > 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 I'm puzzled why these four are unused. If the DLL using rte_eth_dev_count_avail() links successfully, the linked m= ust use "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 >=20 > Do you have any other ideas what I am missing there and why they are not = linked to it? Is it may be possible to include all the PMD libraries alread= y 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(). >=20 > By the way I am using the visual studio 2022 compiler to build my own app= lication and clang for compiling dpdk if that matters. Please try /WHOLEARCHIVE for these libraries as documented here: https://learn.microsoft.com/en-us/cpp/build/reference/wholearchive-include-= all-library-object-files?view=3Dmsvc-160 On Unices, PMDs are also linked using a similar --whole-archive option. This is needed because there are no direct references from DPDK libraries t= o PMDs, because PMDs register themselves at startup.