cryptodev: add opaque data field to symmetric session
authorFan Zhang <roy.fan.zhang@intel.com>
Thu, 10 Jan 2019 14:50:22 +0000 (14:50 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 10 Jan 2019 15:57:22 +0000 (16:57 +0100)
This patch adds a opaque data field to cryptodev symmetric session.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
doc/guides/prog_guide/img/cryptodev_sym_sess.svg
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_cryptodev/rte_cryptodev.h

index 7d7052c..9b52245 100644 (file)
        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
index 654c39f..7009735 100644 (file)
@@ -1339,6 +1339,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 
        sess->nb_drivers = pool_priv->nb_drivers;
        sess->user_data_sz = pool_priv->user_data_sz;
+       sess->opaque_data = 0;
 
        /* Clear device session pointer.
         * Include the flag indicating presence of user data
index 0a3e723..a0bbcf9 100644 (file)
@@ -953,6 +953,8 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
  * has a fixed algo, key, op-type, digest_len etc.
  */
 struct rte_cryptodev_sym_session {
+       uint64_t opaque_data;
+       /**< Can be used for external metadata */
        uint16_t nb_drivers;
        /**< number of elements in sess_data array */
        uint16_t user_data_sz;