From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20072.outbound.protection.outlook.com [40.107.2.72]) by dpdk.org (Postfix) with ESMTP id A61331B015; Wed, 24 Jan 2018 06:24:58 +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=BxlfEw2PlPJC3s9zj5JpvozX+yMQ+d3EAC8mgyaqbxc=; b=ov0VC46CjY19vhp82rWt08moKKj+YUNg2dkVbeGVEbUFASb+1h+FfC0uTpFVGRLlIuPQpHaYSerOoRUirVpVVWQNbOtc65r5RdK3uhfDtoO+wlBPB86nA9x+8aHZxuH75bQmK8dkjd17XDvwDV9+1Jybs12DQEKUTNnaEMsVr9Q= Received: from AM2PR04MB0753.eurprd04.prod.outlook.com (10.160.56.141) by DB6PR0401MB2424.eurprd04.prod.outlook.com (10.168.55.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Wed, 24 Jan 2018 05:24:57 +0000 Received: from AM2PR04MB0753.eurprd04.prod.outlook.com ([fe80::611d:d573:928:ad23]) by AM2PR04MB0753.eurprd04.prod.outlook.com ([fe80::611d:d573:928:ad23%13]) with mapi id 15.20.0428.019; Wed, 24 Jan 2018 05:24:56 +0000 From: Hemant Agrawal To: Nipun Gupta , "thomas@monjalon.net" CC: "dev@dpdk.org" , Shreyansh Jain , "stable@dpdk.org" Thread-Topic: [PATCH 1/7 v2] bus/dpaa: check flag in qman multi enqueue Thread-Index: AQHTlEWeWpeBFDz9a0O3w5lL+8NG0aOCfpJw Date: Wed, 24 Jan 2018 05:24:56 +0000 Message-ID: References: <1516710671-13897-1-git-send-email-nipun.gupta@nxp.com> <1516710427-22843-1-git-send-email-nipun.gupta@nxp.com> <1516710427-22843-2-git-send-email-nipun.gupta@nxp.com> In-Reply-To: <1516710427-22843-2-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=hemant.agrawal@nxp.com; x-originating-ip: [192.88.169.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0401MB2424; 6:YgjZ1aT7Dm6h6OCPY1f6HaOBCpUNMsObfc6xqLW0eY41K8VJWzSyDMDg8NlKQX2zCUYHEACZywgnHWquCrpZVuHFu0GuapiIooASnXi4xVx3UyeQifFi6mafsvkzAEAv4uSb31IaeB5QEMNDDfNGIdJkIBz1AlmsG5e5Uz+iZb6a6WXvtcWX7Q6ymFH8OiNCWo2ahEJHQgl4sz4CWMNwBlv7zEe8PTXxhmBL+rcLDVTVoPYrzexemoUoNBZxn2vwFyty0spk6pC36tcdcYTnXyi3b/E6UerbuwUl02PVHZGU3UKJc7RVJ+gbhpr4Q006tVxhLaD2DsPpmE2j9EJaDogckEafNH6Kbgo3ZSb+CF/XxAgbw8G4viEnzgmcmn7n; 5:xfQqhGgEQgoPGKYSN5vMNI5VHZmspSooOiL6EwfiKkKXMmisBdanjZCUG/UO7VjmPM1kZCEHl9c18k2tv2oO6seu50oPcbQLpH6SbXcosqnVxSROaDVpCpN8/IRQjQYlTezBt1fRzahvO9QQ/jsDfQRLmmlvfQTEM2cc/moQJAw=; 24:YUI6CwyiDeZxvvXypm5VNfoS4tQrDzrXcr3CIVzz5Mr4cPXmN708/Giolh4YzKSBAwZrvCSrxJBRkvNhH7VyGYAN3WDJbRjAOSScmCLtjxQ=; 7:ujO9ACC7q5NnL9BlYIHhFA0FodYJeAd22AqzWedbyD9SYTJ9z2Ph1N1K0OzwzhJJmXMhxwTs9obVJfaJR+ebVhoUO5ergZT6JEnmURUtQ8D9LZyB2jTvOOZIsbEDZUVTq8IjAVy/x5TzzhFfjlqYNzoAjnIlz0iJ1XLe3CXqDeE2hjwWbXRpYpG636+ZhzHaBHf/hpC6ytkWE3fEUXNrX61qeRmVMSnPETAz3nHnUmNDp+d92CXZyu8wT8CFuzD2 x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(396003)(346002)(376002)(39860400002)(39380400002)(366004)(13464003)(189003)(199004)(6246003)(33656002)(316002)(4326008)(5660300001)(2950100002)(14454004)(97736004)(478600001)(54906003)(110136005)(99286004)(2906002)(5250100002)(2501003)(2900100001)(86362001)(3846002)(3280700002)(6116002)(3660700001)(106356001)(305945005)(55016002)(25786009)(66066001)(229853002)(53936002)(68736007)(105586002)(8936002)(7736002)(26005)(102836004)(81156014)(59450400001)(9686003)(6436002)(6506007)(74316002)(8676002)(81166006)(76176011)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0401MB2424; H:AM2PR04MB0753.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f1d5213d-658d-4d82-72a6-08d562eace18 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:DB6PR0401MB2424; x-ms-traffictypediagnostic: DB6PR0401MB2424: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231023)(2400081)(944501161)(6055026)(6041288)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:DB6PR0401MB2424; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0401MB2424; x-forefront-prvs: 056297E276 received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: hTB/5UrF0CmIEBICMi6JeTRFgY+sNgyd2jChskLgl6z/Rvm1lgTyT6SzqgoHULZ4P46E+97jlFf96fzQb4mPzQ== 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: f1d5213d-658d-4d82-72a6-08d562eace18 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2018 05:24:56.1589 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2424 Subject: Re: [dpdk-stable] [PATCH 1/7 v2] bus/dpaa: check flag in qman multi enqueue 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: , X-List-Received-Date: Wed, 24 Jan 2018 05:24:58 -0000 > -----Original Message----- > From: Nipun Gupta [mailto:nipun.gupta@nxp.com] > A caller may/may not pass the flags in qman enqueue multi API. > This patch adds a check on that flag and only accesses it if passed by th= e > caller. >=20 > Fixes: 43797e7b4774 ("bus/dpaa: support event dequeue and > consumption") > Cc: stable@dpdk.org >=20 > Signed-off-by: Nipun Gupta > --- > drivers/bus/dpaa/base/qbman/qman.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/bus/dpaa/base/qbman/qman.c > b/drivers/bus/dpaa/base/qbman/qman.c > index 609bc76..e7fdf03 100644 > --- a/drivers/bus/dpaa/base/qbman/qman.c > +++ b/drivers/bus/dpaa/base/qbman/qman.c > @@ -2198,7 +2198,7 @@ int qman_enqueue_multi(struct qman_fq *fq, > eq->fd.addr =3D cpu_to_be40(fd->addr); > eq->fd.status =3D cpu_to_be32(fd->status); > eq->fd.opaque =3D cpu_to_be32(fd->opaque); > - if (flags[i] & QMAN_ENQUEUE_FLAG_DCA) { > + if (flags && (flags[i] & QMAN_ENQUEUE_FLAG_DCA)) { > eq->dca =3D QM_EQCR_DCA_ENABLE | > ((flags[i] >> 8) & QM_EQCR_DCA_IDXMASK); > } Series- Acked-by: Hemant Agrawal