From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8ED3BA04F1; Mon, 9 Dec 2019 08:54:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3682D1BE80; Mon, 9 Dec 2019 08:54:07 +0100 (CET) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 2173A2BAB for ; Mon, 9 Dec 2019 08:54:06 +0100 (CET) Received: by mail-io1-f65.google.com with SMTP id t26so2302913ioi.13 for ; Sun, 08 Dec 2019 23:54:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Xe9f5RTSBtmdKZ9YUXBtckcqd6jQnl/eI0dV4S5nUfw=; b=hsjKK/stq0zi7QKNjVv4jmDxG+p7F4C0A9UqABwn40jUx+JzjCJWMKgAcEEx76Uzjm DXwdAgarWIP/YeCFKtOIPF+l3xvTXKCtVccv0PogLSOSTpTRnLlyY1PBcoqJtOU8PruP EknvltqwuK7OCWD8Evr7hgwBnnc6gTY3nXnCPHpfy/gexX0xsumqYl8o6n5CWcE6oTwN d0oipCiRmlPAPZ2b5uLNDdMJanlt1nw6jtquT6rwjbSwb7Ji8h2TcIuXfdvsDf05n9oM aZRbd2aLryiGzluyjhlOsi1C9wYMfrqhL1HtuZJPnFaWmOMka1hdJiIRRk+vmG9O5BBX krfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Xe9f5RTSBtmdKZ9YUXBtckcqd6jQnl/eI0dV4S5nUfw=; b=A4UZeO5/xENwQJlHvP1LXHs05vwvFx5Gev1Hs2jTNOHSbw/jBkEHK9TadNjYJ1Ac5y Yy7sx+yDE/659C5me4y58dihEmiEyX62gMRjDw21EYJbB2VjnK4tLP4Ajr/6RTXRv9q6 mkE0s8xe5+s143ONhj7IVyFH8P8cfnWVgDpG8LGWz1wUMC01XfaKLOEw4HJToaLCIzt0 uqsA1A4SbeNg2Nnoxcrq4FmEHPhKxITc7896VNMio1YQlhggqOK3DKH4e6DPoNF7ODRM uau/FxEqzokCRYCcHAZGVbGTpZjVKfAq3kJdNrALrxqAUu2Ga2FtAV1uR4dzaSvEzYwo 6PdA== X-Gm-Message-State: APjAAAWzGJgm0nLrlnLnu+7qg6YoftGRxSjqmUKHj2JbH5wfPwOWc56T CEajm8RLqkRwVP0o1Nybf8NvdjcEGTKZzBSrnVs= X-Google-Smtp-Source: APXvYqx7lfT0OAObsD9ulzL2o08MvwEL0vLkcTsWiApeXDnx+YtptIpryrxKIXg7unCqSczCta1NOuw52cwdlaxw69E= X-Received: by 2002:a5e:8516:: with SMTP id i22mr20883153ioj.130.1575878045318; Sun, 08 Dec 2019 23:54:05 -0800 (PST) MIME-Version: 1.0 References: <1575806094-28391-1-git-send-email-anoobj@marvell.com> <1575806094-28391-4-git-send-email-anoobj@marvell.com> In-Reply-To: From: Jerin Jacob Date: Mon, 9 Dec 2019 13:23:49 +0530 Message-ID: To: Anoob Joseph Cc: Akhil Goyal , Declan Doherty , Thomas Monjalon , Tejasree Kondoj , Jerin Jacob Kollanukkaran , Narayana Prasad Raju Athreya , Kiran Kumar Kokkilagadda , Nithin Kumar Dabilpuram , Pavan Nikhilesh Bhagavatula , Ankur Dwivedi , Archana Muniganti , Vamsi Krishna Attunuru , Lukas Bartosik , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [EXT] Re: [PATCH 03/15] crypto/octeontx2: configure for inline IPsec X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Dec 9, 2019 at 1:22 PM Anoob Joseph wrote: > > Hi Jerin, > > Please see inline. > > Thanks, > Anoob > > > -----Original Message----- > > From: Jerin Jacob > > Sent: Monday, December 9, 2019 1:17 PM > > To: Anoob Joseph > > Cc: Akhil Goyal ; Declan Doherty > > ; Thomas Monjalon ; > > Tejasree Kondoj ; Jerin Jacob Kollanukkaran > > ; Narayana Prasad Raju Athreya > > ; Kiran Kumar Kokkilagadda > > ; Nithin Kumar Dabilpuram > > ; Pavan Nikhilesh Bhagavatula > > ; Ankur Dwivedi ; > > Archana Muniganti ; Vamsi Krishna Attunuru > > ; Lukas Bartosik ; dpdk-dev > > > > 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 wrote: > > > > > > From: Tejasree Kondoj > > > > > > 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 > > > Signed-off-by: Anoob Joseph > > > Signed-off-by: Archana Muniganti > > > Signed-off-by: Tejasree Kondoj > > > Signed-off-by: Vamsi Attunuru > > > > > > > > +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.