[EXT] [PATCH v4 02/12] cryptodev: separate key exchange operation enum

Kusztal, ArkadiuszX arkadiuszx.kusztal at intel.com
Tue May 31 15:50:17 CEST 2022



> -----Original Message-----
> From: Akhil Goyal <gakhil at marvell.com>
> Sent: Tuesday, May 31, 2022 1:47 PM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal at intel.com>; dev at dpdk.org
> Cc: Zhang, Roy Fan <roy.fan.zhang at intel.com>
> Subject: RE: [EXT] [PATCH v4 02/12] cryptodev: separate key exchange
> operation enum
> 
> >  /**
> > diff --git a/lib/cryptodev/rte_cryptodev.h
> > b/lib/cryptodev/rte_cryptodev.h index 2c2c2edeb7..7d683fd728 100644
> > --- a/lib/cryptodev/rte_cryptodev.h
> > +++ b/lib/cryptodev/rte_cryptodev.h
> > @@ -168,7 +168,9 @@ struct rte_cryptodev_asymmetric_xform_capability {
> >  	/**< Transform type: RSA/MODEXP/DH/DSA/MODINV */
> >
> >  	uint32_t op_types;
> > -	/**< bitmask for supported rte_crypto_asym_op_type */
> > +	/**< bitmask for supported rte_crypto_asym_op_type or
> > +	 * rte_crypto_asym_ke_type
> > +	 */
> 
> How is this supposed to work?
> Ke_type and op_type are 2 separate enums which can have same value.
> How will the user identify which one to use?
[Arek] - by algorithm - xform_type.
> Shouldn't we split this too?
[Arek] - for me both options are ok. For some SM2 may be bit challenging here, but in such situations we should have different op types for KE and OP. This would spare this API from having one op with majority of fields unused.
Though it may be split too, not big problem.
  
> 
> >
> >  	__extension__
> >  	union {
> > diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
> > index f0abfaa47d..dbf1f62199 100644
> > --- a/lib/cryptodev/version.map
> > +++ b/lib/cryptodev/version.map
> > @@ -108,6 +108,7 @@ EXPERIMENTAL {
> >
> >  	#added in 22.07
> >  	rte_cryptodev_session_event_mdata_set;
> > +	rte_crypto_asym_ke_strings;
> >  };
> >
> >  INTERNAL {
> > --
> > 2.13.6



More information about the dev mailing list