Hi Jerin, Please see inline.
Thanks, Anoob > -----Original Message----- > From: Jerin Jacob <jerinjac...@gmail.com> > Sent: Monday, December 9, 2019 1:17 PM > To: Anoob Joseph <ano...@marvell.com> > Cc: Akhil Goyal <akhil.go...@nxp.com>; Declan Doherty > <declan.dohe...@intel.com>; Thomas Monjalon <tho...@monjalon.net>; > Tejasree Kondoj <ktejas...@marvell.com>; Jerin Jacob Kollanukkaran > <jer...@marvell.com>; Narayana Prasad Raju Athreya > <pathr...@marvell.com>; Kiran Kumar Kokkilagadda > <kirankum...@marvell.com>; Nithin Kumar Dabilpuram > <ndabilpu...@marvell.com>; Pavan Nikhilesh Bhagavatula > <pbhagavat...@marvell.com>; Ankur Dwivedi <adwiv...@marvell.com>; > Archana Muniganti <march...@marvell.com>; Vamsi Krishna Attunuru > <vattun...@marvell.com>; Lukas Bartosik <lbarto...@marvell.com>; dpdk-dev > <dev@dpdk.org> > Subject: [EXT] Re: [dpdk-dev] [PATCH 03/15] crypto/octeontx2: configure for > inline IPsec > > External Email > > ---------------------------------------------------------------------- > On Sun, Dec 8, 2019 at 5:26 PM Anoob Joseph <ano...@marvell.com> wrote: > > > > From: Tejasree Kondoj <ktejas...@marvell.com> > > > > For enabling outbound inline IPsec, a CPT queue needs to be tied to a > > NIX PF_FUNC. Distribute CPT queues fairly among all availble > > otx2 eth ports. > > > > For inbound, one CPT LF will be assigned and initialized by kernel. > > > > Signed-off-by: Ankur Dwivedi <adwiv...@marvell.com> > > Signed-off-by: Anoob Joseph <ano...@marvell.com> > > Signed-off-by: Archana Muniganti <march...@marvell.com> > > Signed-off-by: Tejasree Kondoj <ktejas...@marvell.com> > > Signed-off-by: Vamsi Attunuru <vattun...@marvell.com> > > > > > +static int > > +otx2_cpt_qp_inline_cfg(const struct rte_cryptodev *dev, struct > > +otx2_cpt_qp *qp) { > > + static rte_atomic16_t port_offset = RTE_ATOMIC16_INIT(-1); > > + uint16_t port_id, nb_ethport = rte_eth_dev_count_avail(); > > + int i, ret; > > + > > + for (i = 0; i < nb_ethport; i++) { > > + port_id = rte_atomic16_add_return(&port_offset, 1) % > > nb_ethport; > > + if (otx2_is_ethdev(&rte_eth_devices[port_id])) > > + break; > > + } > > + > > + if (i >= nb_ethport) > > + return 0; > > + > > + ret = otx2_cpt_qp_ethdev_bind(dev, qp, port_id); > > + if (ret) > > + return ret; > > + > > + return 0; > > Last five lines can be replaced with "return otx2_cpt_qp_ethdev_bind(dev, qp, > port_id)" [Anoob] In one of the following patches, one more call would be introduced after the call to otx2_cpt_qp_ethdev_bind(). So the above lines will have to be introduced anyway. For the last such addition, I'll make it return directly. Is that fine? > > Across the patch series, the above pattern is common, Please fix in all > relevant > instances.