[dpdk-dev] [EXT] Re: [PATCH 03/15] crypto/octeontx2: configure for inline IPsec
Jerin Jacob
jerinjacobk at gmail.com
Mon Dec 9 08:53:49 CET 2019
On Mon, Dec 9, 2019 at 1:22 PM Anoob Joseph <anoobj at marvell.com> wrote:
>
> Hi Jerin,
>
> Please see inline.
>
> Thanks,
> Anoob
>
> > -----Original Message-----
> > From: Jerin Jacob <jerinjacobk at gmail.com>
> > Sent: Monday, December 9, 2019 1:17 PM
> > To: Anoob Joseph <anoobj at marvell.com>
> > Cc: Akhil Goyal <akhil.goyal at nxp.com>; Declan Doherty
> > <declan.doherty at intel.com>; Thomas Monjalon <thomas at monjalon.net>;
> > Tejasree Kondoj <ktejasree at marvell.com>; Jerin Jacob Kollanukkaran
> > <jerinj at marvell.com>; Narayana Prasad Raju Athreya
> > <pathreya at marvell.com>; Kiran Kumar Kokkilagadda
> > <kirankumark at marvell.com>; Nithin Kumar Dabilpuram
> > <ndabilpuram at marvell.com>; Pavan Nikhilesh Bhagavatula
> > <pbhagavatula at marvell.com>; Ankur Dwivedi <adwivedi at marvell.com>;
> > Archana Muniganti <marchana at marvell.com>; Vamsi Krishna Attunuru
> > <vattunuru at marvell.com>; Lukas Bartosik <lbartosik at marvell.com>; dpdk-dev
> > <dev at 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 <anoobj at marvell.com> wrote:
> > >
> > > From: Tejasree Kondoj <ktejasree at 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 <adwivedi at marvell.com>
> > > Signed-off-by: Anoob Joseph <anoobj at marvell.com>
> > > Signed-off-by: Archana Muniganti <marchana at marvell.com>
> > > Signed-off-by: Tejasree Kondoj <ktejasree at marvell.com>
> > > Signed-off-by: Vamsi Attunuru <vattunuru at 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?
Yes,
>
> >
> > Across the patch series, the above pattern is common, Please fix in all relevant
> > instances.
More information about the dev
mailing list