From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0000EA0471 for ; Mon, 17 Jun 2019 10:27:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 310401BC75; Mon, 17 Jun 2019 10:27:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 657C51BB43 for ; Mon, 17 Jun 2019 10:27:34 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5H8RVZ9002400 for ; Mon, 17 Jun 2019 01:27:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=MeCd9vHe/qjBIDkYbi2ZRDXJQ021GExMj7Ewmbka0QI=; b=tF781oO8qpWZbwHsQixxk5eGB9y0VHTjL430LgRwZPTl43HPMojE/Z0YSv/p6MaYOwmF Q7XEzXSDzvODRteKMkZczBwPzzQpUPuNxSMQCMufY7EI82BZiyNSSoKq5Y91BeXHrZMO jEZZkkeGO9cYYlcI33NMpQQtmYdctiq2XhuMW2jSOqNMEvvxxKU99lHZz+ZF95L4Osro +vE/YUa44zhmlAiUclJOhqaOBIQLs4bgU9d5ZZi5T9hNMUqHJ4f/RFzI5r2C73pbfZQD tfU93xgrN+uaoGo0zWcP1Iu4WYbfXisxsAnAhsQ3a/Z7Iv6kQFSgGO7JBjZ4gACz6pbg bA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2t506hwvfa-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 17 Jun 2019 01:27:33 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 17 Jun 2019 01:27:12 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.50) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 17 Jun 2019 01:27:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MeCd9vHe/qjBIDkYbi2ZRDXJQ021GExMj7Ewmbka0QI=; b=PVindnr46rVC7q2XAN+NyspcyqLQW8Q9R6HPotFOA2k10mLYyTxbrNx/Jr5+fgjzpMU5kqag9u/p3R7G+4hsyvbCZHddApAVq9q0YRsihU6cCB9d7JYC6u+VcE5/sZGohOYYSwwSKdg7kRnbpXoM/BzlTlR5NWq482sT6VFJCgM= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2646.namprd18.prod.outlook.com (20.179.92.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.11; Mon, 17 Jun 2019 08:27:11 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::75fd:a528:a1bf:bef4]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::75fd:a528:a1bf:bef4%3]) with mapi id 15.20.1987.014; Mon, 17 Jun 2019 08:27:11 +0000 From: Jerin Jacob Kollanukkaran To: Pavan Nikhilesh Bhagavatula , "Pavan Nikhilesh Bhagavatula" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 34/44] event/octeontx2: allow adapters to resize inflight buffers Thread-Index: AQHVGKvQOwwsyQjyn0uKaNbIjfti5Kafm2ng Date: Mon, 17 Jun 2019 08:27:11 +0000 Message-ID: References: <20190601185355.370-1-pbhagavatula@marvell.com> <20190601185355.370-35-pbhagavatula@marvell.com> In-Reply-To: <20190601185355.370-35-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.140.231.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e022d11a-6571-4526-1429-08d6f2fd9872 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR18MB2646; x-ms-traffictypediagnostic: BYAPR18MB2646: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2733; x-forefront-prvs: 0071BFA85B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39850400004)(396003)(366004)(346002)(376002)(189003)(199004)(13464003)(71200400001)(4326008)(229853002)(486006)(66446008)(14454004)(74316002)(66946007)(73956011)(11346002)(476003)(7736002)(305945005)(6246003)(8936002)(6436002)(446003)(81156014)(8676002)(33656002)(53936002)(81166006)(55016002)(64756008)(66556008)(76116006)(66476007)(6636002)(25786009)(66066001)(2906002)(86362001)(5660300002)(3846002)(6116002)(6506007)(256004)(9686003)(53546011)(316002)(7696005)(52536014)(186003)(102836004)(478600001)(55236004)(99286004)(110136005)(26005)(76176011)(71190400001)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2646; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: TiK3uc4DghK20cWoXoyebK5dUT1fFs9DYodpJAUvnOlWaXPsAtdBwbvjcNn1uik5wdSPMKEFMNYctRXVbwJPlYdxZpmTmNHrm4UTo8JwitvhpLhJrHcKYgBSRzcLWW//g1+VKDz1N44mb0j7Yilrxk4pH6+4oqB4MIkZBxfQch/+cwBK/fkR8P/Gf5NisMv3QjHxRdVNARTLKmvm2VM5yQEyC2SyO4ce4TSUm8gPzGHj87m0V7GWlItanPiTiQ8MbnAf1hXKB7HLI6v4QrSPCbOxw3B/31mycM4TP7irZp2b9ZTpYNwEzuZooFPirDTsBLFuQhRdOjEynECcQs7PZLTGODtc6NrYwgi8BiFzswaxmrhrZAhiAcyEQzl52vn/K7gPJOc9zGsAd+z0R6LYxELOHzjPkmUVMcqeq4gUvyU= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e022d11a-6571-4526-1429-08d6f2fd9872 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2019 08:27:11.6655 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jerinj@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2646 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-17_05:, , signatures=0 Subject: Re: [dpdk-dev] [PATCH 34/44] event/octeontx2: allow adapters to resize inflight buffers 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" > -----Original Message----- > From: pbhagavatula@marvell.com > Sent: Sunday, June 2, 2019 12:24 AM > To: Jerin Jacob Kollanukkaran ; Pavan Nikhilesh > Bhagavatula > Cc: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 34/44] event/octeontx2: allow adapters to resi= ze > inflight buffers >=20 > From: Pavan Nikhilesh >=20 > Add internal SSO functions to allow event adapters to resize SSO buffers = that are > used to hold in-flight events in DRAM. >=20 > Signed-off-by: Pavan Nikhilesh > --- > drivers/event/octeontx2/Makefile | 1 + > drivers/event/octeontx2/meson.build | 1 + > drivers/event/octeontx2/otx2_evdev.c | 31 ++++++++++++++++++++++ > drivers/event/octeontx2/otx2_evdev.h | 5 ++++ > drivers/event/octeontx2/otx2_evdev_adptr.c | 19 +++++++++++++ > drivers/event/octeontx2/otx2_tim_evdev.c | 5 ++++ > 6 files changed, 62 insertions(+) > create mode 100644 drivers/event/octeontx2/otx2_evdev_adptr.c >=20 > diff --git a/drivers/event/octeontx2/Makefile > b/drivers/event/octeontx2/Makefile > index 2290622dd..6f8d9fe2f 100644 > --- a/drivers/event/octeontx2/Makefile > +++ b/drivers/event/octeontx2/Makefile > @@ -33,6 +33,7 @@ LIBABIVER :=3D 1 > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) +=3D > otx2_worker_dual.c > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) +=3D otx2_worker.c > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) +=3D otx2_evdev.c > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) +=3D > otx2_evdev_adptr.c > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) +=3D > otx2_tim_evdev.c > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) +=3D > otx2_evdev_selftest.c > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) +=3D > otx2_evdev_irq.c diff --git a/drivers/event/octeontx2/meson.build > b/drivers/event/octeontx2/meson.build > index ad7f2e084..c709b5e69 100644 > --- a/drivers/event/octeontx2/meson.build > +++ b/drivers/event/octeontx2/meson.build > @@ -5,6 +5,7 @@ > sources =3D files('otx2_worker.c', > 'otx2_worker_dual.c', > 'otx2_evdev.c', > + 'otx2_evdev_adptr.c', > 'otx2_evdev_irq.c', > 'otx2_evdev_selftest.c', > 'otx2_tim_evdev.c', > diff --git a/drivers/event/octeontx2/otx2_evdev.c > b/drivers/event/octeontx2/otx2_evdev.c > index 86b9fee97..534ac4a6b 100644 > --- a/drivers/event/octeontx2/otx2_evdev.c > +++ b/drivers/event/octeontx2/otx2_evdev.c > @@ -529,6 +529,9 @@ sso_xaq_allocate(struct otx2_sso_evdev *dev) > xaq_cnt =3D dev->nb_event_queues * OTX2_SSO_XAQ_CACHE_CNT; > if (dev->xae_cnt) > xaq_cnt +=3D dev->xae_cnt / dev->xae_waes; > + else if (dev->adptr_xae_cnt) > + xaq_cnt +=3D (dev->adptr_xae_cnt / dev->xae_waes) + > + (OTX2_SSO_XAQ_SLACK * dev->nb_event_queues); > else > xaq_cnt +=3D (dev->iue / dev->xae_waes) + > (OTX2_SSO_XAQ_SLACK * dev->nb_event_queues); @@ > -1025,6 +1028,34 @@ sso_cleanup(struct rte_eventdev *event_dev, uint8_t > enable) > otx2_mbox_process(dev->mbox); > } >=20 > +int > +sso_xae_reconfigure(struct rte_eventdev *event_dev) { > + struct otx2_sso_evdev *dev =3D sso_pmd_priv(event_dev); > + struct rte_mempool *prev_xaq_pool; > + int rc =3D 0; > + > + if (event_dev->data->dev_started) > + sso_cleanup(event_dev, 0); > + > + prev_xaq_pool =3D dev->xaq_pool; > + dev->xaq_pool =3D NULL; > + sso_xaq_allocate(dev); > + rc =3D sso_ggrp_alloc_xaq(dev); > + if (rc < 0) { > + otx2_err("failed to alloc xaq to ggrp %d", rc); s/failed/Failed to maintain the consistency across the driver.