From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50089.outbound.protection.outlook.com [40.107.5.89]) by dpdk.org (Postfix) with ESMTP id 9D5797D30 for ; Thu, 4 Jan 2018 10:56:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=11nNbVhY6iGnYqNG2kbtf6kdicWAzSRMKk9iSlihMS8=; b=Hwd9Q9O9Y4ekhH7pXhREixGiAoEDruAcUU7BEEZbCzf7wfsy+KdDCN138ClWpR0nxYV6DW0T+j7ELCcshEBwfNlJjeMSKVJq2w+67X1eEKltd3vSZJ42jkP+juEXJMGCqOW/whsjHlvonaZ21oalBiC8NWqa/5o+/lDzltRELDo= Received: from DB6PR0401MB2424.eurprd04.prod.outlook.com (10.168.55.27) by DB6PR0401MB2422.eurprd04.prod.outlook.com (10.168.55.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.366.8; Thu, 4 Jan 2018 09:56:32 +0000 Received: from DB6PR0401MB2424.eurprd04.prod.outlook.com ([fe80::7803:6c9d:3363:c55f]) by DB6PR0401MB2424.eurprd04.prod.outlook.com ([fe80::7803:6c9d:3363:c55f%17]) with mapi id 15.20.0366.009; Thu, 4 Jan 2018 09:56:31 +0000 From: Nipun Gupta To: Nipun Gupta , "jerin.jacob@caviumnetworks.com" CC: "dev@dpdk.org" , Hemant Agrawal Thread-Topic: [PATCH 5/6] bus/dpaa2: add flag to configure DCA in QBMAN multi Tx Thread-Index: AQHThUGiHI0dnoKWEEWpEqpznVd3A6Njec2g Date: Thu, 4 Jan 2018 09:56:31 +0000 Message-ID: References: <1515081985-19351-1-git-send-email-nipun.gupta@nxp.com> <1515081985-19351-6-git-send-email-nipun.gupta@nxp.com> In-Reply-To: <1515081985-19351-6-git-send-email-nipun.gupta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; x-originating-ip: [192.88.169.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0401MB2422; 6:Q0K2ak7zW4GizEJhQ53DsMeuemggPu4/YgROm/fftfASroDmP6IGaUuVgVBXLDQcDI2rs2yksWFWPaxXfZw/HFJC9z1UQwRsxTQKEQYBUafwP8C+pUwXCOS+KMh/n1sDNAD6jH3wCIwVk19cCupIYYFGiPc+ZAH8dqrRGHRbZVK/6DMGkjLOKaJKo450OrHxhYbU+0SfmVJhs8+ww5USvd3UyGX6Hu4TUNuVsi95hXz3kFaqHr+DK9AWE1+qPzDiu9yiZ7SgZZVVM4k0r7dC+rPVvbfcJ2AdUsBpeojH8pH4tC9Goq621NZNOUQR7RMOpbmKdjTXLRY9MMOdl0BxhzojsXvw6+DGbL5OcA6X+UM3TYjeX3MqOjNSY9UDdM9N; 5:tT0c0USzzMGvHz7mHHeTJrMa9c7SJRKAM6/EF1vSkrA8v0E1ZzKYqvUd2btkucfIKxDVGUShJM2deywi2WXIU8sOIb/8iG+55jvqLzjMH2DFE6iTzMSr7VGndK4VnmcY1QkD/+/SSvd/Is45/roo2ADm+8UHwxCJ76+/Ys2Nd6k=; 24:0SQOXKFVmUTPQ5OyQ+3Wl81uXGf7PmvQhfO4gdieuerQUibYupRet19kVAbza89ion+v8n3crzGJl9JYrGrdpTFInSQQJNVQTRMRgF1Gd3Q=; 7:ct2T4S33DzoWFmh3hDk7z8/vmCNRypY6O7Cw66G8En12Z3uE6SroFgroTCGwQBQCSqbqkUs3NnUb/cfhQR7WFHptLVfDDvOCJZWbfGYla0tEK5oUqjBZI9CZ28+it9AUYmB6RbceEDjvtmMd1IAufp/da2xrcv6oidMttCB2tEhrFvBqtEwIIcr+BjJJKzqJ8WLME8y7TM91OMcrW1Lw3f/EeancudLRg0lxnduzSesh6z9h7PITe3P3AMsFLivm x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(979002)(366004)(346002)(376002)(39860400002)(396003)(39380400002)(22813001)(189003)(13464003)(199004)(59450400001)(81166006)(316002)(68736007)(5660300001)(8936002)(33656002)(2501003)(2950100002)(54906003)(53546011)(110136005)(5250100002)(14454004)(478600001)(97736004)(6116002)(3846002)(106356001)(105586002)(66066001)(2900100001)(6506007)(2906002)(86362001)(575784001)(3280700002)(3660700001)(25786009)(7736002)(4326008)(229853002)(74316002)(6246003)(305945005)(102836004)(53936002)(99286004)(76176011)(55016002)(81156014)(9686003)(7696005)(6436002)(8676002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0401MB2422; H:DB6PR0401MB2424.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:3; A:1; LANG:en; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ed8c226f-f841-4df1-cd2c-08d553596ec5 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060); SRVR:DB6PR0401MB2422; x-ms-traffictypediagnostic: DB6PR0401MB2422: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(275809806118684); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231023)(944501075)(6055026)(6041268)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB6PR0401MB2422; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DB6PR0401MB2422; x-forefront-prvs: 054231DC40 received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: was8hEBS7OKgUU5ONLrgzvs2UlXH8e9se91u/cElBctlyrrJC0+GbtfmABUyXjhbxZ29L12+AnDzguNVgwHOqw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed8c226f-f841-4df1-cd2c-08d553596ec5 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2018 09:56:31.7663 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2422 Subject: Re: [dpdk-dev] [PATCH 5/6] bus/dpaa2: add flag to configure DCA in QBMAN multi Tx 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: , X-List-Received-Date: Thu, 04 Jan 2018 09:56:39 -0000 Sent this particular patch by mistake. Please ignore. I have rejected this patch in the patchworks. Thanks, Nipun > -----Original Message----- > From: Nipun Gupta [mailto:nipun.gupta@nxp.com] > Sent: Thursday, January 04, 2018 21:36 > To: jerin.jacob@caviumnetworks.com > Cc: dev@dpdk.org; Hemant Agrawal ; Nipun Gupta > > Subject: [PATCH 5/6] bus/dpaa2: add flag to configure DCA in QBMAN multi = Tx >=20 > With the current QBMAN multi-tx API, we need to create separate > enqueue descriptors for each of the packet which is required to > be enqueued to the hardware, once we support Atomic Queues > (with DCA) in dpaa2 drivers. Creating enqueue descriptor for > each packet is costly and have significant performance impact. > This patch introduces a flag parameter in the QBMAN multi-tx API, > so that DCA configuration (and later on ORP/ODP for ordered queues) > can be passed using flags and be updated in the EQCR using this flag. >=20 > Signed-off-by: Nipun Gupta > --- > drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h | 5 +++++ > drivers/bus/fslmc/qbman/qbman_portal.c | 7 +++++++ > drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1 + > drivers/net/dpaa2/dpaa2_rxtx.c | 6 ++++-- > 4 files changed, 17 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h > b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h > index efa4861..da0c694 100644 > --- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h > +++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h > @@ -588,6 +588,9 @@ static inline int qbman_result_is_SCN(const struct > qbman_result *dq) > /* volatile dequeue command is expired */ > #define QBMAN_DQ_STAT_EXPIRED 0x01 >=20 > +#define QBMAN_EQCR_DCA_IDXMASK 0x0f > +#define QBMAN_ENQUEUE_FLAG_DCA (1ULL << 31) > + > /** > * qbman_result_DQ_flags() - Get the STAT field of dequeue response > * @dq: the dequeue result. > @@ -971,6 +974,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const > struct qbman_eq_desc *d, > * @s: the software portal used for enqueue. > * @d: the enqueue descriptor. > * @fd: the frame descriptor to be enqueued. > + * @flags: bit-mask of QBMAN_ENQUEUE_FLAG_*** options > * @num_frames: the number of the frames to be enqueued. > * > * Return the number of enqueued frames, -EBUSY if the EQCR is not ready= . > @@ -978,6 +982,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const > struct qbman_eq_desc *d, > int qbman_swp_enqueue_multiple(struct qbman_swp *s, > const struct qbman_eq_desc *d, > const struct qbman_fd *fd, > + uint32_t *flags, > int num_frames); > /** > * qbman_swp_enqueue_multiple_desc() - Enqueue multiple frames with > diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c > b/drivers/bus/fslmc/qbman/qbman_portal.c > index 314a70e..d3023d9 100644 > --- a/drivers/bus/fslmc/qbman/qbman_portal.c > +++ b/drivers/bus/fslmc/qbman/qbman_portal.c > @@ -518,6 +518,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const > struct qbman_eq_desc *d, > int qbman_swp_enqueue_multiple(struct qbman_swp *s, > const struct qbman_eq_desc *d, > const struct qbman_fd *fd, > + uint32_t *flags, > int num_frames) > { > uint32_t *p; > @@ -560,6 +561,12 @@ int qbman_swp_enqueue_multiple(struct qbman_swp > *s, > p =3D qbman_cena_write_start_wo_shadow(&s->sys, > QBMAN_CENA_SWP_EQCR(eqcr_pi & > 7)); > p[0] =3D cl[0] | s->eqcr.pi_vb; > + if (flags && (flags[i] & QBMAN_ENQUEUE_FLAG_DCA)) { > + struct qbman_eq_desc *d =3D (struct qbman_eq_desc *)p; > + > + d->eq.dca =3D (1 << QB_ENQUEUE_CMD_DCA_EN_SHIFT) > | > + ((flags[i]) & QBMAN_EQCR_DCA_IDXMASK); > + } > eqcr_pi++; > eqcr_pi &=3D 0xF; > if (!(eqcr_pi & 7)) > diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c > b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c > index 5e52390..32e19b7 100644 > --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c > +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c > @@ -699,6 +699,7 @@ > while (loop < frames_to_send) { > loop +=3D qbman_swp_enqueue_multiple(swp, &eqdesc, > &fd_arr[loop], > + NULL, > frames_to_send - > loop); > } >=20 > diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxt= x.c > index 9b66bd3..6c4fddb 100644 > --- a/drivers/net/dpaa2/dpaa2_rxtx.c > +++ b/drivers/net/dpaa2/dpaa2_rxtx.c > @@ -787,7 +787,8 @@ void __attribute__((hot)) > loop =3D 0; > while (loop < frames_to_send) { > loop +=3D qbman_swp_enqueue_multiple(swp, &eqdesc, > - &fd_arr[loop], frames_to_send - loop); > + &fd_arr[loop], NULL, > + frames_to_send - loop); > } >=20 > num_tx +=3D frames_to_send; > @@ -803,7 +804,8 @@ void __attribute__((hot)) >=20 > while (i < loop) { > i +=3D qbman_swp_enqueue_multiple(swp, &eqdesc, > - &fd_arr[i], loop - i); > + &fd_arr[i], NULL, > + loop - i); > } > num_tx +=3D loop; > } > -- > 1.9.1