From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id CC5B41B868 for ; Tue, 15 May 2018 15:49:30 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id l1-v6so1271388wmb.2 for ; Tue, 15 May 2018 06:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gtrBiUQjCNi1aaz+uoJbrJDPlQ5FbLm8MaOBRWdP6v4=; b=AdBjFkMBa92Yf6NYZVlCYANXv2bSiokLpB49KJicAB6mezPiVoN7jWgDNGWF9NTieU dhyZr/sCRXyQ5VLK+Itpic7451NprVwoMz8hSzvsINrZunu3RAQ2A4s8/zJvcx0Rlow8 dSRVtJwv6cdZM3XF+N10CGCBUExIYrE0DkVL5AZw0HX5vacuPoN2gIY7wBDaPQ8DZtTw RcFhAjw1Un3eIdlpqyEhCcWAehhwvwN+0iNPCEnop7dSd15K/Vg9WDNrrZxDfIoZmO9/ HJ0vFxp5gYTeolxrZWJuirYyKVFdvWC44XLc8Esnw62v7UZgvFpVM6JfVJ2njZwrJflx Japg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gtrBiUQjCNi1aaz+uoJbrJDPlQ5FbLm8MaOBRWdP6v4=; b=aJfcqkwVgNyRHUkhlzGmOfmyKFZIfx2q4Kzydp3L5mSgIeY7l4NUl8VwS8fEgIdDKb SWxkL3ipSld/iVwP9+cswdXIzDp3ziVnw/WUUble6saHTv0sJFzCDVGUe7pIfSzKpEqg Y4hmNi+iPWHeK9M/hJaKJjgybSp0Csh/vh2FpV4yVM1cUUSZ5mXrYiRflC2/+MJksyMH IrS0wDKiS1rESEBXEh35ptUhXQQNVGe7x4un7yT8i86JE0gb4t/nGJADbnShlqXUg9JB NT0Fe8rOBYsNh2gDWxM9QPD1Hk9Z8bhBXLhiOIHDQYt1N/wQR6/xqTn9HB4TUQyKWKny Iu8A== X-Gm-Message-State: ALKqPwfTc3cti+ybD0DPDzK5Af4IgPxxR9Z7NRPvph+LbL8P6T0io9ur FpB2jGt8jPS/F20fGzU4YG0= X-Google-Smtp-Source: AB8JxZrUqRd20mbbItKcEVfiJWjcF0GZ9sH9GfKoNuSFPGYVRwsCidyvDyRU0aTjcbUTmpHzyiWi9Q== X-Received: by 2002:a1c:180b:: with SMTP id 11-v6mr8550294wmy.21.1526392170550; Tue, 15 May 2018 06:49:30 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id e80-v6sm646562wmd.1.2018.05.15.06.49.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:49:29 -0700 (PDT) From: luca.boccassi@gmail.com To: Thomas Monjalon Cc: Ferruh Yigit , Andrew Rybchenko , Stephen Hemminger , dpdk stable Date: Tue, 15 May 2018 14:47:16 +0100 Message-Id: <20180515134731.9337-65-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'drivers/net: use higher level of probing helper for PCI' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 13:49:30 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 19257cae198cd351a33cdb3a022f5d8a50d62123 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 11 May 2018 01:58:29 +0200 Subject: [PATCH] drivers/net: use higher level of probing helper for PCI [ upstream commit 01a98fdd088d9ed7c3da9e3a2f0696ac29bcc037 ] The drivers avp, bnx2x and liquidio were using the helper function rte_eth_dev_pci_allocate() and can be replaced by rte_eth_dev_pci_generic_probe() which calls the former. Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers") Signed-off-by: Thomas Monjalon Reviewed-by: Ferruh Yigit Reviewed-by: Andrew Rybchenko Reviewed-by: Stephen Hemminger --- drivers/net/avp/avp_ethdev.c | 15 ++------------- drivers/net/bnx2x/bnx2x_ethdev.c | 20 +++++--------------- drivers/net/liquidio/lio_ethdev.c | 15 ++------------- 3 files changed, 9 insertions(+), 41 deletions(-) diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index dba99120f..2caa94801 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -1076,19 +1076,8 @@ static int eth_avp_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_device *pci_dev) { - struct rte_eth_dev *eth_dev; - int ret; - - eth_dev = rte_eth_dev_pci_allocate(pci_dev, - sizeof(struct avp_adapter)); - if (eth_dev == NULL) - return -ENOMEM; - - ret = eth_avp_dev_init(eth_dev); - if (ret) - rte_eth_dev_pci_release(eth_dev); - - return ret; + return rte_eth_dev_pci_generic_probe(pci_dev, sizeof(struct avp_adapter), + eth_avp_dev_init); } static int diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 483d5a17c..07a69900b 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -642,24 +642,14 @@ static struct rte_pci_driver rte_bnx2xvf_pmd; static int eth_bnx2x_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) { - struct rte_eth_dev *eth_dev; - int ret; - - eth_dev = rte_eth_dev_pci_allocate(pci_dev, sizeof(struct bnx2x_softc)); - if (!eth_dev) - return -ENOMEM; - if (pci_drv == &rte_bnx2x_pmd) - ret = eth_bnx2x_dev_init(eth_dev); + return rte_eth_dev_pci_generic_probe(pci_dev, + sizeof(struct bnx2x_softc), eth_bnx2x_dev_init); else if (pci_drv == &rte_bnx2xvf_pmd) - ret = eth_bnx2xvf_dev_init(eth_dev); + return rte_eth_dev_pci_generic_probe(pci_dev, + sizeof(struct bnx2x_softc), eth_bnx2xvf_dev_init); else - ret = -EINVAL; - - if (ret) - rte_eth_dev_pci_release(eth_dev); - - return ret; + return -EINVAL; } static int eth_bnx2x_pci_remove(struct rte_pci_device *pci_dev) diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index e1a20cd65..eebe0b798 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -2146,19 +2146,8 @@ static int lio_eth_dev_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_device *pci_dev) { - struct rte_eth_dev *eth_dev; - int ret; - - eth_dev = rte_eth_dev_pci_allocate(pci_dev, - sizeof(struct lio_device)); - if (eth_dev == NULL) - return -ENOMEM; - - ret = lio_eth_dev_init(eth_dev); - if (ret) - rte_eth_dev_pci_release(eth_dev); - - return ret; + return rte_eth_dev_pci_generic_probe(pci_dev, sizeof(struct lio_device), + lio_eth_dev_init); } static int -- 2.14.2