All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tdu@semihalf.com>
To: dev@dpdk.org
Cc: mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com,
	Tomasz Duszynski <tdu@semihalf.com>,
	Jacek Siuda <jck@semihalf.com>
Subject: [PATCH 6/8] doc: add mrvl crypto pmd documentation
Date: Tue, 26 Sep 2017 11:40:03 +0200	[thread overview]
Message-ID: <1506418805-12117-7-git-send-email-tdu@semihalf.com> (raw)
In-Reply-To: <1506418805-12117-1-git-send-email-tdu@semihalf.com>

Add documentation for the MRVL CRYPTO PMD driver.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <jck@semihalf.com>
---
 doc/guides/cryptodevs/features/mrvl.ini |  42 +++++++
 doc/guides/cryptodevs/index.rst         |   1 +
 doc/guides/cryptodevs/mrvl.rst          | 198 ++++++++++++++++++++++++++++++++
 3 files changed, 241 insertions(+)
 create mode 100644 doc/guides/cryptodevs/features/mrvl.ini
 create mode 100644 doc/guides/cryptodevs/mrvl.rst

diff --git a/doc/guides/cryptodevs/features/mrvl.ini b/doc/guides/cryptodevs/features/mrvl.ini
new file mode 100644
index 0000000..6d2fe6a
--- /dev/null
+++ b/doc/guides/cryptodevs/features/mrvl.ini
@@ -0,0 +1,42 @@
+; Supported features of the 'mrvl' crypto driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Symmetric crypto       = Y
+Sym operation chaining = Y
+
+;
+; Supported crypto algorithms of a default crypto driver.
+;
+[Cipher]
+AES CBC (128)  = Y
+AES CBC (192)  = Y
+AES CBC (256)  = Y
+AES CTR (128)  = Y
+AES CTR (192)  = Y
+AES CTR (256)  = Y
+3DES CBC       = Y
+3DES CTR       = Y
+
+;
+; Supported authentication algorithms of a default crypto driver.
+;
+[Auth]
+MD5          = Y
+MD5 HMAC     = Y
+SHA1         = Y
+SHA1 HMAC    = Y
+SHA256       = Y
+SHA256 HMAC  = Y
+SHA384       = Y
+SHA384 HMAC  = Y
+SHA512       = Y
+SHA512 HMAC  = Y
+AES GMAC     = Y
+
+;
+; Supported AEAD algorithms of a default crypto driver.
+;
+[AEAD]
+AES GCM (128) = Y
diff --git a/doc/guides/cryptodevs/index.rst b/doc/guides/cryptodevs/index.rst
index 361b82d..a8ee0eb 100644
--- a/doc/guides/cryptodevs/index.rst
+++ b/doc/guides/cryptodevs/index.rst
@@ -42,6 +42,7 @@ Crypto Device Drivers
     dpaa2_sec
     kasumi
     openssl
+    mrvl
     null
     scheduler
     snow3g
diff --git a/doc/guides/cryptodevs/mrvl.rst b/doc/guides/cryptodevs/mrvl.rst
new file mode 100644
index 0000000..f5a83dc
--- /dev/null
+++ b/doc/guides/cryptodevs/mrvl.rst
@@ -0,0 +1,198 @@
+..  BSD LICENSE
+    Copyright(c) 2017 Semihalf. All rights reserved.
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+      * Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in
+        the documentation and/or other materials provided with the
+        distribution.
+      * Neither the name of Semihalf nor the names of its
+        contributors may be used to endorse or promote products derived
+        from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+MRVL Crypto Poll Mode Driver
+============================
+
+The MRVL CRYPTO PMD (**librte_crypto_mrvl_pmd**) provides poll mode crypto driver
+support by utilizing MUSDK library, which provides cryptographic operations
+acceleration by using Security Acceleration Engine (EIP197) directly from
+user-space with minimum overhead and high performance.
+
+Features
+--------
+
+MRVL CRYPTO PMD has support for:
+
+* Symmetric crypto
+* Sym operation chaining
+* AES CBC (128)
+* AES CBC (192)
+* AES CBC (256)
+* AES CTR (128)
+* AES CTR (192)
+* AES CTR (256)
+* 3DES CBC
+* 3DES CTR
+* MD5
+* MD5 HMAC
+* SHA1
+* SHA1 HMAC
+* SHA256
+* SHA256 HMAC
+* SHA384
+* SHA384 HMAC
+* SHA512
+* SHA512 HMAC
+* AES GCM (128)
+
+Limitations
+-----------
+
+* Hardware only supports scenarios where ICV (digest buffer) is placed just
+  after the authenticated data. Other placement will result in error.
+
+Installation
+------------
+
+MRVL CRYPTO PMD driver compilation is disabled by default due to external dependencies.
+Currently there are two driver specific compilation options in
+``config/common_base`` available:
+
+- ``CONFIG_RTE_LIBRTE_MRVL_CRYPTO`` (default ``n``)
+
+    Toggle compilation of the librte_pmd_mrvl driver.
+
+- ``CONFIG_RTE_LIBRTE_MRVL_CRYPTO_DEBUG`` (default ``n``)
+
+    Toggle display of debugging messages.
+
+During compilation external MUSDK library, which provides direct access
+to Marvell's EIP197 cryptographic engine, is necessary. Library sources are
+available `here <https://github.com/MarvellEmbeddedProcessors/musdk-marvell/tree/musdk-armada-17.08>`_.
+
+Alternatively, prebuilt library can be downloaded from
+`Marvell Extranet <https://extranet.marvell.com>`_. Once approval has been
+granted, library can be found by typing ``musdk`` in the search box.
+
+For MUSDK library build instruction please refer to ``doc/musdk_get_started.txt``
+in library sources directory.
+
+Initialization
+--------------
+
+After successfully building MRVL CRYPTO PMD, the following modules need to be
+loaded:
+
+.. code-block:: console
+
+   insmod musdk_uio.ko
+   insmod mvpp2x_sysfs.ko
+   insmod mv_pp_uio.ko
+   insmod mv_sam_uio.ko
+   insmod crypto_safexcel.ko
+
+The following parameters (all optional) are exported by the driver:
+
+* max_nb_queue_pairs: maximum number of queue pairs in the device (8 by default).
+* max_nb_sessions: maximum number of sessions that can be created (2048 by default).
+* socket_id: socket on which to allocate the device resources on.
+
+l2fwd-crypto example application can be used to verify MRVL CRYPTO PMD
+operation:
+
+.. code-block:: console
+
+   ./l2fwd-crypto -c 0x3 --vdev=eth_mrvl,iface=eth0 --vdev=cryptodev_mrvl_pmd
+
+Example output:
+
+.. code-block:: console
+
+   [...]
+   PMD:   Max number of queue pairs = 8
+   PMD:   Max number of sessions = 2048
+   [ERROR] Dma object already exits.
+   [INFO] DMA buffers allocated for 2048 sessions (256 bytes)
+   Initializing port 0... [ERROR] [pp2_ppio_flush_vlan] routine not supported yet!
+   PMD: Failed to flush vlan list
+   [INFO] PORT: Port0 - link is up
+   [INFO] ---- GOP ID 0 configuration ----
+   [INFO] Port mode               : KR
+   [INFO] MAC status              : disabled
+   [INFO] Link status             : link up
+   [INFO] Port speed              : 10G
+   [INFO] Port duplex             : full
+   [INFO] Port: Egress enable tx_port_num=16 qmap=0x1
+   [INFO] PORT: Port0 - link is up
+   [INFO] ---- GOP ID 0 configuration ----
+   [INFO] Port mode               : KR
+   [INFO] MAC status              : disabled
+   [INFO] Link status             : link up
+   [INFO] Port speed              : 10G
+   [INFO] Port duplex             : full
+   [INFO] Port: Egress enable tx_port_num=16 qmap=0x1
+   [INFO] PORT: Port0 - link is down
+   [INFO] ---- GOP ID 0 configuration ----
+   [INFO] Port mode               : KR
+   [INFO] MAC status              : disabled
+   [INFO] Link status             : link down
+   [INFO] Port speed              : 10G
+   [INFO] Port duplex             : full
+   [INFO] Port: Egress enable tx_port_num=16 qmap=0x1
+   Port 0, MAC address: 00:50:43:02:21:20
+
+
+   Checking link statusdone
+   Port 0 Link Up - speed 0 Mbps - full-duplex
+   Lcore 0: RX port 0
+   [INFO] eip197: 0:0 registers: paddr: 0xf2880000, vaddr: 0x0x7f25480000
+   [INFO] DMA buffer (16448 bytes) for CDR #0 allocated: paddr = 0xb0525e00, \
+   vaddr = 0x7f21b24e00
+   [INFO] DMA buffer (16448 bytes) for RDR #0 allocated: paddr = 0xb0529f00, \
+   vaddr = 0x7f21b28f00
+   [INFO] DMA buffers allocated for 257 operations. Tokens - 256 bytes
+   Lcore 0: cryptodev 0
+   L2FWD: lcore 1 has nothing to do
+   L2FWD: entering main loop on lcore 0
+   L2FWD:  -- lcoreid=0 portid=0
+   L2FWD:  -- lcoreid=0 cryptoid=0
+   Options:-
+   nportmask: ffffffff
+   ports per lcore: 1
+   refresh period : 10000
+   single lcore mode: disabled
+   stats_printing: enabled
+   sessionless crypto: disabled
+
+   Crypto chain: Input --> Encrypt --> Auth generate --> Output
+
+   ---- Cipher information ---
+   Algorithm: aes-cbc
+   Cipher key: at [0x7f253cee80], len=16
+   00000000: C2 B1 90 57 16 32 A8 56 5A 16 CD A5 D1 24 64 C3 | ...W.2.VZ....$d.
+   IV: at [0x7f253cec80], len=16
+   00000000: F7 98 65 93 94 22 2C 8F A6 3C F1 F2 7C 88 FF 5D | ..e..",..<..|..]
+
+   ---- Authentication information ---
+   Algorithm: sha1-hmac
+   Auth key: at [0x7f253ced80], len=16
+   00000000: 8B 32 09 22 BF A7 AA 0D 0C 65 A3 2E 64 6E 74 44 | .2.".....e..dntD
+   AAD: at [0x7f253ceb80], len=
-- 
2.7.4

  parent reply	other threads:[~2017-09-26  9:40 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26  9:39 [PATCH 0/8] add net/crypto mrvl pmd drivers Tomasz Duszynski
2017-09-26  9:39 ` [PATCH 1/8] app: link the whole rte_cfgfile library Tomasz Duszynski
2017-09-26 14:31   ` Bruce Richardson
2017-09-27  7:36     ` Tomasz Duszynski
2017-09-27 12:01       ` Bruce Richardson
2017-09-26  9:39 ` [PATCH 2/8] net/mrvl: add mrvl net pmd driver Tomasz Duszynski
2017-09-26  9:40 ` [PATCH 3/8] doc: add mrvl net pmd documentation Tomasz Duszynski
2017-09-26  9:40 ` [PATCH 4/8] maintainers: add maintainers for the mrvl net pmd Tomasz Duszynski
2017-09-26  9:40 ` [PATCH 5/8] crypto/mrvl: add mrvl crypto pmd driver Tomasz Duszynski
2017-09-26  9:40 ` Tomasz Duszynski [this message]
2017-09-26  9:40 ` [PATCH 7/8] maintainers: add maintainers for the mrvl crypto pmd Tomasz Duszynski
2017-09-26  9:40 ` [PATCH 8/8] test: add mrvl crypto pmd unit tests Tomasz Duszynski
2017-09-27  9:40 ` [PATCH 0/8] add net/crypto mrvl pmd drivers De Lara Guarch, Pablo
2017-09-27 10:59   ` Tomasz Duszynski
2017-09-28 10:22 ` [PATCH v2 0/4] add net mrvl pmd driver Tomasz Duszynski
2017-09-28 10:22   ` [PATCH v2 1/4] app: link the whole rte_cfgfile library Tomasz Duszynski
2017-10-03 11:51     ` [PATCH v3 0/4] add net mrvl pmd driver Tomasz Duszynski
2017-10-03 11:51       ` [PATCH v3 1/4] app: link the whole rte_cfgfile library Tomasz Duszynski
2017-10-03 11:51       ` [PATCH v3 2/4] net/mrvl: add mrvl net pmd driver Tomasz Duszynski
2017-10-04  0:24         ` Ferruh Yigit
2017-10-04  8:59           ` Tomasz Duszynski
2017-10-04 16:59             ` Ferruh Yigit
2017-10-05  8:43               ` Tomasz Duszynski
2017-10-05 17:29                 ` Ferruh Yigit
2017-10-06  6:41                   ` Tomasz Duszynski
2017-10-10 21:25                 ` Thomas Monjalon
2017-10-04  0:28         ` Ferruh Yigit
2017-10-04 13:19           ` Tomasz Duszynski
2017-10-05 17:37             ` Ferruh Yigit
2017-10-03 11:51       ` [PATCH v3 3/4] doc: add mrvl net pmd documentation Tomasz Duszynski
2017-10-04  0:29         ` Ferruh Yigit
2017-10-04  7:53           ` Tomasz Duszynski
2017-10-03 11:51       ` [PATCH v3 4/4] maintainers: add maintainers for the mrvl net pmd Tomasz Duszynski
2017-10-09 15:00       ` [PATCH v4 00/16] add net mrvl pmd driver Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 01/16] app: link the whole rte_cfgfile library Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 02/16] net/mrvl: add mrvl net pmd driver skeleton Tomasz Duszynski
2017-10-11 13:38           ` Thomas Monjalon
2017-10-12  6:51             ` Tomasz Duszynski
2017-10-12  7:59               ` Vincent JARDIN
2017-10-12 12:14                 ` Jacek Siuda
2017-10-12 13:57                   ` Vincent JARDIN
2017-10-09 15:00         ` [PATCH v4 03/16] net/mrvl: add rx/tx support Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 04/16] net/mrvl: add link update Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 05/16] net/mrvl: add link speed capabilities Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 06/16] net/mrvl: add support for updating mtu Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 07/16] net/mrvl: add jumbo frame support Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 08/16] net/mrvl: add support for promiscuous and allmulticast modes Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 09/16] net/mrvl: add support for mac filtering Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 10/16] net/mrvl: add rss hashing support Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 11/16] net/mrvl: add support for vlan filtering Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 12/16] net/mrvl: add crc, l3 and l4 offloads support Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 13/16] net/mrvl: add packet type parsing support Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 14/16] net/mrvl: add basic stats support Tomasz Duszynski
2017-10-09 15:00         ` [PATCH v4 15/16] maintainers: add maintainers for the mrvl net pmd Tomasz Duszynski
2017-10-09 19:02           ` Ferruh Yigit
2017-10-09 19:09             ` Marcin Wojtas
2017-10-09 19:12               ` Ferruh Yigit
2017-10-10  5:47             ` Tomasz Duszynski
2017-10-10  3:20           ` Jianbo Liu
2017-10-10  4:38             ` Ferruh Yigit
2017-10-09 15:00         ` [PATCH v4 16/16] doc: add mrvl net pmd documentation Tomasz Duszynski
2017-10-09 20:54           ` Ferruh Yigit
2017-10-10  5:51             ` Tomasz Duszynski
2017-10-11 14:27           ` Thomas Monjalon
2017-10-12  2:01             ` Thomas Monjalon
2017-10-09 20:59         ` [PATCH v4 00/16] add net mrvl pmd driver Ferruh Yigit
2017-10-10  0:25           ` Ferruh Yigit
2017-10-10  7:07             ` Tomasz Duszynski
2017-10-10  5:55           ` Tomasz Duszynski
2017-10-12  1:51           ` Ferruh Yigit
2017-10-12  2:37             ` [PATCH] doc: add build steps to mrvl NIC guide Thomas Monjalon
2017-10-12  6:28               ` Tomasz Duszynski
2017-10-12  8:02                 ` Thomas Monjalon
2017-10-12  6:07             ` [PATCH v4 00/16] add net mrvl pmd driver Tomasz Duszynski
2017-09-28 10:22   ` [PATCH v2 2/4] net/mrvl: add mrvl net " Tomasz Duszynski
2017-09-29 15:38     ` Stephen Hemminger
2017-10-02 11:08       ` Bruce Richardson
2017-10-03  6:33         ` Tomasz Duszynski
2017-10-03  6:23       ` Tomasz Duszynski
2017-09-28 10:22   ` [PATCH v2 3/4] doc: add mrvl net pmd documentation Tomasz Duszynski
2017-09-28 10:22   ` [PATCH v2 4/4] maintainers: add maintainers for the mrvl net pmd Tomasz Duszynski
2017-09-28 11:06   ` [PATCH v2 0/4] add net mrvl pmd driver Ferruh Yigit
2017-09-28 11:40     ` Amit Tomer
2017-09-28 12:01       ` Marcin Wojtas
2017-09-28 10:23 ` [PATCH v2 0/4] add crypto " Tomasz Duszynski
2017-09-28 10:23   ` [PATCH v2 1/4] crypto/mrvl: add mrvl crypto " Tomasz Duszynski
2017-10-05 15:01     ` De Lara Guarch, Pablo
2017-10-06  7:24       ` Tomasz Duszynski
2017-10-05 15:47     ` Bruce Richardson
2017-10-06  7:05       ` Tomasz Duszynski
2017-09-28 10:23   ` [PATCH v2 2/4] doc: add mrvl crypto pmd documentation Tomasz Duszynski
2017-10-05 14:45     ` De Lara Guarch, Pablo
2017-10-06  8:06       ` Tomasz Duszynski
2017-09-28 10:23   ` [PATCH v2 3/4] maintainers: add maintainers for the mrvl crypto pmd Tomasz Duszynski
2017-09-28 10:23   ` [PATCH v2 4/4] test: add mrvl crypto pmd unit tests Tomasz Duszynski
2017-10-07 20:28   ` [PATCH v3 0/4] add crypto mrvl pmd driver Tomasz Duszynski
2017-10-07 20:28     ` [PATCH v3 1/4] crypto/mrvl: add mrvl crypto " Tomasz Duszynski
2017-10-10 10:16       ` De Lara Guarch, Pablo
2017-10-10 10:25         ` Tomasz Duszynski
2017-10-07 20:28     ` [PATCH v3 2/4] doc: add mrvl crypto pmd documentation Tomasz Duszynski
2017-10-07 20:28     ` [PATCH v3 3/4] maintainers: add maintainers for the mrvl crypto pmd Tomasz Duszynski
2017-10-07 20:28     ` [PATCH v3 4/4] test: add mrvl crypto pmd unit tests Tomasz Duszynski
2017-10-10 10:44       ` De Lara Guarch, Pablo
2017-10-10 10:57         ` Tomasz Duszynski
2017-10-10 12:17     ` [PATCH v4 0/4] add crypto mrvl pmd driver Tomasz Duszynski
2017-10-10 12:17       ` [PATCH v4 1/4] crypto/mrvl: add mrvl crypto " Tomasz Duszynski
2017-10-10 12:17       ` [PATCH v4 2/4] doc: add mrvl crypto pmd documentation Tomasz Duszynski
2017-10-10 12:17       ` [PATCH v4 3/4] maintainers: add maintainers for the mrvl crypto pmd Tomasz Duszynski
2017-10-10 12:17       ` [PATCH v4 4/4] test: add mrvl crypto pmd unit tests Tomasz Duszynski
2017-10-12 12:11       ` [PATCH v4 0/4] add crypto mrvl pmd driver De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506418805-12117-7-git-send-email-tdu@semihalf.com \
    --to=tdu@semihalf.com \
    --cc=dev@dpdk.org \
    --cc=dima@marvell.com \
    --cc=jck@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=nsamsono@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.