From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 24CB31B138 for ; Thu, 4 Oct 2018 11:31:27 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id 193-v6so8250454wme.3 for ; Thu, 04 Oct 2018 02:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=J7crkcDTCGCJ+h+NVnsDr8yy+wcDCxgWBseBtq2LncY=; b=eVM4/NB3a/EUqlAPBooTmm8G7kVZSBsg9U5HUuUqQm6gQW8Avp7viCzVCcmQuhzNzb T6BqYnQMKBib+GD7ZN67f2jDw9MiV8kLVqlO2TjdTQO06e2ipkrVxKhGNG03LI1zEkKE QMbxHktJFVQKYjXC2eKYGhk2kv2YOI37ioOH2QHclikBqFemTHxJjTymsdfmKU+Lsjtk WsVWbE+lmhc2QSZEhZ5K63aHdkei8+1jlNSSDvzoz76i/P105vcpKuKu1YOLB8skhgaM sjZqUGFCpPPkScar3LiHI7jFM8mQV79sPdET/apq4oydtkXAP5OD3a2x2jbytqR055rQ NXRA== 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:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=J7crkcDTCGCJ+h+NVnsDr8yy+wcDCxgWBseBtq2LncY=; b=RtK4okf/Nuq91/dRJIPj/TWMtgTcZFh+MJGRr8L/h6g1jDksm9B1rrdbSTOjkrianX +gj13Zz62e9lcKcpMDtt/efk8lHJJazmJTonZJy+zEpi2Rzs236cqvMvvBvjQzwAj/Ft 4tbMH08wAVlrf/X4IWvi9M/Tlx9UQ6KjelDXx3ZOwxj7md/Ln/HitX3JULXProrsPARA Sr7TAQ49E1wHD/djbrUl8fKlhneHKVmCuNiii5lyltvXkl8coF4kPkCYqD/Z2mZ12GDr N1nVwbmdzfI3gSuBMvfHcP3g2gTxV2ayCDCf1gL3PFaqNcXYcQEaHrVswbCtcRbwMbdx 5ZmA== X-Gm-Message-State: ABuFfojDxi8B+hhsaJkqpMjiI6MLHqfT93lejBxSsfDxMH/kkWpdHpXL adeKMGD4upoR8Dv0RzmOiyO+gw== X-Google-Smtp-Source: ACcGV61nrZuzUu+dZLNMlZa3oYUadnsF6g8D9+4oKF3FFrzr6Njp/dOagrdzSq5nl2u5lM9cOkGOtg== X-Received: by 2002:a1c:4d09:: with SMTP id o9-v6mr3916612wmh.134.1538645486542; Thu, 04 Oct 2018 02:31:26 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g10-v6sm2429095wrv.49.2018.10.04.02.31.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Oct 2018 02:31:25 -0700 (PDT) Date: Thu, 4 Oct 2018 11:31:08 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Thomas Monjalon Cc: dev@dpdk.org, ophirmu@mellanox.com, qi.z.zhang@intel.com, ferruh.yigit@intel.com, ktraynor@redhat.com Message-ID: <20181004093108.hfe7xmaubatg4ooz@bidouze.vm.6wind.com> References: <20180907222727.20521-1-thomas@monjalon.net> <20181003231046.26772-1-thomas@monjalon.net> <20181003231046.26772-4-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181003231046.26772-4-thomas@monjalon.net> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v5 3/5] eal: add bus pointer in device structure 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: , X-List-Received-Date: Thu, 04 Oct 2018 09:31:27 -0000 On Thu, Oct 04, 2018 at 01:10:44AM +0200, Thomas Monjalon wrote: > When a device is added with a devargs (hotplug or whitelist), > the bus pointer can be retrieved via its devargs. > But there is no such devargs.bus in case of standard scan. > > A pointer to the rte_bus handle is added to rte_device. > When a device is allocated (during a scan), > the pointer to its bus is assigned. > > It will make possible to remove a rte_device, > using the function pointer from its bus. > > The function rte_bus_find_by_device() becomes useless, > and may be removed later. > > Signed-off-by: Thomas Monjalon I agree with this change, but I think this can break ABI of buses defining their structure by composition with rte_device (e.g. PCI bus). Have you checked ABI? Personally I don't care, I prefer a clean framework to a littered lib. Acked-by: Gaetan Rivet -- Gaëtan Rivet 6WIND