DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: "Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Anoob Joseph <anoobj@marvell.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>,
	"Vangati, Narender" <narender.vangati@intel.com>,
	Volodymyr Fialko <vfialko@marvell.com>
Subject: RE: [PATCH v3 2/7] crypto/cnxk: add event metadata set operation
Date: Sun, 1 May 2022 18:29:12 +0000	[thread overview]
Message-ID: <CO6PR18MB448474DD01C1D1F8A7C33E04D8FE9@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <PH0PR11MB5832BF2B23AA480E25DFEC09E8FE9@PH0PR11MB5832.namprd11.prod.outlook.com>

> > -uint16_t
> > -cn10k_cpt_crypto_adapter_enqueue(uintptr_t tag_op, struct rte_crypto_op
> > *op)
> > +static int
> > +cn10k_cpt_crypto_adapter_ev_mdata_set(struct rte_cryptodev *dev
> > __rte_unused,
> > +				      void *sess,
> > +				      enum rte_crypto_op_type op_type,
> > +				      enum rte_crypto_op_sess_type sess_type,
> > +				      void *mdata)
> >  {
> > -	union rte_event_crypto_metadata *ec_mdata;
> > -	struct cpt_inflight_req *infl_req;
> > +	union rte_event_crypto_metadata *ec_mdata = mdata;
> >  	struct rte_event *rsp_info;
> > -	uint64_t lmt_base, lmt_arg;
> > -	struct cpt_inst_s *inst;
> >  	struct cnxk_cpt_qp *qp;
> >  	uint8_t cdev_id;
> > -	uint16_t lmt_id;
> > -	uint16_t qp_id;
> > -	int ret;
> > -
> > -	ec_mdata = cnxk_event_crypto_mdata_get(op);
> > -	if (!ec_mdata) {
> > -		rte_errno = EINVAL;
> > -		return 0;
> > -	}
> > +	int16_t qp_id;
> > +	uint64_t w2;
> >
> > +	/* Get queue pair */
> >  	cdev_id = ec_mdata->request_info.cdev_id;
> >  	qp_id = ec_mdata->request_info.queue_pair_id;
> >  	qp = rte_cryptodevs[cdev_id].data->queue_pairs[qp_id];
> > +
> > +	/* Prepare w2 */
> >  	rsp_info = &ec_mdata->response_info;
> > +	w2 = CNXK_CPT_INST_W2(
> > +		(RTE_EVENT_TYPE_CRYPTODEV << 28) | rsp_info->flow_id,
> > +		rsp_info->sched_type, rsp_info->queue_id, 0);
> > +
> > +	/* Set meta according to session type */
> > +	if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {
> > +		if (sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
> > +			struct cn10k_sec_session *priv;
> > +			struct cn10k_ipsec_sa *sa;
> > +
> > +			priv = get_sec_session_private_data(sess);
> > +			sa = &priv->sa;
> > +			sa->qp = qp;
> > +			sa->inst.w2 = w2;
> > +		} else if (sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
> > +			struct cnxk_se_sess *priv;
> > +
> > +			priv = get_sym_session_private_data(
> > +				sess, cn10k_cryptodev_driver_id);
> > +			priv->qp = qp;
> > +			priv->cpt_inst_w2 = w2;
> > +		} else
> cnXX_ca_meta_info_extract() supports SESSIONLESS case. But no support here.
> Is this expected?

This function is for setting the event metadata in session, but in case of sessionless
there are no sessions, so event metadata is extracted in a different way.
Hence this is correct.



  reply	other threads:[~2022-05-01 18:29 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 11:16 [PATCH 0/2] Session crypto event metadata api Volodymyr Fialko
2022-03-25 11:16 ` [PATCH 1/2] security: introduce per session event metadata Volodymyr Fialko
2022-04-04  8:38   ` Gujjar, Abhinandan S
2022-04-04  9:48     ` Akhil Goyal
2022-04-04 10:42       ` Gujjar, Abhinandan S
2022-04-13  7:13         ` Akhil Goyal
2022-04-18 19:36           ` Akhil Goyal
2022-03-25 11:16 ` [PATCH 2/2] crypto/cnxk: support for security session enqueue Volodymyr Fialko
2022-04-18 19:33 ` [PATCH v2 0/7] Add new cryptodev op for event metadata Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 2/7] crypto/cnxk: add event metadata set operation Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 3/7] crypto/octeontx: use new API for event metadata Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 4/7] test/event: use new API to set event crypto metadata Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 5/7] eventdev: use new API to get " Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 6/7] test/event: add asymmetric cases for crypto adapter Akhil Goyal
2022-04-18 19:33   ` [PATCH v2 7/7] test-eventdev: support asym ops " Akhil Goyal
2022-04-21 14:37   ` [PATCH v3 0/7] Add new cryptodev op for event metadata Akhil Goyal
2022-04-21 14:37     ` [PATCH v3 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-27 15:38       ` Zhang, Roy Fan
2022-04-28 14:42       ` Gujjar, Abhinandan S
2022-04-29 12:16         ` Akhil Goyal
2022-05-01 12:24           ` Gujjar, Abhinandan S
2022-05-01 18:37             ` Akhil Goyal
2022-04-21 14:37     ` [PATCH v3 2/7] crypto/cnxk: add event metadata set operation Akhil Goyal
2022-04-27 15:38       ` Zhang, Roy Fan
2022-05-01 13:17       ` Gujjar, Abhinandan S
2022-05-01 18:29         ` Akhil Goyal [this message]
2022-04-21 14:37     ` [PATCH v3 3/7] crypto/octeontx: use new API for event metadata Akhil Goyal
2022-04-27 15:38       ` Zhang, Roy Fan
2022-05-01 13:18       ` Gujjar, Abhinandan S
2022-04-21 14:37     ` [PATCH v3 4/7] test/event: use new API to set event crypto metadata Akhil Goyal
2022-04-27 15:39       ` Zhang, Roy Fan
2022-04-28 14:47       ` Gujjar, Abhinandan S
2022-04-21 14:37     ` [PATCH v3 5/7] eventdev: use new API to get " Akhil Goyal
2022-04-27 15:39       ` Zhang, Roy Fan
2022-04-28 15:08       ` Gujjar, Abhinandan S
2022-04-21 14:37     ` [PATCH v3 6/7] test/event: add asymmetric cases for crypto adapter Akhil Goyal
2022-04-27 15:39       ` Zhang, Roy Fan
2022-04-28 15:14       ` Gujjar, Abhinandan S
2022-04-29 12:23         ` Akhil Goyal
2022-05-01 12:45           ` Gujjar, Abhinandan S
2022-05-01 18:36             ` Akhil Goyal
2022-04-21 14:37     ` [PATCH v3 7/7] test-eventdev: support asym ops " Akhil Goyal
2022-04-27 15:40       ` Zhang, Roy Fan
2022-05-01 13:00       ` Gujjar, Abhinandan S
2022-04-27 15:37     ` [PATCH v3 0/7] Add new cryptodev op for event metadata Zhang, Roy Fan
2022-04-28 14:24     ` Gujjar, Abhinandan S
2022-05-01 19:24     ` [PATCH v4 " Akhil Goyal
2022-05-01 19:24       ` [PATCH v4 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-02  9:01         ` Anoob Joseph
2022-05-02 11:06         ` Gujjar, Abhinandan S
2022-05-01 19:24       ` [PATCH v4 2/7] crypto/cnxk: add event metadata set operation Akhil Goyal
2022-05-02 11:07         ` Gujjar, Abhinandan S
2022-05-01 19:24       ` [PATCH v4 3/7] crypto/octeontx: use new API for event metadata Akhil Goyal
2022-05-01 19:24       ` [PATCH v4 4/7] test/event: use new API to set event crypto metadata Akhil Goyal
2022-05-01 19:24       ` [PATCH v4 5/7] eventdev: use new API to get " Akhil Goyal
2022-05-01 19:24       ` [PATCH v4 6/7] test/event: add asymmetric cases for crypto adapter Akhil Goyal
2022-05-02 11:08         ` Gujjar, Abhinandan S
2022-05-01 19:24       ` [PATCH v4 7/7] test-eventdev: support asym ops " Akhil Goyal
2022-05-02 11:08       ` [PATCH v4 0/7] Add new cryptodev op for event metadata Gujjar, Abhinandan S
2022-05-12 12:45       ` [PATCH v5 " Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 2/7] crypto/cnxk: add event metadata set operation Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 3/7] crypto/octeontx: use new API for event metadata Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 4/7] test/event: use new API to set event crypto metadata Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 5/7] eventdev: use new API to get " Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 6/7] test/event: add asymmetric cases for crypto adapter Akhil Goyal
2022-05-12 12:45         ` [PATCH v5 7/7] test-eventdev: support asym ops " Akhil Goyal
2022-05-16 18:30         ` [PATCH v5 0/7] Add new cryptodev op for event metadata Akhil Goyal

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=CO6PR18MB448474DD01C1D1F8A7C33E04D8FE9@CO6PR18MB4484.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jay.jayatheerthan@intel.com \
    --cc=jerinj@marvell.com \
    --cc=narender.vangati@intel.com \
    --cc=vfialko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).