From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 59C76A0548;
	Thu, 11 Aug 2022 06:24:56 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 0787240DDA;
	Thu, 11 Aug 2022 06:24:56 +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 4788940A87
 for <dev@dpdk.org>; Thu, 11 Aug 2022 06:24:55 +0200 (CEST)
Received: by mail-pg1-f182.google.com with SMTP id s206so16168562pgs.3
 for <dev@dpdk.org>; Wed, 10 Aug 2022 21:24:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc;
 bh=HBxzqzJKGggjr4RTmgs/nBTvt3K3ef/78OcIxUFZY+0=;
 b=KL5TyWtVeqJ1fqd8hZwKDlCqFxVzQL9ba6jg4+Wwk35GgIsfaSzNt0yK4RQ/70fvao
 JM4gAwiLB9QgBU5V6JPdC3nSpBHc8ofO4I/Owi2gBI2WvMfEbsyDEgeP9z+9E9hF/BbH
 c58YvUZt65QVbxj6/T2P1FjW74PCi/oogC+3kferUMDt2rWC2srQnzgS9fk5uop+Us/E
 hmSIKAp6WTNbk6OyIKbRc1qmCWPZl/jHGHVhPB9qErV5NfP3VSuGl5LkgVdbOXY/ZN8E
 pl/JpYMdNN3Tl4oAZ/Xxc38NqBnkYo/Z7OcsnXyFxEzDiEGXi48Fh1pnYHpCpt6XKeuv
 HEsw==
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;
 bh=HBxzqzJKGggjr4RTmgs/nBTvt3K3ef/78OcIxUFZY+0=;
 b=Y6g1gxXrLRG7lxmi99KJWYTwQ75Vso3JwUIMkqWvpNNF/kqZAe5hB8S4iU0DQpAN7b
 v7+oSB21PvrZlVL0kwUpbVgXdwPFLVSyi//GUHoNKhItIJhDHh4dxDW41skhysGIGY+5
 SyvQRtTTA/TjaK7eRswM4Z3BGNlHaYWByIdF4Bz1G0xcBs8tv5kV4dzFqi7Oy5FMPSLl
 SIxOlFeIOTNeGT0MGhkBGh0Ns4J8t5BCmy8FMDdZa6WJ18BifAR2fBxZ2RiJxTE9nrgs
 xZc5STPePRTZBGH0N1hvyRRiXQ5RwiwIYH+EzPX4Hu6ww2/RLRklUUhxZNkdFcyfTNc2
 ztwQ==
X-Gm-Message-State: ACgBeo1x8qcBPQsr6T7dO89zMpp9oSQXAODTc6METb/Ll3xO6krMOnMg
 GhwQvMiDstX75faXwHgCRtt1nsj/Bl0tUQ==
X-Google-Smtp-Source: AA6agR7rdVAYtknbCLVX+18ondJU5p/ykIPdTbE63PeIfdHSdcctguH+e9ffzmReLR5z22CEsi35sQ==
X-Received: by 2002:a63:1502:0:b0:411:4cc0:3ec1 with SMTP id
 v2-20020a631502000000b004114cc03ec1mr25482242pgl.91.1660191894313; 
 Wed, 10 Aug 2022 21:24:54 -0700 (PDT)
Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])
 by smtp.gmail.com with ESMTPSA id
 z18-20020aa79e52000000b0052e3d189713sm2962860pfq.3.2022.08.10.21.24.53
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 10 Aug 2022 21:24:54 -0700 (PDT)
Date: Wed, 10 Aug 2022 21:24:51 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Chaoyong He <chaoyong.he@corigine.com>
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, Niklas Soderlund
 <niklas.soderlund@corigine.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v5 07/12] net/nfp: add flower ctrl VNIC related logics
Message-ID: <20220810212451.35f8b0ad@hermes.local>
In-Reply-To: <SJ0PR13MB5545E67550757B31DC75626A9E649@SJ0PR13MB5545.namprd13.prod.outlook.com>
References: <1659681155-16525-1-git-send-email-chaoyong.he@corigine.com>
 <1659681155-16525-8-git-send-email-chaoyong.he@corigine.com>
 <b698917b-7549-816f-b327-bc1076e2f81b@oktetlabs.ru>
 <SJ0PR13MB55455399D6FB26CFAD705F509E639@SJ0PR13MB5545.namprd13.prod.outlook.com>
 <20220808074542.31b7185c@hermes.local>
 <SJ0PR13MB5545764390C56D5F641A59369E659@SJ0PR13MB5545.namprd13.prod.outlook.com>
 <20220810123941.0c35df8a@hermes.local>
 <SJ0PR13MB5545E67550757B31DC75626A9E649@SJ0PR13MB5545.namprd13.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Thu, 11 Aug 2022 01:26:49 +0000
Chaoyong He <chaoyong.he@corigine.com> wrote:

> > > The 'port_id' is the 'Device [external] port identifier', which
> > > related with the 'rte_ethdev_devices[]' I think.
> > > Here the ethdev we created is not exposed to the user and is not in the  
> > 'rte_ethdev_devices[]'  
> > > array, so it can't be invoked by the user at all.
> > > And we invoke this ethdev through a pointer in the `struct
> > > nfp_net_hw`, so I think there should no conflict with other ones in the  
> > system.
> > 
> > DPDK already has a port ownership framework to deal with internal ethernet
> > device ports. Why was this not used?  
> 
> Sorry I have no knowledge about this framework before. Any document link or logic about
> this framework will be greatly appreciated. Thanks!

It is part of ethdev https://doc.dpdk.org/api/rte__ethdev_8h.html

See rte_eth_dev_owner_new, rte_eth_dev_owner_set, etc
https://doc.dpdk.org/api/rte__ethdev_8h.html#ad6817cc801bf0faa566f52d382214457