Hi Jerin,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: Jerin Jacob <[email protected]>
> Sent: Monday, December 9, 2019 1:17 PM
> To: Anoob Joseph <[email protected]>
> Cc: Akhil Goyal <[email protected]>; Declan Doherty
> <[email protected]>; Thomas Monjalon <[email protected]>;
> Tejasree Kondoj <[email protected]>; Jerin Jacob Kollanukkaran
> <[email protected]>; Narayana Prasad Raju Athreya
> <[email protected]>; Kiran Kumar Kokkilagadda
> <[email protected]>; Nithin Kumar Dabilpuram
> <[email protected]>; Pavan Nikhilesh Bhagavatula
> <[email protected]>; Ankur Dwivedi <[email protected]>;
> Archana Muniganti <[email protected]>; Vamsi Krishna Attunuru
> <[email protected]>; Lukas Bartosik <[email protected]>; dpdk-dev
> <[email protected]>
> 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 <[email protected]> wrote:
> >
> > From: Tejasree Kondoj <[email protected]>
> >
> > 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 <[email protected]>
> > Signed-off-by: Anoob Joseph <[email protected]>
> > Signed-off-by: Archana Muniganti <[email protected]>
> > Signed-off-by: Tejasree Kondoj <[email protected]>
> > Signed-off-by: Vamsi Attunuru <[email protected]>
> 
> >
> > +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.

Reply via email to