From patchwork Wed Feb 22 12:55:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 94307 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp876075qgi; Wed, 22 Feb 2017 03:57:33 -0800 (PST) X-Received: by 10.107.6.30 with SMTP id 30mr22992866iog.78.1487764653026; Wed, 22 Feb 2017 03:57:33 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e63si1287063ite.72.2017.02.22.03.57.32; Wed, 22 Feb 2017 03:57:33 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3B5F060E3E; Wed, 22 Feb 2017 11:57:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CDF8A60DA3; Wed, 22 Feb 2017 11:57:23 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A76B560DA3; Wed, 22 Feb 2017 11:57:20 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by lists.linaro.org (Postfix) with ESMTPS id 6A65960C71 for ; Wed, 22 Feb 2017 11:57:19 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id l12so176778lfe.0 for ; Wed, 22 Feb 2017 03:57:19 -0800 (PST) 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; bh=eY3oB9lMM+9pSwxcx3cCK6bV79Km8Oa9lp3ThrxD7g8=; b=HBLr38qrAsYwF1lj/yGdjhmTUOt6SueBDB9gvgy5rHOkg2NLZlYDlBEqLG4PrP+7iQ If4yRKuOT2sy4i+u/FFw/Av365nbnrlSpjfDu9Zq+Ez8XTaBIFOvnVsggiwi6BZ9I/0k OM4/NxEMyPO8dsRtIFNsrQSw7aUL5yYXUlTYZQuSFIN5P07/X3Ye2XS9YiwXPlFoM/gA ucxgFG43ZDj9OHSGPWRE9Coc6B6agea4Xo50WoQ7al8IQ5uvGHhVf4RJce4V7b1rLgne Az8pksS3sBgQ3AprDZa/1eCEc4UOYIdauBQIk3H3yx+8YWg5zoAacMAWqa6mJRfN91X6 Ur7g== X-Gm-Message-State: AMke39n6CqniuP61aREyRYTu/X34B/i5Q1LclZw7jQWX4v6QD8nTd/EugWx5fpHRJ2DePuf/DQ8= X-Received: by 10.46.20.66 with SMTP id 2mr8497498lju.87.1487764637803; Wed, 22 Feb 2017 03:57:17 -0800 (PST) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id v21sm7035187ljd.9.2017.02.22.03.57.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Feb 2017 03:57:17 -0800 (PST) From: Christophe Milard To: mike.holmes@linaro.org, yi.he@linaro.org, forrest.shi@linaro.org, sachin.saxena@linaro.com, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Wed, 22 Feb 2017 13:55:43 +0100 Message-Id: <1487768164-43184-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [lng-odp] [API-NEXT PATCH 00/21] driver items registration and probing X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" This patch series implements the driver interface, i.e. enumerator class, enumerator, devio and drivers registration and probing. This interface is depicted in: https://docs.google.com/document/d/1eCKPJF6uSlOllXi_sKDvRwUD2BXm-ZzxZoKT0nVEsl4/edit The associated tests are testing these mechanisms. Note that these tests are testing staticaly linked modules only (hence avoiding the module/platform/test debate). Also note that these tests are gathering all the elements (enumerators, enumerator classes, devio, drivers) making up the driver interface so as their interactions can be checked. Real elements (pci enumerators, drivers...) will likely be written in a much more stand-alone way. Christophe Milard (21): drv: making parameter strings dynamically computable linux-gen: drv: enumerator_class registration test: drv: enumerator_class registration tests linux-gen: drv: enumerator registration test: drv: enumerator registration tests drv: driver: change drv unbind function name and pass correct parameter drv: driver: add callback function for device destruction linux-gen: drv: device creation and deletion drv: driver: adding device query function linux-gen: drv: driver: adding device querry function test: drv: device creation and destruction drv: driver: adding a probe and remove callback for devio linux-gen: drv: devio registration test: drv: devio creation and destruction drv: adding driver remove function drv: complement parameters to the driver probe() function linux-gen: driver registration and probing test: drv: driver registration and probing drv: driver: adding functions to attach driver's data to the device linux-gen: adding functions to attach driver's data to the device test: drv: test for setting and retrieving driver's data include/odp/drv/spec/driver.h | 132 ++- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/_modules.c | 4 + platform/linux-generic/drv_driver.c | 1037 +++++++++++++++++++- .../linux-generic/include/drv_driver_internal.h | 22 + platform/linux-generic/include/odp_internal.h | 5 + platform/linux-generic/odp_init.c | 21 +- test/common_plat/m4/configure.m4 | 1 + test/common_plat/validation/drv/Makefile.am | 1 + .../validation/drv/drvdriver/.gitignore | 5 + .../validation/drv/drvdriver/Makefile.am | 60 ++ .../validation/drv/drvdriver/drvdriver_device.c | 218 ++++ .../validation/drv/drvdriver/drvdriver_device.h | 24 + .../drv/drvdriver/drvdriver_device_main.c | 12 + .../validation/drv/drvdriver/drvdriver_devio.c | 209 ++++ .../validation/drv/drvdriver/drvdriver_devio.h | 24 + .../drv/drvdriver/drvdriver_devio_main.c | 12 + .../validation/drv/drvdriver/drvdriver_driver.c | 518 ++++++++++ .../validation/drv/drvdriver/drvdriver_driver.h | 24 + .../drv/drvdriver/drvdriver_driver_main.c | 12 + .../validation/drv/drvdriver/drvdriver_enumr.c | 303 ++++++ .../validation/drv/drvdriver/drvdriver_enumr.h | 24 + .../drv/drvdriver/drvdriver_enumr_class.c | 174 ++++ .../drv/drvdriver/drvdriver_enumr_class.h | 24 + .../drv/drvdriver/drvdriver_enumr_class_main.c | 12 + .../drv/drvdriver/drvdriver_enumr_main.c | 12 + test/linux-generic/Makefile.am | 5 + 27 files changed, 2861 insertions(+), 35 deletions(-) create mode 100644 platform/linux-generic/include/drv_driver_internal.h create mode 100644 test/common_plat/validation/drv/drvdriver/.gitignore create mode 100644 test/common_plat/validation/drv/drvdriver/Makefile.am create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_device.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_device.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_device_main.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_devio.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_devio.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_devio_main.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_driver.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_driver.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_driver_main.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr_class.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr_class.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr_class_main.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr_main.c -- 2.7.4