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 9E2E3A0C4C; Thu, 19 Aug 2021 03:14:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F0FE4067E; Thu, 19 Aug 2021 03:14:47 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id 3ADFF40141 for ; Thu, 19 Aug 2021 03:14:46 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id r2so4258460pgl.10 for ; Wed, 18 Aug 2021 18:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=exNYPwF6Is5+ZYzTuhENhl1y6C9RbNT5FZIu1fHz2YI=; b=vn79TDELym0akdxzfLHhaZXpOLj5p1Z92xqMhGotbjk6tBDgwqCc4f5onRdLbmHMUm jlMI48/OYuqmfBXw2DC8dwDFIbg/Jt3ngUGS6f8xAODjBHx3ix4Gz637WG6hR3MwmWXP cnC7xtmc2RWmzdV2znrlnm+wvtht6GCF8NI20PgcJdaMXN45Wq4eM5n/Orv9qtqlmJ79 CYncDGV2mruApFJ5qqKgHaBEOStgvyqyCE5oOUPWQvNNeV/Amd6Ucx2cDK7rr90SmOyy 3t1xiHiUtM9pt6vl5TROnzGmNjkABHwVJIMWlmuskPFQkgFHaP1zpH0zF0Z7btpwT5j8 aI/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=exNYPwF6Is5+ZYzTuhENhl1y6C9RbNT5FZIu1fHz2YI=; b=h87mpws9CDO2LOTmoIZnuPeR3OKBxAhTbTomxHzBXf9+41b3jB66EVA6SyVyyEzEwc nexdnJCG+T5aKj+EM2iQChOJh1WkFZ5TswmwQRkJsPgU6X6hkQDAvK0j3wzg6kfQl50q DteXNCDoaUgBtztEyjr/9JC4Utge8DhZ/IxKUPEwxwO5Ib5yk2ROyDo27UG+UrfGIWe8 NJIGVc408N6I8QqX5o6Fu0dOLwz3V8ZY+Bh1vO2g/L0kqqxcKUJP/bNH573LxGA+n7tz wEUqIAuFmhdFEdjj4rS8/1DiC79YcFJB6OI4QV+GuTRr705T0c27We/b31yU8N0K2AJV beNA== X-Gm-Message-State: AOAM533kW/ZRpoPa4nHA5QJlok82RVKRk2//XEK3tUT8Fq7vmourSXFg i6/Sr03U7mPLY8LXFdRAucOHE+VgaCmfng== X-Google-Smtp-Source: ABdhPJzPKX/SkTQ/NvVxyS79Cjzmb8M4YcnVxcwHTqUbGD0mJ6+anJeSJqMFDl0aOComvJjAeFSVNQ== X-Received: by 2002:aa7:90d4:0:b029:3b3:2746:5449 with SMTP id k20-20020aa790d40000b02903b327465449mr12104910pfk.81.1629335684695; Wed, 18 Aug 2021 18:14:44 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id p34sm1013143pfh.172.2021.08.18.18.14.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 18:14:44 -0700 (PDT) Date: Wed, 18 Aug 2021 18:14:41 -0700 From: Stephen Hemminger To: dev@dpdk.org Message-ID: <20210818181441.4aff89a8@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] PCI valgrind detects unintialized access 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" As a sanity test, running lastest DPDK testpmd with valgrind (on x86). One concern is that the PCI code appears to be looking at flags in the PCI device (not from the driver) which are not initialized. The probe logic is a confusing, any recommendation on best fix? ==1695615== Command: build/app/dpdk-testpmd --log-level=debug --log-level=eal:debug -c 1 ==1695615== EAL: Detected 16 lcore(s) EAL: Detected 1 NUMA nodes EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket ==1695615== Conditional jump or move depends on uninitialised value(s) ==1695615== at 0xCF7929: rte_pci_get_iommu_class (pci_common.c:666) ==1695615== by 0xCAC89C: rte_bus_get_iommu_class (eal_common_bus.c:214) ==1695615== by 0xCC8878: rte_eal_init (eal.c:1084) ==1695615== by 0x4ED5E4: main (testpmd.c:3809) ==1695615== ==1695615== Conditional jump or move depends on uninitialised value(s) ==1695615== at 0xCF79BB: rte_pci_get_iommu_class (pci_common.c:666) ==1695615== by 0xCAC89C: rte_bus_get_iommu_class (eal_common_bus.c:214) ==1695615== by 0xCC8878: rte_eal_init (eal.c:1084) ==1695615== by 0x4ED5E4: main (testpmd.c:3809) ==1695615== EAL: Selected IOVA mode 'PA' EAL: No available 1048576 kB hugepages reported ==1695615== Warning: set address range perms: large range [0x100200000, 0x500400000) (noaccess) ==1695615== Warning: set address range perms: large range [0x500400000, 0x900600000) (noaccess) ==1695615== Warning: set address range perms: large range [0x900600000, 0xd00800000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) ==1695615== Warning: set address range perms: large range [0x1010859000, 0x1410a59000) (noaccess) EAL: WARNING! Base virtual address hint (0xd01061000 != 0x1010a00000) not respected! EAL: This may cause issues with mapping memory into secondary processes ==1695615== Conditional jump or move depends on uninitialised value(s) ==1695615== at 0xCF91C9: pci_device_iova_mode (pci.c:611) ==1695615== by 0x2F498D: rte_pci_probe_one_driver (pci_common.c:219) ==1695615== by 0x2F498D: pci_probe_all_drivers (pci_common.c:321) ==1695615== by 0x2F498D: pci_probe.cold (pci_common.c:348) ==1695615== by 0xCAC692: rte_bus_probe (eal_common_bus.c:72) ==1695615== by 0x2EC82F: rte_eal_init.cold (eal.c:1291) ==1695615== by 0x4ED5E4: main (testpmd.c:3809) ==1695615== ==1695615== Conditional jump or move depends on uninitialised value(s) ==1695615== at 0xCF91D1: pci_device_iova_mode (pci.c:611) ==1695615== by 0x2F498D: rte_pci_probe_one_driver (pci_common.c:219) ==1695615== by 0x2F498D: pci_probe_all_drivers (pci_common.c:321) ==1695615== by 0x2F498D: pci_probe.cold (pci_common.c:348) ==1695615== by 0xCAC692: rte_bus_probe (eal_common_bus.c:72) ==1695615== by 0x2EC82F: rte_eal_init.cold (eal.c:1291) ==1695615== by 0x4ED5E4: main (testpmd.c:3809) ==1695615== ==1695615== Conditional jump or move depends on uninitialised value(s) ==1695615== at 0xCF873D: rte_pci_map_device (pci.c:66) ==1695615== by 0x2F49B8: rte_pci_probe_one_driver (pci_common.c:234) ==1695615== by 0x2F49B8: pci_probe_all_drivers (pci_common.c:321) ==1695615== by 0x2F49B8: pci_probe.cold (pci_common.c:348) ==1695615== by 0xCAC692: rte_bus_probe (eal_common_bus.c:72) ==1695615== by 0x2EC82F: rte_eal_init.cold (eal.c:1291) ==1695615== by 0x4ED5E4: main (testpmd.c:3809) ==1695615==