From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 54EA3CFA0 for ; Tue, 11 Apr 2017 17:44:42 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id u2so4118219wmu.0 for ; Tue, 11 Apr 2017 08:44:42 -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=CJVOgsHWmQXt/e7mJWaRoiTUDrutQyH4Ug1PNam79Iw=; b=JR3h/PBO90EGAB5EbdIaQ1oGozmEbRAlsc/VOVUlYTSeUxZ2hf7AiXX0VMz4G1msMP Hx7CM60p88diVUlVUWhFS2XPrO63cEfQHxggSsImtEm2ycyXE5HPKyrROy7VftX9dykN d9vApnZIHSJG+/JM/jbGJAdH77l6A23lAXO+0uCfUiwYL876tkvtnW8CBXhilLob0E1d dunPZcyiEBvA8dGvDY3O4j2P5tK3gVNqO4NOec6i8kB8f4PnxfdTlyniAvfEXNuHfZdZ P2F5alAWwMpGGNTVuM+uceYUbr07SWnZyLffDMKQxmN8HGNAzq+n/xiRY7EBIZVFpyVh CWGg== 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=CJVOgsHWmQXt/e7mJWaRoiTUDrutQyH4Ug1PNam79Iw=; b=mrLqlbWO2XsiBV6dBHS9XmVJdefkebUp9Z5BXHrVBeFZSSLM13AwhkAFjZRmCjw8oY Klqav2kYtxjVDxa/Do8HKeB8Ad+tnjExuf1Du2j3b7MKfLXMg/Aqu7S/RHS0OeDot/pG IC1/xtbnP8WWUbHUqN225m5FlBSvxzrwbHfiAxprgGfmZ9AdIFXqMQ8yhloYuvatdU5w r6nSlTcL41dAHH74syugNq1DbRKvL380GngowAwJGD2mDl48KTyj8Ez31uBLsWpGlZjR 6EZ8rYc7AJbc4At/AzcfCiy0SSLBvM8j3kdo1OcoJTmiNbpQivlBIX2fYc8RALVcgh4t iKrg== X-Gm-Message-State: AN3rC/5amYzOqhJbF3AMRxJUQ8Gvz1C8Ax4Hi51Wqt6RNCgtDKbiuFXq KjVGXJPsA0pUkXs3IBE= X-Received: by 10.28.69.72 with SMTP id s69mr16228396wma.85.1491925481787; Tue, 11 Apr 2017 08:44:41 -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 v14sm2936830wmv.24.2017.04.11.08.44.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:44:40 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:16 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: <1488797809-12917-1-git-send-email-jblunck@infradead.org> In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 12/12] event: use generic vdev for probe and remove 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, 11 Apr 2017 15:44:42 -0000 Signed-off-by: Gaetan Rivet --- drivers/event/octeontx/ssovf_evdev.c | 11 +++++++---- drivers/event/skeleton/skeleton_eventdev.c | 10 ++++++++-- drivers/event/sw/sw_evdev.c | 11 +++++++++-- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 6479c80..c80a443 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -488,17 +488,17 @@ static const struct rte_eventdev_ops ssovf_ops = { }; static int -ssovf_vdev_probe(const char *name, const char *params) +ssovf_vdev_probe(struct rte_vdev_device *vdev) { struct octeontx_ssovf_info oinfo; struct ssovf_mbox_dev_info info; struct ssovf_evdev *edev; struct rte_eventdev *eventdev; static int ssovf_init_once; + const char *name; int ret; - RTE_SET_USED(params); - + name = rte_vdev_device_name(vdev); /* More than one instance is not supported */ if (ssovf_init_once) { ssovf_log_err("Request to create >1 %s instance", name); @@ -563,8 +563,11 @@ ssovf_vdev_probe(const char *name, const char *params) } static int -ssovf_vdev_remove(const char *name) +ssovf_vdev_remove(struct rte_vdev_device *vdev) { + const char *name; + + name = rte_vdev_device_name(vdev); ssovf_log_info("Closing %s", name); return rte_event_pmd_vdev_uninit(name); } diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index d2da7d8..800bd76 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -468,16 +468,22 @@ skeleton_eventdev_create(const char *name, int socket_id) } static int -skeleton_eventdev_probe(const char *name, __rte_unused const char *input_args) +skeleton_eventdev_probe(struct rte_vdev_device *vdev) { + const char *name; + + name = rte_vdev_device_name(vdev); RTE_LOG(INFO, PMD, "Initializing %s on NUMA node %d\n", name, rte_socket_id()); return skeleton_eventdev_create(name, rte_socket_id()); } static int -skeleton_eventdev_remove(const char *name) +skeleton_eventdev_remove(struct rte_vdev_device *vdev) { + const char *name; + + name = rte_vdev_device_name(vdev); PMD_DRV_LOG(INFO, "Closing %s on NUMA node %d", name, rte_socket_id()); return rte_event_pmd_vdev_uninit(name); diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 0caf8ba..a31aaa6 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -696,7 +696,7 @@ set_credit_quanta(const char *key __rte_unused, const char *value, void *opaque) } static int -sw_probe(const char *name, const char *params) +sw_probe(struct rte_vdev_device *vdev) { static const struct rte_eventdev_ops evdev_sw_ops = { .dev_configure = sw_dev_configure, @@ -727,12 +727,16 @@ sw_probe(const char *name, const char *params) CREDIT_QUANTA_ARG, NULL }; + const char *name; + const char *params; struct rte_eventdev *dev; struct sw_evdev *sw; int socket_id = rte_socket_id(); int sched_quanta = SW_DEFAULT_SCHED_QUANTA; int credit_quanta = SW_DEFAULT_CREDIT_QUANTA; + name = rte_vdev_device_name(vdev); + params = rte_vdev_device_args(vdev); if (params != NULL && params[0] != '\0') { struct rte_kvargs *kvlist = rte_kvargs_parse(params, args); @@ -806,8 +810,11 @@ sw_probe(const char *name, const char *params) } static int -sw_remove(const char *name) +sw_remove(struct rte_vdev_device *vdev) { + const char *name; + + name = rte_vdev_device_name(vdev); if (name == NULL) return -EINVAL; -- 2.1.4