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 15DE2A057C; Fri, 27 Mar 2020 17:19:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0E591C241; Fri, 27 Mar 2020 17:19:47 +0100 (CET) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id A4B6B1C240 for ; Fri, 27 Mar 2020 17:19:46 +0100 (CET) Received: by mail-lj1-f195.google.com with SMTP id r7so3166793ljg.13 for ; Fri, 27 Mar 2020 09:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=MlmtglnF3Qy97RgsQuNo0jxQYZz5Vi110CNqd/zodzg=; b=vUHweIKUdWZQ6i3qr3K1qAWpEziAuYoB8bfiZ+pJr3W8oOFCufyVS7qLXwYBdB5p46 pePLwySKntUOm47senUx+f8usznptuNT6JePrqRXXe+sZYJBdyCETFqrI+rLcUpmor0b M3s2bAoqBzFcdTeE25FbynQE1MCv4l+QIrhq1yqh1yqQr/uItRif9Hvh95EozOiPGZwC /sOlnMbLzq37LEstL57Iul/8nqP+j9TXVeuu84Dso4OyMKchnw91Zz6+PLqKkh5eXdhA kXovrRaRu3nn1DGQc10u7Q3txaCNL/oIKnjbrmeZJpCBDCWBaB7M1uDEsPcNbfCLWHs/ Pbkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MlmtglnF3Qy97RgsQuNo0jxQYZz5Vi110CNqd/zodzg=; b=dPZU4iqYXJ8AL35FWhVIY9cr+7wFvPpj3qJgczVB42SkKoiNu+6nRlhjiZu0B0N1Ve 5aOllUXnXnYk0JNbYoWK1WP2IJeb02jTJfCz1M6F8wlaKZymr+DXsRoUteZn7JKSxVAP Xy2bXPtxZRQnhkMyitNplMa8ADXtzKbEO8dIwWPLAXnPB3cZ0lMKV3cLuUrko/i0yA4J dRDir3SyG+8ttQSLgiv8OAd2nBT87oVWEp8akH9+WKL90la1BO8hinXIk+OPYXEgcgFD nnYf2JYd9YP5hNq/8qNJlSCg15ZmRCMmU2j7lazEWTiQAcRb9ivQUxwhuCiWAUhveLzh yPqQ== X-Gm-Message-State: AGi0Publh3Oc0cOyRk22J4veo85iIyLq9q8+SyR2ypiWygiho88N+2n0 Nk7hJjkZhh17nd1HMJsI0cJaYWSm+lPxVX7r X-Google-Smtp-Source: APiQypLRvcOykbgcFL6+C7WLdXxG7dujm/N2dAydy8ye0mUXyup0fwFCBn2vs4IOVNCVxJRvDWeLOQ== X-Received: by 2002:a2e:9ed6:: with SMTP id h22mr9332247ljk.211.1585325985558; Fri, 27 Mar 2020 09:19:45 -0700 (PDT) Received: from [192.168.8.100] (user-5-173-56-20.play-internet.pl. [5.173.56.20]) by smtp.gmail.com with ESMTPSA id p7sm2947471ljg.5.2020.03.27.09.19.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Mar 2020 09:19:44 -0700 (PDT) To: pbhagavatula@marvell.com, jerinj@marvell.com, Nithin Dabilpuram , Kiran Kumar K , John McNamara , Marko Kovacevic Cc: dev@dpdk.org References: <20200326063302.4278-1-pbhagavatula@marvell.com> <20200327095359.1934-1-pbhagavatula@marvell.com> From: Andrzej Ostruszka Message-ID: <9144a7f0-81f3-4e41-9a65-61a3bd02d70c@semihalf.com> Date: Fri, 27 Mar 2020 17:19:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200327095359.1934-1-pbhagavatula@marvell.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] net/octeontx2: add devargs to lock Rx/Tx ctx 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 3/27/20 10:53 AM, pbhagavatula@marvell.com wrote: > From: Pavan Nikhilesh > > Add device arguments to lock Rx/Tx contexts. > Application can either choose to lock Rx or Tx contexts by using > 'lock_rx_ctx' or 'lock_tx_ctx' respectively per each port. > > Example: > -w 0002:02:00.0,lock_rx_ctx=1 -w 0002:03:00.0,lock_tx_ctx=1 > > Signed-off-by: Pavan Nikhilesh > Reviewed-by: Andrzej Ostruszka > --- > Depends on http://patches.dpdk.org/patch/67178/ > v4 Changes: > - Fix return path using unnecessary goto.(Andrzej) > - Fix datatype of values passed to devargs parser.(Andrzej) > > v3 Changes: > - Split series into individual patches as targets are different. > > doc/guides/nics/octeontx2.rst | 16 ++ > drivers/net/octeontx2/otx2_ethdev.c | 187 +++++++++++++++++++- > drivers/net/octeontx2/otx2_ethdev.h | 2 + > drivers/net/octeontx2/otx2_ethdev_devargs.c | 16 +- > drivers/net/octeontx2/otx2_rss.c | 23 +++ > 5 files changed, 241 insertions(+), 3 deletions(-) [...] > diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c > index e60f4901c..a6f2c0f42 100644 > --- a/drivers/net/octeontx2/otx2_ethdev.c > +++ b/drivers/net/octeontx2/otx2_ethdev.c > @@ -381,6 +381,40 @@ nix_cq_rq_init(struct rte_eth_dev *eth_dev, struct otx2_eth_dev *dev, > goto fail; > } > > + if (dev->lock_rx_ctx) { > + aq = otx2_mbox_alloc_msg_nix_aq_enq(mbox); > + aq->qidx = qid; > + aq->ctype = NIX_AQ_CTYPE_CQ; > + aq->op = NIX_AQ_INSTOP_LOCK; > + > + aq = otx2_mbox_alloc_msg_nix_aq_enq(mbox); > + if (!aq) { > + /* The shared memory buffer can be full. > + * Flush it and retry > + */ > + otx2_mbox_msg_send(mbox, 0); > + rc = otx2_mbox_wait_for_rsp(mbox, 0); > + if (rc < 0) { > + otx2_err("Failed to LOCK cq context"); > + return rc; > + } > + > + aq = otx2_mbox_alloc_msg_nix_aq_enq(mbox); > + if (!aq) { > + otx2_err("Failed to LOCK rq context"); > + return -ENOMEM; > + } > + } > + aq->qidx = qid; > + aq->ctype = NIX_AQ_CTYPE_RQ; > + aq->op = NIX_AQ_INSTOP_LOCK; > + rc = otx2_mbox_process(mbox); > + if (rc < 0) { > + otx2_err("Failed to LOCK rq context"); > + return rc; > + } > + } > + > return 0; > fail: > return rc; Pavan - sorry for being so ... finicky :) I've said 'replace all "goto fail" with "return rc"' and I meant that. So not only the "goto fail" in you changes but all "goto fail" in that function. Apart from that: Reviewed-by: Andrzej Ostruszka With regards Andrzej PS. Thanks for the patience ;)