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 68204A04F1; Mon, 9 Dec 2019 08:46:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BBA7823D; Mon, 9 Dec 2019 08:46:48 +0100 (CET) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 9421C91 for ; Mon, 9 Dec 2019 08:46:46 +0100 (CET) Received: by mail-io1-f68.google.com with SMTP id s2so13695742iog.10 for ; Sun, 08 Dec 2019 23:46:46 -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=BIrEQyyNj+O6Nz5f+YKgnhq/+UFhO0ECfydnNsZzGAg=; b=WrYLEGmFe4h4aQTzuX9D/Qd/P7e7OdaYSN8CNTozjhdDlWqXELeHvYioLfJ9Aevx/u u8Liw7G1NyBGfUpoeECcMVSM+3Hd2tMG1pfFynfL8U3VCD7aRnhgFKjl6L4nA6CuW1o+ EmDtIaH6SyADdocgbj+ajk1WdPM6qi/kPQ5o/UNKsAuyhn7JYkXT/44ooUmdnhOrbhxM DpjLw75fa5TTDQrkvCSc48cmNw5NSOADfnUvpeT9pkb0McaALsQu+ZIeme/Zg6v2MFCa esKcbOqZFWfOgXMCMFXm3ayco7HzdxN+99/SWlceZFA+0aTNeXyHw2rruqextxQ14KWO vrJg== 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=BIrEQyyNj+O6Nz5f+YKgnhq/+UFhO0ECfydnNsZzGAg=; b=J/hEbmrgY245JOMUyqYRY/5/xSxHSnO8T21sW+6mvErZzq8fFUUeSr8hecyWLbCgO1 swiLswErCVGU0SN5wyJPzcwHcvabGOKyTtwqnndBCaKgRetr/odtjVunDGJBcRB5bHmK RRk6woEMHbZtANU+cYeu5Xb8eRTepl7bHIunIM4ktamfkpEztzKeqpJqcaL8FWdBeusU W7gpl/BZIG47Aso+cOrsEJTDePXiLx1TZ/sDzvCF/ny5OBvBx5x1ikDhnVZlchrTNhQg KJZ78EVbj/rEB0AkKpj8kyERbOqSAAJQTMTOKZx7svvuFfkJqNjz2q7L+2CQ7S79trla 6ZOQ== X-Gm-Message-State: APjAAAXdpgZ3D+aRTPsneob62W2qC5YwgkFHf4WZgBkVr3PNihpt9dXz 7K4zFUsh7ZW0h6Z67FswEHTJeq7SzFPo2t6Cd/g= X-Google-Smtp-Source: APXvYqwLLMd5tRPp+qtvN8c2KrdFRMDNukwvDNGp5xiLz5sPAxkEPq4wsX5uc5KkY5LZaCoYzIkxIuXqPVEtoLEweFU= X-Received: by 2002:a02:cc75:: with SMTP id j21mr25319452jaq.113.1575877605793; Sun, 08 Dec 2019 23:46:45 -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: <1575806094-28391-4-git-send-email-anoobj@marvell.com> From: Jerin Jacob Date: Mon, 9 Dec 2019 13:16:30 +0530 Message-ID: To: Anoob Joseph Cc: Akhil Goyal , Declan Doherty , Thomas Monjalon , Tejasree Kondoj , Jerin Jacob , Narayana Prasad , Kiran Kumar K , Nithin Dabilpuram , Pavan Nikhilesh , Ankur Dwivedi , Archana Muniganti , Vamsi Attunuru , Lukasz Bartosik , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [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 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)" Across the patch series, the above pattern is common, Please fix in all relevant instances.