From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 926D51BECE for ; Wed, 4 Jul 2018 00:16:09 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id s14-v6so3756664wmc.1 for ; Tue, 03 Jul 2018 15:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=0jLZPSxklafVV0nT4KrmMQ9BUMSTGDLdETqxeqgfh8c=; b=1mok8ld7G5xdLvP6umDWjaC/sxzhQR3sXe7N/wtLSmO1jeCSFJ3UelESzNrpjnXDWO fxB3fc5xEVpg9sld6qhvAPgpSxv7Umkysif201ukAtRmdHoxDZpDshRO2EkCDZ5Y8UzK rXM6lBrnzJlkdSKiaF/zsNKIXKEhu9By2mtqZxzQhSEGQBP4e2Qwfj0CO/vZ+CXhqNUN xK1wLAeERN0MUZfECyis/Kl7/wng/5rRoQSloxA9urYWZQPjAQn0vIjLL2a6g0uY74U9 tXh5XF4+O5LmMOJsMkoZfTxMFG+/J5aedLAjKEm9XvMtBuQxTnrZkJIGm+pX5wDSwKET oBWw== 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:in-reply-to:references; bh=0jLZPSxklafVV0nT4KrmMQ9BUMSTGDLdETqxeqgfh8c=; b=CRiunUc9xF+3qeszejBtf43vshkmmDzE2bjKEP1yKERa/sB69gB3tfNY7mXcPAz7Dx 9iF547BA8IKFuq3yCRl/lHjXec0rm4g+iqFKD44taPuT4FUdLRN/SsoryBGg9Vjc8f6z vxbreMB7WzTvSXqYr3c7jDI4X2a/q6nolDkFWmvOXwTU4QfQcrz4MSmooasWD42ryFS3 jV7UOfaE1IgOR3bP9xHXfKLKgvqaAqogRbXaIyFZYbiHh2bA/T+OHID0zUGwPNM/Xz+4 cwFGgXq5qlD1uKqsN7Rf1+g4/hrodihYbtj5Icugy+WuFPqY8Kp3QTysyOZ88m7OL0PT yblg== X-Gm-Message-State: APt69E2aO9PMUpJdmBGsL/Zx6jMZ5GqXyPJw5xSr0qldugGBFd2/9hIb EyJYULW2pp8mkV3RJ71d4/4Tpv/M X-Google-Smtp-Source: AAOMgpd8SS3QTlAvd9StEDruJ74vd1jF3d0DbiUl1DXbccAuzRRV2hIb6EEeQKEDjfn1Ywoz+dyjHA== X-Received: by 2002:a1c:f46:: with SMTP id 67-v6mr9071951wmp.122.1530656168989; Tue, 03 Jul 2018 15:16:08 -0700 (PDT) Received: from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id i190-v6sm3771084wmd.33.2018.07.03.15.16.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jul 2018 15:16:08 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Wed, 4 Jul 2018 00:15:08 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v9 25/27] bus/pci: process declarative PCI devargs 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: Tue, 03 Jul 2018 22:16:09 -0000 Introduce the facility to process future PCI parameters. Once the matching between PCI devices and devargs has been done, it is possible to process each devargs. New parameters would have the PCI device handle to work with when parsing the device (bus specific) parameters. Signed-off-by: Gaetan Rivet --- drivers/bus/pci/pci_common.c | 3 +++ drivers/bus/pci/pci_params.c | 10 ++++++++++ drivers/bus/pci/private.h | 13 +++++++++++++ 3 files changed, 26 insertions(+) diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index 749b6eee3..e2816eedb 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -251,6 +251,9 @@ pci_probe_all_drivers(struct rte_pci_device *dev) if (dev->driver != NULL) return 0; + if (rte_pci_devargs_process(dev) < 0) + return -1; + FOREACH_DRIVER_ON_PCIBUS(dr) { rc = rte_pci_probe_one_driver(dr, dev); if (rc < 0) diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c index bb62bcb80..7dceef89b 100644 --- a/drivers/bus/pci/pci_params.c +++ b/drivers/bus/pci/pci_params.c @@ -131,3 +131,13 @@ rte_pci_devargs_prepare(struct rte_devargs *da) rte_kvargs_free(kvargs); return ret; } + +int +rte_pci_devargs_process(struct rte_pci_device *pdev) +{ + /* For the moment, no PCI param + * needs to be processed. + */ + (void) pdev; + return 0; +} diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h index 9beb24c6a..06dc85e85 100644 --- a/drivers/bus/pci/private.h +++ b/drivers/bus/pci/private.h @@ -207,4 +207,17 @@ rte_pci_dev_iterate(const void *start, int rte_pci_devargs_prepare(struct rte_devargs *da); +/* + * Process the device devargs, if any. + * + * @param pdev + * PCI device + * + * @return + * 0 on success. + * <0 on error. + */ +int +rte_pci_devargs_process(struct rte_pci_device *pdev); + #endif /* _PCI_PRIVATE_H_ */ -- 2.11.0