From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A360FA00C2; Fri, 1 Jul 2022 10:14:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4498F4069D; Fri, 1 Jul 2022 10:14:53 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8C8A540150 for ; Fri, 1 Jul 2022 10:14:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656663291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wZL2xT46H5XRuckBKmaNezdRu/9erGTj8MXEfpN6Y38=; b=YqFss4b1QMoFKcooYvV8z+r8Pw/xnQnTmXGBZooDy5P6VRTBS1JobAA1hNnLnuuHPCjMLT 3qlrNPxSZpcjto/HyGfR+NeomkFgmZir9CFDYyjDPXZeL9TSJsEiPx+WczQZcpyp3Esecy 0GBQBzQClmXm93pDCYY8BeJtdlWgyqw= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-472-cV3WjbKQOiamVgxnBQ7Cgw-1; Fri, 01 Jul 2022 04:14:49 -0400 X-MC-Unique: cV3WjbKQOiamVgxnBQ7Cgw-1 Received: by mail-lf1-f71.google.com with SMTP id r28-20020ac25c1c000000b004809e9d21e5so794601lfp.18 for ; Fri, 01 Jul 2022 01:14:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wZL2xT46H5XRuckBKmaNezdRu/9erGTj8MXEfpN6Y38=; b=n0h1VEUsGKoElQRZZMImFjaTZuVSFaFHBrhBVLe87TtGnJyIgq6iO68xfzpCd5cqY9 JaZaBZeP4TnNj4KACeHjNG+TtjsYfN4UQIjYxdjS7743jJ06OsFdDCrhYs5RwA/X3j5O VcZU9s4BhsUt6FB5Wycos1FO08kqKIyGHfmSQaJbwj3cSd7ZFoinwRIoW4pZlg/QOJcG U4khOldxvxuPXR3QdiH8MU76FJDOCvmo/CAozPm5Q5Lzl6kCTVr22uKNicpwExJI6zBv uzAmubet5CK9f6r2iz2C2obyBA/4q4LeTzT0PRXVaqlKl9qE38djkpXBtBzt76pQ6IkC 77zg== X-Gm-Message-State: AJIora9pTsBP+eVB84DP3MSamVA0cQV3PmLbdN3F/Hk6i38ZFDCcNDMO cKfKt/u9mRipp2Vi/JGIM1qmcA0TBaGLeS4KgeKpzPG5rIf1gAGYUq5Gb96rHlqE10VBXrVEW5C +QRhL4A5r4y+nETGOL4U= X-Received: by 2002:a05:6512:280c:b0:481:2fa:2816 with SMTP id cf12-20020a056512280c00b0048102fa2816mr8836993lfb.484.1656663288422; Fri, 01 Jul 2022 01:14:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tjsU7gQ0I39SGLB3BiVm/JlXFlwdZqpn06EfKUcbUUnohIwy6CZC1YKgJKB2a2Zq0e5ecruLvM36coXbfD6wI= X-Received: by 2002:a05:6512:280c:b0:481:2fa:2816 with SMTP id cf12-20020a056512280c00b0048102fa2816mr8836983lfb.484.1656663288245; Fri, 01 Jul 2022 01:14:48 -0700 (PDT) MIME-Version: 1.0 References: <20220630094129.2066164-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Fri, 1 Jul 2022 10:14:37 +0200 Message-ID: Subject: Re: [PATCH] doc: announce some raw/ifpga API removal To: "Huang, Wei" Cc: "Xu, Rosen" , "Zhang, Tianfei" , "dev@dpdk.org" , Ray Kinsella Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Jul 1, 2022 at 10:09 AM David Marchand wrote: > > > > 2. Get pci_dev by specified PCI address, and remove it > > > > TAILQ_FOREACH(pci_dev, &pci_bus->device_list, next) { > > > > if (!rte_pci_addr_cmp(&pci_dev->addr, &addr)) > > > > return pci_dev; > > > > } > > > > .... > > > > pci_drv = pci_dev->driver; > > > > pci_drv->remove(pci_dev); > > > > > > Can't this application use rte_dev_remove and rte_dev_probe? > > > If not, we should add the missing parts in the API. > > > > > Both rte_dev_remove and rte_dev_probe need rte_device pointer. In this application, it only know the device's PCI address, is there an > > existing API to get the rte_pci_device pointer by its PCI address ? > > rte_dev_probe takes a devargs string as input. > int rte_dev_probe(const char *devargs); > > You need the rte_device for removing which can be retrieved from > rte_rawdev_info_get. Additionnaly, rte_eal_hotplug_{add,remove} do the same jobs, but with an easier(?) interface. -- David Marchand