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 4AA58A0542 for ; Fri, 28 Oct 2022 12:48:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D34E540146; Fri, 28 Oct 2022 12:48:12 +0200 (CEST) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mails.dpdk.org (Postfix) with ESMTP id 01B2E400D5 for ; Fri, 28 Oct 2022 12:48:10 +0200 (CEST) Received: by mail-lj1-f178.google.com with SMTP id j14so7816006ljh.12 for ; Fri, 28 Oct 2022 03:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=DXa1z1x2b4j4xTcFnk7L0K+aGsFwkv2NeTv8DRFroxI=; b=CZ5hOLMDYefBB/HRxR11tjGvcmEjBZEGoBajHcxqhYzMGmAEvfOBtkumh46kuej8fS zbqw1DPZWAJhANnbUQPIk/ReearVScHKFgWM2jNtTDzrgP3lz4SnN8mw6AwMRvF1RWUo V6fPVedfXZUi0zMLB39UbZYI8dyucuraV99xCcLtVs9TU/E0YO6oZWG4vwFnyutIOMhC 8hR02AZBZYBcE3H6OlU2gsIA7S90BSSF0Pkm58Bncf+1vyD9a7jaLvAn4ipjgcvO4pRP jxB/onTLcsSgRto3p20dsRNjvtfD3ZH8eDLlEUvDBP2EIU9qFjOzMnokeDNfXvShBft3 Y1vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DXa1z1x2b4j4xTcFnk7L0K+aGsFwkv2NeTv8DRFroxI=; b=cg6SF3++SiN0jBuPmRZKTVwPojVX26u1LmLk8/5Okk3TTM0etYf60Lk1+l9+wlUVJq y7hSxnyTcJQqgv4oEYafrOwuyRn4B72QnhRB+Cn/D0jPqJjRhj6g6Q119E5ts9ky/1ot MMMWKzkfwdlwRGWGOw6/zNhnflI72d9GGRNKRNJVZ1qsdx3il+i0IpcdIdHlhGbLpdfc DpJaRAGKL+0JJZUvgVefANhs9udc2Kjjuo2rqrIqjf6XoO+qjgWfvsAfkWuAgYIaD6bh x5sIUkspZkj5gT1fV+QpcmJYjdzLJQtZAWxDAs4yNhersYsancmBF1ewEY/h2GbzrkLS m0ug== X-Gm-Message-State: ACrzQf1x7Ml8mxfA7P1dixFsHIPwCz3+2jLoIs+z3+R7ozv6K6Bon1+q UbuDWEz5tAPy0MdoLYlKJos= X-Google-Smtp-Source: AMsMyM7MtoICiKMglAjjm2qNSUmGPef9U45hRU6yiVPCiHUwVclwGNUFHIMkMOwOqCBf3C2BKxlmnQ== X-Received: by 2002:a2e:3a12:0:b0:277:a6b:b919 with SMTP id h18-20020a2e3a12000000b002770a6bb919mr10868742lja.191.1666954090304; Fri, 28 Oct 2022 03:48:10 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id k4-20020ac257c4000000b004a9c6f7a776sm516128lfo.49.2022.10.28.03.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 03:48:09 -0700 (PDT) Date: Fri, 28 Oct 2022 13:48:08 +0300 From: Dmitry Kozlyuk To: Robert Hable Cc: "users@dpdk.org" Subject: Re: rte_eth_dev_count_avail returns different value in library Message-ID: <20221028134808.78435c9d@sovereign> In-Reply-To: References: X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 2022-10-28 09:45 (UTC+0000), Robert Hable: > Hello, > > I am trying to build a static library based on the skeleton example. My problem 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? > > rte_eal_init() is called in both applications with the default parameters. > Both processes are running under the same administrator user. > > I am using Windows Server 2022 with a Mellanox ConnectX-4 on DPDK V 22.11.0-rc0. > > Kind regards, > Robert Hable > 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 for 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().