From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 332AB108F for ; Tue, 17 Jan 2017 21:21:20 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id r144so241000804wme.1 for ; Tue, 17 Jan 2017 12:21:20 -0800 (PST) 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:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=sqk5K24hCqbB9NK5NbXet2Hfc0N6emKd7ErRVW0wsbY=; b=xYeUXclcX4tHC5w9V6006gKn4f3L3L+l4oLmwJF5qZX0T2YIiuJx2tZ3PNWie0pGLp Zeep1VJwRy2wUIqeE0C9dt+Bwl79ch7lVT3UmmSBl/EAQBUV7dVhOIvsqt5u99btjimm /upL7QB/88eQASsoFwiaexxSQdl36pbtdcwS5OGZ5YaqVka9Xyb4bqTW/WkHyW251jE3 LFWuvI+8h03fOXHrfeXdbpmEE87fw8G3z5XmUkQLFI19bjoQhTfPTjXCy8mnhiaKdrB5 nJJxl1x9AsZ4kj7hIV8ykZZL9Z7H5k4kPvqZLGAS2EYRvlw+eSD+u3B9qwAmhLzZ5sFj AV4w== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=sqk5K24hCqbB9NK5NbXet2Hfc0N6emKd7ErRVW0wsbY=; b=s5O0qxxiUUeDom2recRoGIy4Gfp5AFmcbgJDvtWpYEW4f1yg453Oai5TvMUVYgAGfv KBTdRLOhQddH/mhQxxBjIUIVzZxH+4uBd+qIRRN3/aWrRn5++Vm+rHxyC0zx88EmoDbP LXOWnzaybrr5bSKUsmax6naMHBSkCNe3rESkydEQcM7/OJTbVJoejBkupdRj2Vlcrk+c 3mywbXtf6fxnIDqdcdnb4WOcHXmqsOQqLoaeR2ToeSz6N8aVJFUWxUJNQ1b/BFK3/m6M cBOS44xdvCTVJ43jZFpMeb9Rm0NRWXekxahfSw15YnuTcdwJWt60mf/bAjHTkRpi5G9v 5Fpw== X-Gm-Message-State: AIkVDXIEMwAFsNWJAo6CBZTYiIyPq8IzxayOq5Ia8M3Mu7e3BSAbACAKzIaVg/+C2o064Am2 X-Received: by 10.223.141.229 with SMTP id o92mr29009239wrb.22.1484684479820; Tue, 17 Jan 2017 12:21:19 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id 204sm39542241wmj.7.2017.01.17.12.21.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 12:21:19 -0800 (PST) From: Thomas Monjalon To: Declan Doherty Cc: dev@dpdk.org, Fan Zhang , pablo.de.lara.guarch@intel.com Date: Tue, 17 Jan 2017 21:21:18 +0100 Message-ID: <4849565.cTZ7J3d9yX@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1484650640-34539-1-git-send-email-roy.fan.zhang@intel.com> <1484659145-107332-1-git-send-email-roy.fan.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5] crypto/scheduler: add driver for scheduler crypto pmd 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, 17 Jan 2017 20:21:20 -0000 2017-01-17 14:09, Declan Doherty: > On 17/01/17 13:19, Fan Zhang wrote: > > This patch provides the initial implementation of the scheduler poll mode > > driver using DPDK cryptodev framework. > > > > Scheduler PMD is used to schedule and enqueue the crypto ops to the > > hardware and/or software crypto devices attached to it (slaves). The > > dequeue operation from the slave(s), and the possible dequeued crypto op > > reordering, are then carried out by the scheduler. > > > > As the initial version, the scheduler PMD currently supports only the > > Round-robin mode, which distributes the enqueued burst of crypto ops > > among its slaves in a round-robin manner. This mode may help to fill > > the throughput gap between the physical core and the existing cryptodevs > > to increase the overall performance. Moreover, the scheduler PMD is > > provided the APIs for user to create his/her own scheduler. > > > > Build instructions: > > To build DPDK with CRYTPO_SCHEDULER_PMD the user is required to set > > CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER=y in config/common_base > > > > Notice: > > - Scheduler PMD shares same EAL commandline options as other cryptodevs. > > However, apart from socket_id, the rest of cryptodev options are > > ignored. The scheduler PMD's max_nb_queue_pairs and max_nb_sessions > > options are set as the minimum values of the attached slaves'. For > > example, a scheduler cryptodev is attached 2 cryptodevs with > > max_nb_queue_pairs of 2 and 8, respectively. The scheduler cryptodev's > > max_nb_queue_pairs will be automatically updated as 2. > > > > - In addition, an extra option "slave" is added. The user can attach one > > or more slave cryptodevs initially by passing their names with this > > option. Here is an example: > > > > ... --vdev "crypto_aesni_mb_pmd,name=aesni_mb_1" --vdev "crypto_aesni_ > > mb_pmd,name=aesni_mb_2" --vdev "crypto_scheduler_pmd,slave=aesni_mb_1, > > slave=aesni_mb_2" ... > > > > Remember the software cryptodevs to be attached shall be declared before > > the scheduler PMD, otherwise the scheduler will fail to locate the > > slave(s) and report error. > > > > - The scheduler cryptodev cannot be started unless the scheduling mode > > is set and at least one slave is attached. Also, to configure the > > scheduler in the run-time, like attach/detach slave(s), change > > scheduling mode, or enable/disable crypto op ordering, one should stop > > the scheduler first, otherwise an error will be returned. > > > > Changes in v5: > > Fixed EOF whitespace warning. > > Updated Copyright. > > > > Changes in v4: > > Fixed a few bugs. > > Added slave EAL commandline option support. > > > > Changes in v3: > > Fixed config/common_base. > > > > Changes in v2: > > New approaches in API to suit future scheduling modes. > > > > Signed-off-by: Fan Zhang > > Signed-off-by: Declan Doherty > > --- > > config/common_base | 6 + > > drivers/crypto/Makefile | 1 + > > drivers/crypto/scheduler/Makefile | 66 +++ > > drivers/crypto/scheduler/rte_cryptodev_scheduler.c | 460 +++++++++++++++++++ > > drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 167 +++++++ > > .../scheduler/rte_cryptodev_scheduler_operations.h | 71 +++ > > .../scheduler/rte_pmd_crypto_scheduler_version.map | 12 + > > drivers/crypto/scheduler/scheduler_pmd.c | 360 +++++++++++++++ > > drivers/crypto/scheduler/scheduler_pmd_ops.c | 489 +++++++++++++++++++++ > > drivers/crypto/scheduler/scheduler_pmd_private.h | 115 +++++ > > drivers/crypto/scheduler/scheduler_roundrobin.c | 417 ++++++++++++++++++ > > lib/librte_cryptodev/rte_cryptodev.h | 4 + > > mk/rte.app.mk | 3 +- > > 13 files changed, 2170 insertions(+), 1 deletion(-) > > create mode 100644 drivers/crypto/scheduler/Makefile > > create mode 100644 drivers/crypto/scheduler/rte_cryptodev_scheduler.c > > create mode 100644 drivers/crypto/scheduler/rte_cryptodev_scheduler.h > > create mode 100644 drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h > > create mode 100644 drivers/crypto/scheduler/rte_pmd_crypto_scheduler_version.map > > create mode 100644 drivers/crypto/scheduler/scheduler_pmd.c > > create mode 100644 drivers/crypto/scheduler/scheduler_pmd_ops.c > > create mode 100644 drivers/crypto/scheduler/scheduler_pmd_private.h > > create mode 100644 drivers/crypto/scheduler/scheduler_roundrobin.c [...] > > Acked-by: Declan Doherty NACK I could argue it is too big for an unique patch, but it's even worst when you ack without stripping the long patch. My mouse is out of order after this long scroll looking for a comment.