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 53FEEA0597; Fri, 17 Apr 2020 22:44:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F359A1EAE1; Fri, 17 Apr 2020 22:44:45 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 266161EAB9 for ; Fri, 17 Apr 2020 22:44:45 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id m21so1577575pff.13 for ; Fri, 17 Apr 2020 13:44: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:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e0+jwJz/JnrEOloVZsEpOIOx31ciZN972nLY5t1LPqQ=; b=OWrjLqtuRY8vOYbLGlDOOBZf/ojYz6kFOn8561cmRPCQ7qzNDfAJlg1qfRk/XNY5+F ghbWlhPMFrV7hiHqa/EGEExYm2AmP3okjPWXzRP0TVcinw6MIWbDGA75G/uyx8j57gr0 ytNx7DrtPEz6ZsdK4hYjQJ3jB7bP9ps9B0dP/vqmomk8JuOWjAu7EmizeNia6blbGpTx 7qRKR6DgKz3eILVFmvsqyRitongka7ZIQGVZ9GDw27MUwX6lshV/TRxIGp1/k6dpDjnZ u2mdq+CReb07id+OFIhncpBH+FQ0Wqinf4XPcSH3BRmwuS1n2QUFBddPMQbmGnV/3J78 CBrg== 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=e0+jwJz/JnrEOloVZsEpOIOx31ciZN972nLY5t1LPqQ=; b=Oj1SGZ7XFtU+qmwBeb7dmpIFgLjpp87TalzaU+VUrKwwop0rmlVp8iQtEg6e1zyipB OFQ2hIl45Cs1a5xYkhu11cLOkuIXO7UgeZNL/faPYASb0C+DUhDiZh94E1qBwh9n04T2 tAC2OJJteRkQJNTLgVUbKxDnlvPUEwB/E91LL6dWBuKbKuEGuLT4ENodiRz7/3a2v4AG 24aXIStc/KjMzI4jX4PY/NlwU+8NydoJ2BnEPxtc9K6/8ZeBvKyAabSw6DJzeCWWb8n4 x3ilxj9c8EtcW74I2qnusp/G8UzI1W+bc/8clvSy8a54EioaWjnku3nnJxWAiv9j3e70 gAUg== X-Gm-Message-State: AGi0PuZNRjQLW3LRuFhuODqmOJfQdl3b2bTKwo8kOH3AZgi3KzyR9Ss+ Rg7degE8TZ6R29kscfDReRxlTA== X-Google-Smtp-Source: APiQypIecd4vvdfUQvRI7Pc65u3pSTk0/os8xPsOx8Rk1wSgNWmvgiXfOd8R18FOetkIJIfW3K/aAQ== X-Received: by 2002:aa7:9106:: with SMTP id 6mr4857941pfh.181.1587156284127; Fri, 17 Apr 2020 13:44:44 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id u8sm18932335pgl.19.2020.04.17.13.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2020 13:44:43 -0700 (PDT) Date: Fri, 17 Apr 2020 13:44:35 -0700 From: Stephen Hemminger To: Gaetan Rivet Cc: dev@dpdk.org, Chas Williams , Liron Himi , Andrew Rybchenko , Thomas Monjalon Message-ID: <20200417134435.53da1af8@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1] ethdev: add rte_device to port_id function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On Fri, 17 Apr 2020 18:48:37 +0200 Gaetan Rivet wrote: > +/** > + * Find the owned ethdev port id of an `rte_device`. > + * > + * @param dev > + * An `rte_device`. > + * @param owner > + * An owner id. Use `RTE_ETH_DEV_NO_OWNER` for ownerless ports. > + * > + * @return > + * The port id of an `rte_device` if it is owned by `owner`. > + * `RTE_MAX_ETHPORTS` otherwise. > + */ > +__rte_experimental > +uint16_t rte_eth_port_from_dev_owned_by(const struct rte_device *dev, > + const uint64_t owner); > + Ok, but why introduce API with no users? Also a device could in theory be owned multiple times by the same owner. For example if two NIC's from same vendor were used in bonding.