From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B412FA00BE for ; Fri, 12 Jun 2020 17:02:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E62D61BFF8; Fri, 12 Jun 2020 17:02:04 +0200 (CEST) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by dpdk.org (Postfix) with ESMTP id EDBA41BFE8 for ; Fri, 12 Jun 2020 17:02:03 +0200 (CEST) Received: by mail-pg1-f173.google.com with SMTP id t7so4252921pgt.3 for ; Fri, 12 Jun 2020 08:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SiTyZGE9Q0uZG7teU+9B2vbzmCbbLuYXPCRmZjiDHoU=; b=P7nFb1m97dhM+Ce0MTw4BMZFlb4HCPWkP22pBluHVh8Uo491DpF1Yvhd1G6KqB0eKE S/l0xkNXKC8z1BQLIL7DGahI7jzn1gRqhwX5rT+J5o5Uc43Xdm1S3MGCuU0L/mlmzFn5 4gCi1+j0NxpaUZUZELmG/whJZitADDeSsMP70D1OnCJInY9a/yWkjTBLfiPXMQu5+tmP NBvMt7R3NhjHl05ZdwEbSd5APrbZrnJrSOaOVNcumLO2xAiZIvXYsLkqxp0PWOegmiNt 63x2Z4/REj69G5ly9Th6vXosvasD3X9YcUvsv1fTTDlu0pd1MEkin0rWcO6NVuw/BdNu Ymkw== 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:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SiTyZGE9Q0uZG7teU+9B2vbzmCbbLuYXPCRmZjiDHoU=; b=th2zYwt7Jft22dv9w1x4MbzAtGSOqcvcpb3AXFvOoZjzT3TqaKmCyN9H0Z9Iy4hmZN 9GTs+jndb7gPC6Ze9l/nWhmJt3vnjTd7XAZIwW0AdYqzKv5IzDJOk1Lx4znXNeU36RWz 5jpk51q58PdkdLGCSbxc59wqAXVSEfbjKUBYj2CheLzuh0zodYFbSPO13A0OZiHKHkAe KZ+dIIkfVG9jMJH2OmxS0LSEM99JtSigJwWvOSOsSjetJvOx+1AVs8PqZZuDotdGesKi ABbBHM+LD1fQVsCVD/1ujt0TuskwWpepSKadIbunG7S1DWwoX6pqSgRZLqGhyTsbwg1I iSvQ== X-Gm-Message-State: AOAM530S332C10Z6+rgdepppfvqze6kH6cURSinMx1FWwqRb27Wx0Zru +w7yrm9IvizzHc7CZEQ1RcisAw== X-Google-Smtp-Source: ABdhPJzglMUOTqDSNnVyEt9fRXYQ40mGR7sPyjjgOZnUH1JJgz7q5QX0OoPym8vxf743lJ6O7uwshA== X-Received: by 2002:aa7:952d:: with SMTP id c13mr12007032pfp.125.1591974122961; Fri, 12 Jun 2020 08:02:02 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s13sm6554302pfc.136.2020.06.12.08.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 08:02:02 -0700 (PDT) Date: Fri, 12 Jun 2020 08:01:54 -0700 From: Stephen Hemminger To: Georgia Panoutsakopoulou Cc: users@dpdk.org Message-ID: <20200612080154.4c0a40f5@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Trouble locating functionality in code X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Fri, 12 Jun 2020 17:47:47 +0300 Georgia Panoutsakopoulou wrote: > Hi all, > I'm having trouble locating the part of code that associates a network card > with the dpdk internally used port id. > > For example, when I bind two ports with pci slots 0000:86:00.0 > and 0000:86:00.1 to dpdk driver igb_uio , how does dpdk populate this > information and give a port id in each port? Is there a way to know this > association without accessing dpdk structs by using functions like > rte_eth_dev_get_name_by_port(portid, > name)? > > I'm using dpdk app l2fwd and dpdk version 19.11. > > Thanks, > Georgia It is done by the PCI probing code that does a walk of sysfs.