DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Varghese, Vipin" <vipin.varghese@intel.com>
To: "Ruifeng Wang (Arm Technology China)" <Ruifeng.Wang@arm.com>,
	"Wiles, Keith" <keith.wiles@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"Akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
	"Doherty, Declan" <declan.doherty@intel.com>
Cc: "Padubidri, Sanjay A" <sanjay.padubidri@intel.com>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-crypto: add callback	handlers
Date: Thu, 4 Jul 2019 05:03:59 +0000	[thread overview]
Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D38BA32@BGSMSX101.gar.corp.intel.com> (raw)
In-Reply-To: <AM0PR08MB4418152EF2A579FBA5E87C849EE70@AM0PR08MB4418.eurprd08.prod.outlook.com>

Thanks Ruifeng, will work on the suggested changes.

> -----Original Message-----
> From: Ruifeng Wang (Arm Technology China) <Ruifeng.Wang@arm.com>
> Sent: Friday, June 21, 2019 12:37 PM
> To: Varghese, Vipin <vipin.varghese@intel.com>; Wiles, Keith
> <keith.wiles@intel.com>; dev@dpdk.org; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Akhil.goyal@nxp.com; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: Padubidri, Sanjay A <sanjay.padubidri@intel.com>; nd <nd@arm.com>
> Subject: RE: [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-crypto: add callback
> handlers
> 
> Hi,
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Vipin Varghese
> > Sent: Monday, June 10, 2019 14:30
> > To: keith.wiles@intel.com; dev@dpdk.org;
> > pablo.de.lara.guarch@intel.com; Akhil.goyal@nxp.com;
> > declan.doherty@intel.com
> > Cc: sanjay.padubidri@intel.com; Vipin Varghese
> > <vipin.varghese@intel.com>
> > Subject: [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-crypto: add callback
> > handlers
> >
> > Register user callback handlers for pre-enqueue and pst-dequeue for
> > crypto device instance 0 with port 0.
> >
> > Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
> > ---
> >  examples/l2fwd-crypto/main.c | 38
> > ++++++++++++++++++++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> >
> > diff --git a/examples/l2fwd-crypto/main.c
> > b/examples/l2fwd-crypto/main.c index e282cb7bf..c42b352f8 100644
> > --- a/examples/l2fwd-crypto/main.c
> > +++ b/examples/l2fwd-crypto/main.c
> > @@ -255,6 +255,22 @@ struct l2fwd_crypto_statistics
> > crypto_statistics[RTE_CRYPTO_MAX_DEVS];
> >  /* default period is 10 seconds */
> >  static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000;
> >
> > +#ifdef RTE_CRYPTODEV_ENQDEQ_CALLBACKS static uint16_t
> > +dump_crypto(__rte_unused uint8_t dev_id,
> > +		__rte_unused uint8_t qp_id,
> > +		__rte_unused struct rte_crypto_op **ops,
> > +		__rte_unused uint16_t nb_ops,
> > +		__rte_unused void *cb_arg)
> > +{
> > +	if (nb_ops)
> > +		RTE_LOG(DEBUG, L2FWD, " dev_id (%u) qp_id (%u)"
> > +				" ops (%p) nb_ops (%u)\n",
> > +				dev_id, qp_id, ops, nb_ops);
> > +
> > +	return nb_ops;
> > +}
> > +#endif
> > +
> >  /* Print out statistics on packets dropped */  static void
> >  print_stats(void)
> > @@ -2783,6 +2799,18 @@ main(int argc, char **argv)
> >  				(unsigned)cdev_id);
> >  	}
> >
> > +#ifdef RTE_CRYPTODEV_ENQDEQ_CALLBACKS
> > +	ret = rte_cryptodev_preenq_callback_register(0, 0, dump_crypto,
> > NULL);
> > +	if (ret != 0)
> > +		RTE_LOG(ERR, L2FWD, " failed to preenq callback register\n");
> > +	RTE_LOG(INFO, L2FWD, " preenq callback register success\n");
> > +
> > +	ret = rte_cryptodev_pstdeq_callback_register(0, 0, dump_crypto,
> > NULL);
> > +	if (ret != 0)
> > +		RTE_LOG(ERR, L2FWD, " failed to pstdeq callback register\n");
> > +	RTE_LOG(INFO, L2FWD, " pstdeq callback register success\n"); #endif
> > +
> >  	/* launch per-lcore init on every lcore */
> >  	rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, (void *)&options,
> >  			CALL_MASTER);
> > @@ -2791,5 +2819,15 @@ main(int argc, char **argv)
> >  			return -1;
> >  	}
> >
> > +#ifdef RTE_CRYPTODEV_ENQDEQ_CALLBACKS
> > +	ret = rte_cryptodev_preenq_callback_unregister(0, 0, dump_crypto,
> > NULL);
> > +	if (ret != 0)
> > +		printf(" faield
> 
> Observed typo here 'faield' -> 'failed'  ;)
> 
> > rte_cryptodev_preenq_callback_unregister\n");
> > +
> > +	ret = rte_cryptodev_pstdeq_callback_unregister(0, 0, dump_crypto,
> > NULL);
> > +	if (ret != 0)
> > +		printf(" failed
> > rte_cryptodev_pstdeq_callback_unregister\n");
> > +#endif
> > +
> >  	return 0;
> >  }
> > --
> > 2.17.1


  reply	other threads:[~2019-07-04  5:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10  5:03 [dpdk-dev] [PATCH v1 1/2] lib/crypto: add callback handlers for crypto Vipin Varghese
2019-06-10  5:03 ` [dpdk-dev] [PATCH v1 2/2] examples/l2fwd-crypto: add callback handlers Vipin Varghese
2019-06-10  6:30 ` [dpdk-dev] [PATCH v2 1/2] lib/crypto: add callback handlers for crypto Vipin Varghese
2019-06-10  6:30   ` [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-crypto: add callback handlers Vipin Varghese
2019-06-21  7:06     ` Ruifeng Wang (Arm Technology China)
2019-07-04  5:03       ` Varghese, Vipin [this message]
2019-06-27 14:25   ` [dpdk-dev] [PATCH v2 1/2] lib/crypto: add callback handlers for crypto Akhil Goyal
2019-07-04  5:03     ` Varghese, Vipin

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=4C9E0AB70F954A408CC4ADDBF0F8FA7D4D38BA32@BGSMSX101.gar.corp.intel.com \
    --to=vipin.varghese@intel.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=akhil.goyal@nxp.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=keith.wiles@intel.com \
    --cc=nd@arm.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=sanjay.padubidri@intel.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).