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 505DEA04F1; Sun, 8 Dec 2019 20:25:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C070A1BDFD; Sun, 8 Dec 2019 20:25:05 +0100 (CET) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 1E69D1BC25 for ; Sun, 8 Dec 2019 20:25:04 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id p9so13171720wmg.0 for ; Sun, 08 Dec 2019 11:25:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=JBU7dLN0+rWNZMFR5F3d1bRxW2sPHrsVcfiqlRT5MrA=; b=qfARlShLOjJbaNZ2FLhZZdZhpxKWGEdPTyOKCvU4w7pIczE9Ju+mMnZVQ7budXHLcc kpT/AgPhIyMm8odm8gNHkErHl1aTXeYk3jDgXkg1WNtFgIz4bO5PFqddtKjHP5tv78A7 Ka6xq98RxeKZbmYnT5sXi2Jw+JGZlo8FCcNTz61oU3vKIgpf9Qz6qMyx2HZHN/e/IoHt XBPiEVXUV3ik9Kg1qnfk88HxnTDpcTVF5p941rN1t9ikW2nmbpO12nFIm1rDcdmGgIeK 2sHqsLDZEALgr90nQBgInTCRCjAwWkqHzr09JixTbZtBAfLpgfJnc8M+6hLeSqUc0KA4 nAvw== X-Gm-Message-State: APjAAAVnOulGjyH9Etmn6bZu2r1j+sUiHBBJ7waAlRwM9cK+p+gtcr3+ atpprtY+exBJDSOVjLh3j60= X-Google-Smtp-Source: APXvYqxJezTWg7Ar/7Hoj53Sual0bJpZDtauMF/owYU1ByyUPnNTs0TKDdnunT6aAXKj7nuSZz6kXQ== X-Received: by 2002:a1c:a7c8:: with SMTP id q191mr19929472wme.176.1575833103698; Sun, 08 Dec 2019 11:25:03 -0800 (PST) Received: from ?IPv6:2001:b07:644a:cda2:d9a7:3993:b51f:46ef? ([2001:b07:644a:cda2:d9a7:3993:b51f:46ef]) by smtp.gmail.com with ESMTPSA id b16sm18715976wrj.23.2019.12.08.11.25.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Dec 2019 11:25:02 -0800 (PST) From: Alfredo Cardigliano Message-Id: <61FC87EC-7ACA-4D78-975B-62BC5FB1A831@ntop.org> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Date: Sun, 8 Dec 2019 20:25:01 +0100 In-Reply-To: <40e1e2aa-bbbc-9384-a33e-f249b3157104@intel.com> Cc: John McNamara , Marko Kovacevic , Anatoly Burakov , dev@dpdk.org To: Ferruh Yigit References: <20191015082235.28639-1-cardigliano@ntop.org> <20191015082235.28639-5-cardigliano@ntop.org> <40e1e2aa-bbbc-9384-a33e-f249b3157104@intel.com> X-Mailer: Apple Mail (2.3601.0.10) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 04/17] net/ionic: register and initialize the adapter 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 2 Dec 2019, at 17:09, Ferruh Yigit wrote: >=20 >> + * There is no room in struct rte_pci_driver to keep a reference >> + * to the adapter, using a static list for the time being. >> + */ >> +static LIST_HEAD(ionic_pci_adapters_list, ionic_adapter) = ionic_pci_adapters =3D >> + LIST_HEAD_INITIALIZER(ionic_pci_adapters); >=20 > Why this list is used? Will holding the reference in the private data = help? A pci_dev is tied to an adapter, that can be tied to multiple LIFs = (logical interfaces),=20 an eth_dev is created with rte_eth_dev_create for each LIF. The reason = we have the adapters list is for example to handle eth_ionic_pci_remove which is = called on a=20 pci_dev, thus we need to keep the adapter with the list of LIFs = (eth_devs) to destroy them. Btw, all other comments have been fixed, a new patch-set is coming. Thank you Alfredo=