patch 'cryptodev: fix sym session mempool creation description' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:59:25 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/01/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=ce54658be7c99586d9430c420a6475bd79b3d608

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ce54658be7c99586d9430c420a6475bd79b3d608 Mon Sep 17 00:00:00 2001
From: Fan Zhang <fanzhang.oss at gmail.com>
Date: Fri, 6 Jan 2023 13:05:00 +0000
Subject: [PATCH] cryptodev: fix sym session mempool creation description
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 9a8569ac0f9ee929d78f4353946fc6bdece21082 ]

After the session mempool creation API is changed, some
description is no longer valid. This patch fixes the
descriptions in both API comment and the programmer's guide.

Fixes: bdce2564dbf7 ("cryptodev: rework session framework")

Signed-off-by: Fan Zhang <fanzhang.oss at gmail.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst       |  42 +-
 .../prog_guide/img/cryptodev_sym_sess.svg     | 417 ------------------
 lib/cryptodev/rte_cryptodev.h                 |  17 +-
 3 files changed, 27 insertions(+), 449 deletions(-)
 delete mode 100644 doc/guides/prog_guide/img/cryptodev_sym_sess.svg

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 01aad842a9..0d9f7059ea 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -499,37 +499,29 @@ a flow. Crypto sessions cache this immutable data in a optimal way for the
 underlying PMD and this allows further acceleration of the offload of
 Crypto workloads.

-.. figure:: img/cryptodev_sym_sess.*
-
 The Crypto device framework provides APIs to create session mempool and allocate
 and initialize sessions for crypto devices, where sessions are mempool objects.
 The application has to use ``rte_cryptodev_sym_session_pool_create()`` to
-create the session header mempool that creates a mempool with proper element
-size automatically and stores necessary information for safely accessing the
-session in the mempool's private data field.
-
-To create a mempool for storing session private data, the application has two
-options. The first is to create another mempool with elt size equal to or
-bigger than the maximum session private data size of all crypto devices that
-will share the same session header. The creation of the mempool shall use the
-traditional ``rte_mempool_create()`` with the correct ``elt_size``. The other
-option is to change the ``elt_size`` parameter in
-``rte_cryptodev_sym_session_pool_create()`` to the correct value. The first
-option is more complex to implement but may result in better memory usage as
-a session header normally takes smaller memory footprint as the session private
-data.
+create the session mempool header and the private data with the size specified
+by the user through the ``elt_size`` parameter in the function.
+The session private data is for the driver to initialize and access
+during crypto operations, hence the ``elt_size`` should be big enough
+for all drivers that will share this mempool.
+To obtain the proper session private data size of a crypto device,
+the user can call ``rte_cryptodev_sym_get_private_session_size()`` function.
+In case of heterogeneous crypto devices which will share the same session mempool,
+the maximum session private data size of them should be passed.

 Once the session mempools have been created, ``rte_cryptodev_sym_session_create()``
-is used to allocate an uninitialized session from the given mempool.
-The session then must be initialized using ``rte_cryptodev_sym_session_init()``
-for each of the required crypto devices. A symmetric transform chain
-is used to specify the operation and its parameters. See the section below for
-details on transforms.
+is used to allocate and initialize the session from the given mempool.
+The created session can ONLY be used by the crypto devices sharing the same driver ID
+as the device ID passed into the function as the parameter.
+In addition, a symmetric transform chain is used to specify the operation and its parameters.
+See the section below for details on transforms.

-When a session is no longer used, user must call ``rte_cryptodev_sym_session_clear()``
-for each of the crypto devices that are using the session, to free all driver
-private session data. Once this is done, session should be freed using
-``rte_cryptodev_sym_session_free`` which returns them to their mempool.
+When a session is no longer used, user must call ``rte_cryptodev_sym_session_free()``
+to uninitialize the session data and return the session
+back to the mempool it belongs.


 Transforms and Transform Chaining
diff --git a/doc/guides/prog_guide/img/cryptodev_sym_sess.svg b/doc/guides/prog_guide/img/cryptodev_sym_sess.svg
deleted file mode 100644
index 9b522458c8..0000000000
--- a/doc/guides/prog_guide/img/cryptodev_sym_sess.svg
+++ /dev/null
@@ -1,417 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generated by Microsoft Visio, SVG Export cryptodev_sym_sess.svg Page-1 -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="4.8933434in"
-   height="3.8972795in"
-   viewBox="0 0 352.31955 280.60496"
-   xml:space="preserve"
-   class="st10"
-   version="1.1"
-   id="svg70"
-   sodipodi:docname="cryptodev_sym_sess.svg"
-   style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-rule:evenodd;stroke-linecap:square;stroke-miterlimit:3"
-   inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"><metadata
-     id="metadata74"><rdf:RDF><cc:Work
-         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1920"
-     inkscape:window-height="956"
-     id="namedview72"
-     showgrid="false"
-     inkscape:zoom="1.7495789"
-     inkscape:cx="208.74719"
-     inkscape:cy="170.80248"
-     inkscape:window-x="0"
-     inkscape:window-y="27"
-     inkscape:window-maximized="1"
-     inkscape:current-layer="shape18-1-4" /><style
-     type="text/css"
-     id="style2"><![CDATA[
-		.st1 {fill:url(#grad0-4);stroke:#386288;stroke-width:0.75}
-		.st2 {fill:#386288;font-family:Calibri;font-size:0.833336em}
-		.st3 {visibility:visible}
-		.st4 {fill:#bdd0e9;fill-opacity:0.25;filter:url(#filter_2);stroke:#bdd0e9;stroke-opacity:0.25}
-		.st5 {fill:#a6b6cd;stroke:#41719c;stroke-width:0.75}
-		.st6 {fill:#41719c;font-family:Calibri;font-size:0.833336em}
-		.st7 {fill:#ffffff;stroke:#41719c;stroke-width:0.75}
-		.st8 {font-size:0.799995em}
-		.st9 {font-size:0.799995em;font-weight:bold}
-		.st10 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
-	]]></style><defs
-     id="Patterns_And_Gradients"><marker
-       inkscape:isstock="true"
-       style="overflow:visible"
-       id="marker5421"
-       refX="0"
-       refY="0"
-       orient="auto"
-       inkscape:stockid="Arrow2Lend"><path
-         transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
-         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
-         style="fill:#41719c;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
-         id="path5419"
-         inkscape:connector-curvature="0" /></marker><marker
-       inkscape:stockid="Arrow2Lend"
-       orient="auto"
-       refY="0"
-       refX="0"
-       id="Arrow2Lend"
-       style="overflow:visible"
-       inkscape:isstock="true"><path
-         id="path5004"
-         style="fill:#41719c;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
-         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
-         transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
-         inkscape:connector-curvature="0" /></marker><marker
-       inkscape:stockid="Arrow1Lend"
-       orient="auto"
-       refY="0"
-       refX="0"
-       id="Arrow1Lend"
-       style="overflow:visible"
-       inkscape:isstock="true"><path
-         id="path4986"
-         d="M 0,0 5,-5 -12.5,0 5,5 Z"
-         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
-         transform="matrix(-0.8,0,0,-0.8,-10,0)"
-         inkscape:connector-curvature="0" /></marker><linearGradient
-       id="grad0-4"
-       x1="0"
-       y1="0"
-       x2="1"
-       y2="0"
-       gradientTransform="rotate(60,0.5,0.5)"><stop
-         offset="0"
-         stop-color="#e8ebef"
-         stop-opacity="1"
-         id="stop4" /><stop
-         offset="0.24"
-         stop-color="#f4f5f7"
-         stop-opacity="1"
-         id="stop6" /><stop
-         offset="0.54"
-         stop-color="#feffff"
-         stop-opacity="1"
-         id="stop8" /></linearGradient><filter
-       id="filter_2-4"><feGaussianBlur
-         stdDeviation="2"
-         id="feGaussianBlur12-0" /></filter><linearGradient
-       inkscape:collect="always"
-       xlink:href="#grad0-4"
-       id="linearGradient189"
-       gradientTransform="scale(0.8787489,1.1379815)"
-       x1="-0.42674366"
-       y1="0.98859203"
-       x2="176.71146"
-       y2="0.98859203"
-       gradientUnits="userSpaceOnUse" /><filter
-       id="filter_2-5"><feGaussianBlur
-         stdDeviation="2"
-         id="feGaussianBlur12-8" /></filter><filter
-       id="filter_2-3"><feGaussianBlur
-         stdDeviation="2"
-         id="feGaussianBlur12-2" /></filter><linearGradient
-       inkscape:collect="always"
-       xlink:href="#grad0-4"
-       id="linearGradient189-7"
-       gradientTransform="scale(0.8787489,1.1379815)"
-       x1="-0.42674366"
-       y1="0.98859203"
-       x2="176.71146"
-       y2="0.98859203"
-       gradientUnits="userSpaceOnUse" /><linearGradient
-       inkscape:collect="always"
-       xlink:href="#grad0-4"
-       id="linearGradient500"
-       gradientTransform="matrix(0.87785006,0,0,2.0116303,15.940232,20.619826)"
-       x1="-0.42674366"
-       y1="0.98859203"
-       x2="176.71146"
-       y2="0.98859203"
-       gradientUnits="userSpaceOnUse" /></defs><defs
-     id="Filters"><filter
-       id="filter_2"><feGaussianBlur
-         stdDeviation="2"
-         id="feGaussianBlur12" /></filter></defs><g
-     transform="matrix(1,0,0,0.46836022,-12.05774,-7.0354309)"
-     id="shape18-1"><title
-       id="title18">Rounded Rectangle.12</title><desc
-       id="desc20">Crypto Symmetric Session</desc><path
-       inkscape:connector-curvature="0"
-       style="fill:url(#linearGradient500);stroke:#386288;stroke-width:0.99665654"
-       id="path22"
-       class="st1"
-       d="M 22.713297,378.28219 H 163.92871 a 6.7704177,11.980443 0 0 0 6.76307,-11.96745 V 35.256532 A 6.7704177,11.980443 0 0 0 163.92871,23.271405 H 22.713297 A 6.7704177,11.980443 0 0 0 15.940232,35.256532 V 366.31474 a 6.7704177,11.980443 0 0 0 6.773065,11.96745 z" /></g><g
-     transform="matrix(1,0,0,0.41409874,-2.136529,-9.5289258)"
-     id="shape19-6"><title
-       id="title27">Rounded Rectangle.13</title><desc
-       id="desc29">Private Session Data</desc></g><path
-     d="m 16.65204,162.41822 h 123.21341 a 5.9074955,17.266947 0 0 0 5.90824,-17.2399 V 38.904442 A 5.9074955,17.266947 0 0 0 139.86545,21.635299 H 16.65204 A 5.9074955,17.266947 0 0 0 10.743795,38.904442 V 145.17832 a 5.9074955,17.266947 0 0 0 5.908245,17.2399 z"
-     class="st7"
-     id="path43"
-     inkscape:connector-curvature="0"
-     style="fill:#ffffff;stroke:#41719c;stroke-width:1.28185344" /><rect
-     style="fill:none;fill-opacity:1;stroke:#41719c;stroke-width:0.7760548;stroke-opacity:1"
-     id="rect4604"
-     width="15.963434"
-     height="15.954105"
-     x="25.091528"
-     y="121.37455" /><rect
-     style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
-     id="rect4604-7"
-     width="15.963433"
-     height="15.954105"
-     x="41.054958"
-     y="121.37455" /><rect
-     style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
-     id="rect4604-7-6"
-     width="15.963433"
-     height="15.954105"
-     x="57.018402"
-     y="121.37455" /><rect
-     style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
-     id="rect4604-7-6-9"
-     width="15.963433"
-     height="15.954105"
-     x="72.981834"
-     y="121.37455" /><rect
-     style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
-     id="rect4604-7-6-9-8"
-     width="15.963433"
-     height="15.954105"
-     x="88.945259"
-     y="121.37455" /><rect
-     style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
-     id="rect4604-7-6-9-8-9"
-     width="15.963433"
-     height="15.954105"
-     x="104.90869"
-     y="121.37455" /><rect
-     style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
-     id="rect4604-7-6-9-8-9-6"
-     width="15.963433"
-     height="15.954105"
-     x="120.87212"
-     y="121.37455" /><text
-     x="50.562523"
-     y="49.898369"
-     class="st6"
-     id="text65-3"
-     style="font-size:22.36531448px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#41719c;fill-rule:evenodd;stroke-width:2.23652411;stroke-linecap:square;stroke-miterlimit:3"
-     transform="scale(0.47106923,2.1228302)" />
-<text
-     id="text4129"
-     y="80.842018"
-     x="27.862804"
-     style="font-style:normal;font-weight:normal;font-size:30.00008965px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75000226"
-     xml:space="preserve"><tspan
-       style="stroke-width:0.75000226"
-       y="107.38506"
-       x="27.862804"
-       id="tspan4127"
-       sodipodi:role="line"></tspan></text>
-<text
-     id="text4139"
-     y="72.697174"
-     x="25.290758"
-     style="font-style:normal;font-weight:normal;font-size:30.00008965px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75000226"
-     xml:space="preserve"><tspan
-       style="stroke-width:0.75000226"
-       y="99.240219"
-       x="25.290758"
-       id="tspan4137"
-       sodipodi:role="line"></tspan></text>
-<path
-     style="fill:none;fill-opacity:1;stroke:#41719c;stroke-width:0.86738265px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
-     d="m 128.80127,137.90141 -0.20704,20.06801 44.6966,-0.10399 0.20705,-93.424256 16.84434,0.62379"
-     id="path5030"
-     inkscape:connector-curvature="0"
-     sodipodi:nodetypes="ccccc" /><g
-     transform="matrix(1,0,0,0.57815109,191.45876,-0.65041967)"
-     id="shape18-1-4"><title
-       id="title18-4">Rounded Rectangle.12</title><desc
-       id="desc20-6">Crypto Symmetric Session</desc><path
-       style="fill:url(#linearGradient189);stroke:#386288;stroke-width:0.75"
-       id="path22-0"
-       class="st1"
-       d="m 6.78,202.33 h 141.36 a 6.77735,6.77735 -180 0 0 6.77,-6.77 V 8.28 A 6.77735,6.77735 -180 0 0 148.14,1.5 H 6.78 A 6.77735,6.77735 -180 0 0 0,8.28 v 187.28 a 6.77735,6.77735 -180 0 0 6.78,6.77 z"
-       inkscape:connector-curvature="0" /><text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;fill:#386288;stroke-width:1.40298378"
-       id="text24-5"
-       class="st2"
-       y="17.335487"
-       x="26.317923">Crypto Driver Private Session</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-3"
-       class="st2"
-       y="19.076277"
-       x="-240.04274">Crypto Symmetric Session</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-5"
-       class="st2"
-       y="46.557648"
-       x="-241.24557">uint16_t nb_drivers;</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-6"
-       class="st2"
-       y="98.349464"
-       x="-240.04272">struct {</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-2"
-       class="st2"
-       y="115.26107"
-       x="-204.55865">void *data;</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-9"
-       class="st2"
-       y="144.3279"
-       x="-240.04274">} session_data[];</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-5-1"
-       class="st2"
-       y="58.945786"
-       x="-240.51538">uint16_t user_data_sz;</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-5-2"
-       class="st2"
-       y="189.4823"
-       x="-185.78569">user_data</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-5-1-4"
-       class="st2"
-       y="129.23468"
-       x="-204.95244">uint16_t refcnt;</text>
-<text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
-       id="text24-5-5-1-4-3"
-       class="st2"
-       y="72.641953"
-       x="-242.00067">uint64_t opaque_data;</text>
-</g><g
-     transform="matrix(1.022976,0,0,0.71529071,199.82034,-39.936699)"
-     id="shape19-6-5"><title
-       id="title27-2">Rounded Rectangle.13</title><desc
-       id="desc29-0">Private Session Data</desc><g
-       style="visibility:visible"
-       class="st3"
-       transform="translate(0.345598,1.97279)"
-       id="shadow19-7-1"><path
-         style="fill:#bdd0e9;fill-opacity:0.25;stroke:#bdd0e9;stroke-opacity:0.25;filter:url(#filter_2)"
-         id="path31-8"
-         class="st4"
-         d="m 5.91,202.33 h 123.25 a 5.90925,5.90925 -180 0 0 5.91,-5.9 v -92.78 a 5.90925,5.90925 -180 0 0 -5.91,-5.91 H 5.91 A 5.90925,5.90925 -180 0 0 0,103.65 v 92.78 a 5.90925,5.90925 -180 0 0 5.91,5.9 z"
-         inkscape:connector-curvature="0" /></g><path
-       style="fill:#a6b6cd;stroke:#41719c;stroke-width:0.75"
-       id="path34-8"
-       class="st5"
-       d="m 5.91,202.33 h 123.25 a 5.90925,5.90925 -180 0 0 5.91,-5.9 v -92.78 a 5.90925,5.90925 -180 0 0 -5.91,-5.91 H 5.91 A 5.90925,5.90925 -180 0 0 0,103.65 v 92.78 a 5.90925,5.90925 -180 0 0 5.91,5.9 z"
-       inkscape:connector-curvature="0" /><text
-       transform="scale(0.76039781,1.3151011)"
-       style="font-size:13.15105343px;font-family:Calibri;fill:#41719c;stroke-width:1.31510115"
-       id="text36-7"
-       class="st6"
-       y="119.96548"
-       x="34.639763">Private Session Data</text>
-</g><g
-     transform="matrix(1,0,0,0.57815109,191.61478,163.41083)"
-     id="shape18-1-4-7"><title
-       id="title18-4-3">Rounded Rectangle.12</title><desc
-       id="desc20-6-5">Crypto Symmetric Session</desc><path
-       style="fill:url(#linearGradient189-7);stroke:#386288;stroke-width:0.75"
-       id="path22-0-8"
-       class="st1"
-       d="m 6.78,202.33 h 141.36 a 6.77735,6.77735 -180 0 0 6.77,-6.77 V 8.28 A 6.77735,6.77735 -180 0 0 148.14,1.5 H 6.78 A 6.77735,6.77735 -180 0 0 0,8.28 v 187.28 a 6.77735,6.77735 -180 0 0 6.78,6.77 z"
-       inkscape:connector-curvature="0" /><text
-       transform="scale(0.71276665,1.4029837)"
-       style="font-size:14.02988338px;font-family:Calibri;fill:#386288;stroke-width:1.40298378"
-       id="text24-5-1"
-       class="st2"
-       y="17.335487"
-       x="26.317923">Crypto Driver Private Session</text>
-</g><g
-     transform="matrix(1.022976,0,0,0.71529071,199.97637,124.12455)"
-     id="shape19-6-5-1"><title
-       id="title27-2-4">Rounded Rectangle.13</title><desc
-       id="desc29-0-9">Private Session Data</desc><g
-       style="visibility:visible"
-       class="st3"
-       transform="translate(0.345598,1.97279)"
-       id="shadow19-7-1-8"><path
-         style="fill:#bdd0e9;fill-opacity:0.25;stroke:#bdd0e9;stroke-opacity:0.25;filter:url(#filter_2-3)"
-         id="path31-8-4"
-         class="st4"
-         d="m 5.91,202.33 h 123.25 a 5.90925,5.90925 -180 0 0 5.91,-5.9 v -92.78 a 5.90925,5.90925 -180 0 0 -5.91,-5.91 H 5.91 A 5.90925,5.90925 -180 0 0 0,103.65 v 92.78 a 5.90925,5.90925 -180 0 0 5.91,5.9 z"
-         inkscape:connector-curvature="0" /></g><path
-       style="fill:#a6b6cd;stroke:#41719c;stroke-width:0.75"
-       id="path34-8-3"
-       class="st5"
-       d="m 5.91,202.33 h 123.25 a 5.90925,5.90925 -180 0 0 5.91,-5.9 v -92.78 a 5.90925,5.90925 -180 0 0 -5.91,-5.91 H 5.91 A 5.90925,5.90925 -180 0 0 0,103.65 v 92.78 a 5.90925,5.90925 -180 0 0 5.91,5.9 z"
-       inkscape:connector-curvature="0" /><text
-       transform="scale(0.76039781,1.3151011)"
-       style="font-size:13.15105343px;font-family:Calibri;fill:#41719c;stroke-width:1.31510115"
-       id="text36-7-6"
-       class="st6"
-       y="119.96548"
-       x="34.639763">Private Session Data</text>
-</g><text
-     id="text5070"
-     y="145.4136"
-     x="248.24945"
-     style="font-style:normal;font-weight:normal;font-size:30.00008774px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75000221"
-     xml:space="preserve"><tspan
-       style="stroke-width:0.75000221"
-       y="171.95665"
-       x="248.24945"
-       id="tspan5068"
-       sodipodi:role="line" /></text>
-<text
-     id="text5074"
-     y="142.68553"
-     x="251.28064"
-     style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.00006485px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75000221"
-     xml:space="preserve"><tspan
-       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.00006485px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.75000221"
-       y="142.68553"
-       x="251.28064"
-       id="tspan5072"
-       sodipodi:role="line">...</tspan></text>
-<path
-     inkscape:connector-curvature="0"
-     id="path5076"
-     d="m 32.13263,137.96494 1.19624,93.60569 156.25849,0.0883"
-     style="fill:none;stroke:#41719c;stroke-width:0.56864393px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5421)" /></svg>
\ No newline at end of file
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 86d792e2e7..ed4112c625 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -911,11 +911,14 @@ rte_cryptodev_get_sec_ctx(uint8_t dev_id);
  * @param nb_elts
  *   The number of elements in the mempool.
  * @param elt_size
- *   The size of the element. This value will be ignored if it is smaller than
- *   the minimum session header size required for the system. For the user who
- *   want to use the same mempool for sym session and session private data it
- *   can be the maximum value of all existing devices' private data and session
- *   header sizes.
+ *   The size of the element. This should be the size of the cryptodev PMD
+ *   session private data obtained through
+ *   rte_cryptodev_sym_get_private_session_size() function call.
+ *   For the user who wants to use the same mempool for heterogeneous PMDs
+ *   this value should be the maximum value of their private session sizes.
+ *   Please note the created mempool will have bigger elt size than this
+ *   value as necessary session header and the possible padding are filled
+ *   into each elt.
  * @param cache_size
  *   The number of per-lcore cache elements
  * @param priv_size
@@ -926,8 +929,8 @@ rte_cryptodev_get_sec_ctx(uint8_t dev_id);
  *   constraint for the reserved zone.
  *
  * @return
- *  - On success return size of the session
- *  - On failure returns 0
+ *  - On success returns the created session mempool pointer
+ *  - On failure returns NULL
  */
 __rte_experimental
 struct rte_mempool *
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:42.777531500 +0800
+++ 0058-cryptodev-fix-sym-session-mempool-creation-descripti.patch	2023-02-27 14:08:40.789237000 +0800
@@ -1 +1 @@
-From 9a8569ac0f9ee929d78f4353946fc6bdece21082 Mon Sep 17 00:00:00 2001
+From ce54658be7c99586d9430c420a6475bd79b3d608 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 9a8569ac0f9ee929d78f4353946fc6bdece21082 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -506 +508 @@
-index bbb854ccb9..27cdec8495 100644
+index 86d792e2e7..ed4112c625 100644
@@ -509 +511 @@
-@@ -982,11 +982,14 @@ rte_cryptodev_get_sec_ctx(uint8_t dev_id);
+@@ -911,11 +911,14 @@ rte_cryptodev_get_sec_ctx(uint8_t dev_id);
@@ -529 +531 @@
-@@ -997,8 +1000,8 @@ rte_cryptodev_get_sec_ctx(uint8_t dev_id);
+@@ -926,8 +929,8 @@ rte_cryptodev_get_sec_ctx(uint8_t dev_id);


More information about the stable mailing list