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 8A691A00C2; Fri, 1 Jul 2022 10:36:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 646C040E03; Fri, 1 Jul 2022 10:36:07 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id B1BD540A7D for ; Fri, 1 Jul 2022 10:36:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656664566; 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=90d4ped6+CcxQ3D3dpfqD8DFie3SMswecVAqY1fBtl0=; b=NhNkuv/ZUSjrFCnwQz3hiVhBno+OQ3QEWptQy9RiD9S8UWUVR/rnFKhOYjpiMYvf9cSLT9 gkzibzxb91rJYJ0EFn62QgTufz0w+Dctbewc1CUTsyAwUvMI15WXkJymh1HBAd0xvL8zwf jJIPkSik+YW8ns9K7RB+kUXNjFh62WY= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-629-LbB1McD2P4Gb2XQZ5QYMLg-1; Fri, 01 Jul 2022 04:36:03 -0400 X-MC-Unique: LbB1McD2P4Gb2XQZ5QYMLg-1 Received: by mail-lj1-f198.google.com with SMTP id l5-20020a2e8345000000b0025bce6dcde0so276552ljh.12 for ; Fri, 01 Jul 2022 01:36:02 -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=90d4ped6+CcxQ3D3dpfqD8DFie3SMswecVAqY1fBtl0=; b=RAklI4dp5SPP9AmCfU2MDJRQXXmq6hA6T8rjTN4sTkXY/FncY9AS8I+Ir2YQ6I/Ddj unjJ2q0eJY5uvkBbWn5eBs8ZNqQ1fiYr7juQU+GTsIxKfKIYPtLz1SWSoMkpYqeqaO2Y iLy8KmMU4WlQTyUXnD1LhHbNgJfHSW0pu5gTMiqFLwBb727aTeTYtocn7i+WhcuenyGS +xKXhrCy9jlgKK9LBZYpWmP5gBcU01PjoZRZlacxdApUUyQHYMKU9pmJn1/o4+rHDW3X CfrCGD1xArUOp6+UuYq1SdsiKKQcXFz6IuUdB92maMn+OEnpFLuxejV8Gcc9ZpH1yscw 6XKA== X-Gm-Message-State: AJIora/x7r1djWIcwazZrl5oVLWpqs8NEHK8lJOcTo76fhtXM21c44fZ 9p9UmyOTJohT7Kv6zRUn98njjQ8bUKaR4z9tTIYU/X73fhoGFxdnK561uvCTTsH6IdOlkKGW0AY ZJO0h2lkC9MQ0uIgo7fc= X-Received: by 2002:a05:6512:3c8e:b0:47f:b6fa:8da1 with SMTP id h14-20020a0565123c8e00b0047fb6fa8da1mr9428936lfv.553.1656664561601; Fri, 01 Jul 2022 01:36:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sebVgU5BmH5a9+IdwBk1qUFGeqdB32Be0ZnG+hpIqpVcxb26QrdFutsD1inJ0Gjnd4C3JbVvheA+7DIo0ZSZo= X-Received: by 2002:a05:6512:3c8e:b0:47f:b6fa:8da1 with SMTP id h14-20020a0565123c8e00b0047fb6fa8da1mr9428920lfv.553.1656664561375; Fri, 01 Jul 2022 01:36:01 -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:35:50 +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:32 AM Huang, Wei 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. > > > > > I checked rte_eal_hotplug_{add,remove}, they should meet my requirements, thanks a lot. Cool, thanks. -- David Marchand