Skip to contentSkip to conversation

crypto/scheduler: add more EAL options

PATCH Superseded Fan Zhang 3 participants 7 messages Feb 20, 2017 – Apr 4, 2017 Crypto API

lore
Share & tools
lore

Fan Zhang

author
#0 lore raw

PATCH 1/1 crypto/scheduler: add more EAL options

This patch adds initial mode and ordering enable/disable EAL options to cryptodev scheduler PMD.

---
 drivers/crypto/scheduler/rte_cryptodev_scheduler.h |   3 +
 drivers/crypto/scheduler/scheduler_pmd.c           | 118 ++++++++++++++++++++-
 2 files changed, 118 insertions(+), 3 deletions(-)
drivers/crypto/scheduler/rte_cryptodev_scheduler.h +3 -0
index 7ef44e7..043d25e 100644
@@ -40,6 +40,9 @@
 extern "C" {
 #endif
 
+/* round-robin scheduling mode */
+#define SCHEDULER_MODE_ROUND_ROBIN		(round-robin)
+
 /**
  * Crypto scheduler PMD operation modes
  */
drivers/crypto/scheduler/scheduler_pmd.c +115 -3

173 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

Hi Fan,

Quoted 17 lines

-----Original Message-----
From: Zhang, Roy Fan
Sent: Monday, February 20, 2017 2:31 PM
To: [email protected]
Cc: De Lara Guarch, Pablo
Subject: [PATCH] crypto/scheduler: add more EAL options

This patch adds initial mode and ordering enable/disable EAL options to cryptodev scheduler PMD.

---
 drivers/crypto/scheduler/rte_cryptodev_scheduler.h |   3 +
 drivers/crypto/scheduler/scheduler_pmd.c           | 118
++++++++++++++++++++-
 2 files changed, 118 insertions(+), 3 deletions(-)

...

Quoted 7 lines
 #define RTE_CRYPTODEV_VDEV_NAME
	("name")
 #define RTE_CRYPTODEV_VDEV_SLAVE			("slave")
+#define RTE_CRYPTODEV_VDEV_MODE
	("mode")

+#define RTE_CRYPTODEV_VDEV_ORDERING ("ordering")

Could you align all this macros?

author
#2 lore raw

PATCH v2 1/1 crypto/scheduler: add more EAL options

In reply to Fan Zhang

This patch adds initial mode and ordering enable/disable EAL options to cryptodev scheduler PMD.

---

v2:
- Updated for added scheduling modes
- Updated documentation

 doc/guides/cryptodevs/scheduler.rst                |  14 +++
 drivers/crypto/scheduler/rte_cryptodev_scheduler.h |   7 ++
 drivers/crypto/scheduler/scheduler_pmd.c           | 132 +++++++++++++++++++--
 3 files changed, 144 insertions(+), 9 deletions(-)
doc/guides/cryptodevs/scheduler.rst +14 -0
index d516ba8..8b45a13 100644
@@ -94,6 +94,14 @@ two calls:
   here. Multiple cryptodevs can be attached initially by presenting this
   parameter multiple times.
 
+* mode: Specify the scheduling mode of the PMD. The supported scheduling
+  mode parameter values are specified in the "Cryptodev Scheduler Modes
+  Overview" section.
+
+* ordering: Specify the status of the crypto operations ordering feature.
+  The value of this paramter can be "enable" or "disable". This feature
+  is disabled by default.
+
 Example:
 
 .. code-block:: console
@@ -122,6 +130,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_ROUNDROBIN:**
 
+   *Initialization mode parameter*: **round-robin**
+
    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
@@ -129,6 +139,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_PKT_SIZE_DISTR:**
 
+   *Initialization mode parameter*: **packet-size-distr**
+
    Packet-size based distribution mode, which works with 2 slaves, the primary
    slave and the secondary slave, and distributes the enqueued crypto
    operations to them based on their data lengths. A crypto operation will be
@@ -144,6 +156,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_FAILOVER:**
 
+   *Initialization mode parameter*: **fail-over**
+
    Fail-over mode, which works with 2 slaves, the primary slave and the
    secondary slave. In this mode, the scheduler will enqueue the incoming
    crypto operation burst to the primary slave. When one or more crypto
drivers/crypto/scheduler/rte_cryptodev_scheduler.h +7 -0
index 306dfea..fce746e 100644
@@ -40,6 +40,13 @@
 extern "C" {
 #endif
 
+/* round-robin scheduling mode */
+#define SCHEDULER_MODE_NAME_ROUND_ROBIN		round-robin
+/* packet-size based distribution scheduling mode */
+#define SCHEDULER_MODE_NAME_PKT_SIZE_DISTR	packet-size-distr
+/* fail-over mode */
+#define SCHEDULER_MODE_NAME_FAIL_OVER		fail-over
+
 /**
  * Crypto scheduler PMD operation modes
  */
drivers/crypto/scheduler/scheduler_pmd.c +123 -9

215 lines not on this page · raw message

Signature · 1 line
2.7.4
author
#3 lore raw

PATCH v3 1/1 crypto/scheduler: add more EAL options

This patch adds initial mode and ordering enable/disable EAL options to cryptodev scheduler PMD.

---

v3:
- Fixed mode not set bug

v2:
- Updated for added scheduling modes
- Updated documentation

 doc/guides/cryptodevs/scheduler.rst                |  14 +++
 drivers/crypto/scheduler/rte_cryptodev_scheduler.h |   7 ++
 drivers/crypto/scheduler/scheduler_pmd.c           | 140 +++++++++++++++++++--
 3 files changed, 152 insertions(+), 9 deletions(-)
doc/guides/cryptodevs/scheduler.rst +14 -0
index d516ba8..8b45a13 100644
@@ -94,6 +94,14 @@ two calls:
   here. Multiple cryptodevs can be attached initially by presenting this
   parameter multiple times.
 
+* mode: Specify the scheduling mode of the PMD. The supported scheduling
+  mode parameter values are specified in the "Cryptodev Scheduler Modes
+  Overview" section.
+
+* ordering: Specify the status of the crypto operations ordering feature.
+  The value of this paramter can be "enable" or "disable". This feature
+  is disabled by default.
+
 Example:
 
 .. code-block:: console
@@ -122,6 +130,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_ROUNDROBIN:**
 
+   *Initialization mode parameter*: **round-robin**
+
    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
@@ -129,6 +139,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_PKT_SIZE_DISTR:**
 
+   *Initialization mode parameter*: **packet-size-distr**
+
    Packet-size based distribution mode, which works with 2 slaves, the primary
    slave and the secondary slave, and distributes the enqueued crypto
    operations to them based on their data lengths. A crypto operation will be
@@ -144,6 +156,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_FAILOVER:**
 
+   *Initialization mode parameter*: **fail-over**
+
    Fail-over mode, which works with 2 slaves, the primary slave and the
    secondary slave. In this mode, the scheduler will enqueue the incoming
    crypto operation burst to the primary slave. When one or more crypto
drivers/crypto/scheduler/rte_cryptodev_scheduler.h +7 -0
index 306dfea..fce746e 100644
@@ -40,6 +40,13 @@
 extern "C" {
 #endif
 
+/* round-robin scheduling mode */
+#define SCHEDULER_MODE_NAME_ROUND_ROBIN		round-robin
+/* packet-size based distribution scheduling mode */
+#define SCHEDULER_MODE_NAME_PKT_SIZE_DISTR	packet-size-distr
+/* fail-over mode */
+#define SCHEDULER_MODE_NAME_FAIL_OVER		fail-over
+
 /**
  * Crypto scheduler PMD operation modes
  */
drivers/crypto/scheduler/scheduler_pmd.c +131 -9

222 lines not on this page · raw message

Signature · 1 line
2.7.4
author
#4 lore raw

PATCH v4 1/1 crypto/scheduler: add more EAL options

This patch adds initial mode and ordering enable/disable EAL options to cryptodev scheduler PMD.

---

v4:
- Fixed a typo
- Fixed a mode check bug during initialization

v3:
- Fixed mode not set bug

v2:
- Updated for added scheduling modes
- Updated documentation

 doc/guides/cryptodevs/scheduler.rst                |  14 +++
 drivers/crypto/scheduler/rte_cryptodev_scheduler.h |   7 ++
 drivers/crypto/scheduler/scheduler_pmd.c           | 140 +++++++++++++++++++--
 3 files changed, 152 insertions(+), 9 deletions(-)
doc/guides/cryptodevs/scheduler.rst +14 -0
index d516ba8..0482331 100644
@@ -94,6 +94,14 @@ two calls:
   here. Multiple cryptodevs can be attached initially by presenting this
   parameter multiple times.
 
+* mode: Specify the scheduling mode of the PMD. The supported scheduling
+  mode parameter values are specified in the "Cryptodev Scheduler Modes
+  Overview" section.
+
+* ordering: Specify the status of the crypto operations ordering feature.
+  The value of this parameter can be "enable" or "disable". This feature
+  is disabled by default.
+
 Example:
 
 .. code-block:: console
@@ -122,6 +130,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_ROUNDROBIN:**
 
+   *Initialization mode parameter*: **round-robin**
+
    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
@@ -129,6 +139,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_PKT_SIZE_DISTR:**
 
+   *Initialization mode parameter*: **packet-size-distr**
+
    Packet-size based distribution mode, which works with 2 slaves, the primary
    slave and the secondary slave, and distributes the enqueued crypto
    operations to them based on their data lengths. A crypto operation will be
@@ -144,6 +156,8 @@ operation:
 
 *   **CDEV_SCHED_MODE_FAILOVER:**
 
+   *Initialization mode parameter*: **fail-over**
+
    Fail-over mode, which works with 2 slaves, the primary slave and the
    secondary slave. In this mode, the scheduler will enqueue the incoming
    crypto operation burst to the primary slave. When one or more crypto
drivers/crypto/scheduler/rte_cryptodev_scheduler.h +7 -0
index 306dfea..fce746e 100644
@@ -40,6 +40,13 @@
 extern "C" {
 #endif
 
+/* round-robin scheduling mode */
+#define SCHEDULER_MODE_NAME_ROUND_ROBIN		round-robin
+/* packet-size based distribution scheduling mode */
+#define SCHEDULER_MODE_NAME_PKT_SIZE_DISTR	packet-size-distr
+/* fail-over mode */
+#define SCHEDULER_MODE_NAME_FAIL_OVER		fail-over
+
 /**
  * Crypto scheduler PMD operation modes
  */
drivers/crypto/scheduler/scheduler_pmd.c +131 -9

222 lines not on this page · raw message

Signature · 1 line
2.7.4
#6 lore raw
Quoted 13 lines

-----Original Message-----
From: Doherty, Declan
Sent: Tuesday, April 04, 2017 2:38 PM
To: Zhang, Roy Fan; [email protected]
Cc: De Lara Guarch, Pablo; Gonzalez Monroy, Sergio
Subject: Re: [PATCH v4] crypto/scheduler: add more EAL options

Quoted 3 lines · Fan Zhang

This patch adds initial mode and ordering enable/disable EAL options to cryptodev scheduler PMD.

Quoted 7 lines
Quoted 2 lines

---

...

Quoted 1 line

Applied to dpdk-next-crypto.
Thanks,

Pablo