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 CA79FA0526 for ; Tue, 10 Nov 2020 12:06:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B46492AB; Tue, 10 Nov 2020 12:06:33 +0100 (CET) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by dpdk.org (Postfix) with ESMTP id 14E5D2AB for ; Tue, 10 Nov 2020 12:06:33 +0100 (CET) Received: by mail-wm1-f42.google.com with SMTP id c9so2568158wml.5 for ; Tue, 10 Nov 2020 03:06:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=5Ut/6v7AVlABl/s5Rtzg5b3Rdfa/rdG61UwpgAHSwlc=; b=J/bN9Qe2WYsNinodOzAfNeMLaSxG/zoSQCoZNAdFQZ+em762Ea5cqAe52teJ1miKGy FQEZUFczPYVZLDtrxir8dqV3UtkvL3isRra1j5pHHxP+lb4a3yWNm3/omPsHrDcTjwHT XCSxpZlK9MjSf4K3uLDAMRAIXVt4TQmLT5UgSBEXWPn+3lIgWmnk5AFiaNdxHcHE6Gqy E8F3X36APTyFlS9LSfDSf0+7HflNpe/kCNl9agzwtOE9clqliGINCSqfje22y5ZW5s76 /QGxFqCKl8BD/enLdTvvIYXe2zYr6Gpxj+uyFH1I8EL9QZ20jW45dgEVGN+T4ssxDhHv X7uA== X-Gm-Message-State: AOAM532+KE8R0pYmdg8VJryerxOWooWU5bxHxClAYR51P56Kr976hzqq +Jha0z2cvLFiiEBN6oAwcM0= X-Google-Smtp-Source: ABdhPJynw+kvVxH9QZkbeSkOiGVBHhtp/ONST01JQ4l5Mlzg490h8yJHzkawY5rHvnsuPitHmU6ANw== X-Received: by 2002:a7b:c8c5:: with SMTP id f5mr4090559wml.174.1605006391788; Tue, 10 Nov 2020 03:06:31 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id d3sm17267987wrg.16.2020.11.10.03.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 03:06:31 -0800 (PST) Message-ID: From: Luca Boccassi To: Ankur Dwivedi Cc: Anoob Joseph , dpdk stable Date: Tue, 10 Nov 2020 11:06:30 +0000 In-Reply-To: References: <20201028104606.3504127-207-luca.boccassi@gmail.com> <20201109184111.3463090-1-luca.boccassi@gmail.com> <20201109184111.3463090-18-luca.boccassi@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Subject: Re: [dpdk-stable] [EXT] patch 'crypto/octeontx2: fix multi-process' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Tue, 2020-11-10 at 10:59 +0000, Ankur Dwivedi wrote: > Hi Luca, >=20 > Please find my reply inline. >=20 > Thanks > Ankur >=20 > > -----Original Message----- > > From: luca.boccassi@gmail.com > > Sent: Tuesday, November 10, 2020 12:10 AM > > To: Ankur Dwivedi > > Cc: Anoob Joseph ; dpdk stable > > Subject: [EXT] patch 'crypto/octeontx2: fix multi-process' has been que= ued to > > stable release 19.11.6 > >=20 > > External Email > >=20 > > ---------------------------------------------------------------------- > > Hi, > >=20 > > FYI, your patch has been queued to stable release 19.11.6 > >=20 > > Note it hasn't been pushed to > > https://urldefense.proofpoint.com/v2/url?u=3Dhttp- > > 3A__dpdk.org_browse_dpdk- > > 2Dstable&d=3DDwIDAg&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3DILjiNF3GF25y6QdHZUx > > Ml6JrStU0MIuCtO5dMzn3Ybk&m=3DWJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW > > 9-e8Y9Fs&s=3Dmj0L_xoCfGbVaKeVCZRgKMCSRJvL_VQRL9Ukk60Oyk4&e=3D yet. > > It will be pushed if I get no objections before 11/11/20. So please sho= ut if > > anyone has objections. > >=20 > > Also note that after the patch there's a diff of the upstream commit vs= the > > patch applied to the branch. This will indicate if there was any rebasi= ng > > needed to apply to the stable branch. If there were code changes for re= basing > > (ie: not only metadata diffs), please double check that the rebase was > > correctly done. > >=20 > > Queued patches are on a temporary branch at: > > https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > > 3A__github.com_bluca_dpdk- > > 2Dstable&d=3DDwIDAg&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3DILjiNF3GF25y6QdHZUx > > Ml6JrStU0MIuCtO5dMzn3Ybk&m=3DWJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW > > 9-e8Y9Fs&s=3D7RDdv-ig0gf-Ik31WdzFV8mldqC7ejjFz7eIIlkpPAo&e=3D > >=20 > > This queued commit can be viewed at: > > https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > > 3A__github.com_bluca_dpdk- > > 2Dstable_commit_3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc&d=3DDwIDAg > > &c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3DILjiNF3GF25y6QdHZUxMl6JrStU0MIuCtO5d > > Mzn3Ybk&m=3DWJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW9- > > e8Y9Fs&s=3DpEl2YmNRFwnSh57DYLWRaNYvL4ZiOMv_zTkzBlAsRo4&e=3D > >=20 > > Thanks. > >=20 > > Luca Boccassi > >=20 > > --- > > From 3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc Mon Sep 17 00:00:00 > > 2001 > > From: Ankur Dwivedi > > Date: Thu, 22 Oct 2020 13:20:00 +0530 > > Subject: [PATCH] crypto/octeontx2: fix multi-process > >=20 > > [ upstream commit 9fd11c1583c9b3249f49755b3216a79698e94700 ] > >=20 > > During crypto device probe few functions should be called only for the > > primary process. This patch fixes this issue. > >=20 > > Fixes: 818d138bcce9 ("crypto/octeontx2: add init sequence in probe") > >=20 > > Signed-off-by: Ankur Dwivedi > > Reviewed-by: Anoob Joseph > > --- > > drivers/crypto/octeontx2/otx2_cryptodev.c | 49 +++++++++++-------- > > drivers/crypto/octeontx2/otx2_cryptodev.h | 2 + > > drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 +++-- > > 3 files changed, 40 insertions(+), 24 deletions(-) > >=20 > > diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c > > b/drivers/crypto/octeontx2/otx2_cryptodev.c > > index 417eda6de6..2323de1f60 100644 > > --- a/drivers/crypto/octeontx2/otx2_cryptodev.c > > +++ b/drivers/crypto/octeontx2/otx2_cryptodev.c > > @@ -70,31 +70,34 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv > > __rte_unused, > >=20 > > otx2_dev =3D &vf->otx2_dev; > >=20 > > - /* Initialize the base otx2_dev object */ > > - ret =3D otx2_dev_init(pci_dev, otx2_dev); > > - if (ret) { > > - CPT_LOG_ERR("Could not initialize otx2_dev"); > > - goto pmd_destroy; > > - } > > + if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > > + /* Initialize the base otx2_dev object */ > > + ret =3D otx2_dev_init(pci_dev, otx2_dev); > > + if (ret) { > > + CPT_LOG_ERR("Could not initialize otx2_dev"); > > + goto pmd_destroy; > > + } > >=20 > > - /* Get number of queues available on the device */ > > - ret =3D otx2_cpt_available_queues_get(dev, &nb_queues); > > - if (ret) { > > - CPT_LOG_ERR("Could not determine the number of queues > > available"); > > - goto otx2_dev_fini; > > - } > > + /* Get number of queues available on the device */ > > + ret =3D otx2_cpt_available_queues_get(dev, &nb_queues); > > + if (ret) { > > + CPT_LOG_ERR("Could not determine the number of > > queues available"); > > + goto otx2_dev_fini; > > + } > >=20 > > - /* Don't exceed the limits set per VF */ > > - nb_queues =3D RTE_MIN(nb_queues, > > OTX2_CPT_MAX_QUEUES_PER_VF); > > + /* Don't exceed the limits set per VF */ > > + nb_queues =3D RTE_MIN(nb_queues, > > OTX2_CPT_MAX_QUEUES_PER_VF); > >=20 > > - if (nb_queues =3D=3D 0) { > > - CPT_LOG_ERR("No free queues available on the device"); > > - goto otx2_dev_fini; > > - } > > + if (nb_queues =3D=3D 0) { > > + CPT_LOG_ERR("No free queues available on the > > device"); > > + goto otx2_dev_fini; > > + } > >=20 > > - vf->max_queues =3D nb_queues; > > + vf->max_queues =3D nb_queues; > >=20 > > - CPT_LOG_INFO("Max queues supported by device: %d", vf- > > > max_queues); > > + CPT_LOG_INFO("Max queues supported by device: %d", > > + vf->max_queues); > > + } > >=20 > > dev->feature_flags =3D RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | > > RTE_CRYPTODEV_FF_HW_ACCELERATED | @@ - > > 105,10 +108,14 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv > > __rte_unused, > > RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO | > > RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT; > >=20 > > + if (rte_eal_process_type() =3D=3D RTE_PROC_SECONDARY) > > + otx2_cpt_set_enqdeq_fns(dev); > > + > > return 0; > >=20 > > otx2_dev_fini: > > - otx2_dev_fini(pci_dev, otx2_dev); > > + if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) > [Ankur] For 19.11 branch the above if check is not required as the otx2_d= ev_fini label is reached only by the primary process. For 20.11 branch the = above if check was required but for 19.11 branch it is not required. So if = its possible can you remove the if check during merging? As a generic process, I try to keep the diff from mainline as minimal as possible, as it makes the backporting process much simpler and smoother - more patches apply without changes. Unless there's a specific reason to remove this (eg: it would break something if it's left in) I'd leave it as is. --=20 Kind regards, Luca Boccassi