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 30B0FA0C43; Thu, 23 Sep 2021 19:48:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF01B41260; Thu, 23 Sep 2021 19:48:22 +0200 (CEST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by mails.dpdk.org (Postfix) with ESMTP id 523EB41257 for ; Thu, 23 Sep 2021 19:48:21 +0200 (CEST) Received: by mail-lf1-f51.google.com with SMTP id u18so28116605lfd.12 for ; Thu, 23 Sep 2021 10:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to:cc; bh=SSL7hmU4Jz0rd0OOrUvTrJLsG3JqQjmTj3acuuz4Sa8=; b=k8WP8ypH4G/DQ7XDMyyHjnHJINzBhzRyL8txsmWuWjyiw7dpSkGvZrEvxz04oGdtH7 a9OUZTun7bC3QcdzS/NyeY5rawIC4LhZ215Z7nm3TneHlRpJoqtUBRlzE6Xu1+4pR+6M 6PDRnCB3bSYYPhZ6H29NlMygN3s8RSgDSszIGQy2Fcp9qfoWjSN6Pj3eKtCt6G03G+e7 FlvwW6T6RmW2Lry2KomU2hKa3SoNQ8qwZ97+bJpAH5cIgfhpDUE/r6+Gh5H2lJG4aU7F B7Zh2A0u2RAuGP87QRtgI+LrmBdWaWZ2wB2eCS7NLS2zeS3P+i/YTGrxrEYhUbzqrrRV sY+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=SSL7hmU4Jz0rd0OOrUvTrJLsG3JqQjmTj3acuuz4Sa8=; b=2DSJuOmPH85WZ55n+oAgq98JJmnplUxm+fmPfUfsQoXJABVnM5P1sybaLF6rkTbFwy oITtdyfow9STZ7U9klZHGyhx8YonWagyxjbJKW9s+60BxjcI4sb4CGHC9lOJgMaEUhoE 1Pek4q64dsQ31JxEKjvs6+6iBAGqWUKRvqyazEWTyzrIAq5OxNHLMh+U93nDxiluPeIf CKGWidalW8nZH/cpWuxxMuZJjxByd6Xk+RpV4d+n/epxRwZcMZAlBhLKu8Y1J1Z1orQM MEc/sE6lPWrCD4V/beaO26DV+d9e8+wWL1DoDy+zAxKJcQPoYqOT+Bp5X7yqX/xkwiam GE2A== X-Gm-Message-State: AOAM531BUOy4FATqCKxN91/SLSzkdfCmTnATB3Z5HqM+0iA9XltlPjGa rY1LhhdxX/8oSOTnxrMlU+r4z/pBnONcLOj8zpk3qhgb6bSJ7g== X-Google-Smtp-Source: ABdhPJx3ak8tY/6rn8UBFYpbijgCOZguPqoIo3FacZJXl1X6/0Tx9vU4NIwAkxVlmgxliDpoMiWhSM5izB68R40nBk4= X-Received: by 2002:a05:6512:3192:: with SMTP id i18mr5377742lfe.611.1632419299043; Thu, 23 Sep 2021 10:48:19 -0700 (PDT) MIME-Version: 1.0 From: William Tu Date: Thu, 23 Sep 2021 10:47:42 -0700 Message-ID: To: dpdk-dev Cc: Dmitry Kozliuk Content-Type: text/plain; charset="UTF-8" Subject: [dpdk-dev] RTE_REGISTER_BUS does not work on Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Hi, I'm trying to run OVS-DPDK on Windows (building OVS binaries and statically link DPDK windows library), and it doesn't work due to rte_bus_scan() find no available devices. (However, when using dpdk-testpmd.exe, it finds the device successfully) I realized that the PCI bus driver calls RTE_REGISTER_BUS to register itself, and it's a macro creating the businitfn_pci, and calls rte_bus_register. But somehow on my system, it does not invoke so actually the 'rte_bus_list' is empty. And I guess this is due to "constructor" function not working correctly when I static link DPDK. When linking DPDK using gcc, OVS passes the linker option '--whole-archive'. https://github.com/openvswitch/ovs/blob/master/acinclude.m4#L509 I tried adding -Wl,-force_load, or -Wl,/WHOLEARCHIVE at libdpdk.pc. So far I still couldn't get it to work. Any suggestions or comments are welcome! Thank you William