This patch adds a opaque data field to cryptodev symmetric session. Signed-off-by: Fan Zhang <roy.fan.zh...@intel.com> Acked-by: Fiona Trahe <fiona.tr...@intel.com> --- doc/guides/prog_guide/img/cryptodev_sym_sess.svg | 7 +++++++ lib/librte_cryptodev/rte_cryptodev.c | 1 + lib/librte_cryptodev/rte_cryptodev.h | 2 ++ 3 files changed, 10 insertions(+)
diff --git a/doc/guides/prog_guide/img/cryptodev_sym_sess.svg b/doc/guides/prog_guide/img/cryptodev_sym_sess.svg index 7d7052c38..9b522458c 100644 --- a/doc/guides/prog_guide/img/cryptodev_sym_sess.svg +++ b/doc/guides/prog_guide/img/cryptodev_sym_sess.svg @@ -315,6 +315,13 @@ 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 diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 3835272fe..317a3b6ad 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -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 diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index ec0d1c567..39fd1269c 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -957,6 +957,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; -- 2.13.6