Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1120790ybj; Tue, 5 May 2020 13:30:40 -0700 (PDT) X-Google-Smtp-Source: APiQypJYg17/HKGgTxYBlEAmzcjSs4LJtRhepyBx8XtQeqgPXAngf+fHxTc3uFcOr/cRTo2jnJeG X-Received: by 2002:a05:6402:286:: with SMTP id l6mr4333185edv.134.1588710640375; Tue, 05 May 2020 13:30:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588710640; cv=pass; d=google.com; s=arc-20160816; b=evCxdvSR6NBaztjHVT4IrTLxxFSDnqElVbpCpT0+HazmGO9X2QpvJTQg9D65bdcpyv trSVwaNRL1fvECVTa2fan8U4AYcsTHKjtTZK01cLijal2yayjb8wnnlPuKfF2WWrSFJ5 TNAMD+gJHAoaCPmcCRPhwsz9DXHOTHhv8+9AWpLEaxPuAApbCgr852GVKgy9ApX89zPx hdD8s2D0SjQxR6nEn8r26JS2kTBxJ+Zz6H9c/LLmzLeaHDRNMIx2payZcpnkpvIZBU8L yRLrghSrUT6kmwdYj8uo4g4gAod/kavaDvdsoppNMMCbCdlCI0GuvEk7tMhE5GTc+uwO NFXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=+0udm7ytap8x+f7c0c7GLyR6RckHwKdp+5Cg2jXzTLk=; b=UPOcxpCUg2Z7wMXn9hQU22OlBjZz45cjHT280teOXjjrbg4N4RW/z7keBqpnprQlDb X/lMqhSfJOMK3y5vWo+pEXVUeWXq9EhGlO7zclCj6XZ4f0Ojd7FXs+mpOFUC0xs88rjf U3vNw1cpRF2jkvD2bFjXFg2tBvzok7/DU/ZqCVyZNSmWI5R8QjcWH2txx2NBHB8q/Wkt 0xc5VqAwhlAjFBMFHhn5t4NUOBb8B8b1Nw9OIw+1/8DM11a+TFXvyziQUKiBDxRvhXzs xVZUGS8Fl8tjwxcnx2lsvKw+CFr49xa4qaCAef438C2Vfd7XjyIvFtET747yGC9HMRxP 4mSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ChcPFnMl; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si1888067edx.302.2020.05.05.13.30.17; Tue, 05 May 2020 13:30:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ChcPFnMl; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729205AbgEEU2Z (ORCPT + 99 others); Tue, 5 May 2020 16:28:25 -0400 Received: from mail-eopbgr70074.outbound.protection.outlook.com ([40.107.7.74]:6068 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728853AbgEEU2Y (ORCPT ); Tue, 5 May 2020 16:28:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UCix+JVW6qspYcjpcJI8TeaRkTe5DGge1ho4KfBWSHQTZaiOi8e2kxVdbazlP5zuJ2ODGzqd8xIehZg3qOWKw92WqEUkVyKMDPs6R6obO59liNB5uDwghEqG+I103WW/6yzKt3VHu8s3b0s0vb5i+Eij/7GA8/tzTudjd7LtVXFG/OMYGNlGEh7eIJQJZ27qdkJoy1SZY4Cr7xlb7U940T788EDJPuw3Cb/OtiKZ0oLp426TU7/SiNmW0Q6rw/Jky39EqgNSIED8YWhkQFMNueBoK02tebwl3OSLmZrCaIAKh/h1sLRYhumDgnqTwVJ8RkrZfyBW149wenYXhFl5xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+0udm7ytap8x+f7c0c7GLyR6RckHwKdp+5Cg2jXzTLk=; b=dL7oxMcwwP+c0FrAWZc5fC7VUd4yUnq+VhCR2qo1AaUs5Ui2XjRPWErIUPveGQv37l/h8ohSlhP0JhX4QT2qlA1Ifx9bzCTdunb16kK9i75vnwYRijGM8NgQEMYJQs1o34mh3sFuB7+FmpJx4i6yIrJ2atBPztx7QphxlVK4oz+SYD644PK0j5Sak/tO8fgiYYFxAjsB167LQ9TLzJ1uD8LkO1syuNgucTv9L6YGB+O0pEk0wCNzq6l1+n2jQKWd8c/BlAxynpd8VerIocjvBO/Lw2R6HJjVB0m5M8LVbD60sMv03owAXp+Hq62Alt8oZ7AhKjIUcq7GhD9y0vFuww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+0udm7ytap8x+f7c0c7GLyR6RckHwKdp+5Cg2jXzTLk=; b=ChcPFnMlV7bArtOw0Ynr6HpA7XTG8eMTLGLLc6213OjKyJ+bza0S4vN+n43tdmZ2oXCgoYkgI8+J+TYuhl9W6cGrhNWy7DC+hJWFZ+7Je9OQ5GknS325w8lRpCinunmIxQgQtig3zM44Xl3RjrgdFMjevylPBnz2fW6C7dPW9RA= Received: from VE1PR04MB6687.eurprd04.prod.outlook.com (2603:10a6:803:121::30) by VE1PR04MB6349.eurprd04.prod.outlook.com (2603:10a6:803:126::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.29; Tue, 5 May 2020 20:28:20 +0000 Received: from VE1PR04MB6687.eurprd04.prod.outlook.com ([fe80::48b1:c82c:905:da9f]) by VE1PR04MB6687.eurprd04.prod.outlook.com ([fe80::48b1:c82c:905:da9f%3]) with mapi id 15.20.2958.030; Tue, 5 May 2020 20:28:20 +0000 From: Leo Li To: Ioana Ciornei , "davem@davemloft.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Youri Querry Subject: RE: [PATCH net] soc: fsl: dpio: properly compute the consumer index Thread-Topic: [PATCH net] soc: fsl: dpio: properly compute the consumer index Thread-Index: AQHWIxnvaBco/TscSUWgh5JBknwmZ6iZ71hA Date: Tue, 5 May 2020 20:28:19 +0000 Message-ID: References: <20200505201429.24360-1-ioana.ciornei@nxp.com> In-Reply-To: <20200505201429.24360-1-ioana.ciornei@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [136.49.234.194] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: fffcbc3d-d6b5-4c81-90c3-08d7f132d9dc x-ms-traffictypediagnostic: VE1PR04MB6349:|VE1PR04MB6349: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:478; x-forefront-prvs: 0394259C80 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EDUeU5RwkX3kskTHgnVK0rFzS1eawKFKGw5gublMhY3E/RBCNnBHDW3N1qI/8pOQbBdJNTaW85/Nkk6zp7jDLtUaorrEKUDAjeBDkjedthQU3v1Xb0vxkttF0fnUcs1ztmafiUxQJPrlD7z0gETvIq60tK/jh23d3bJsQKFtuX2yYKMpO87z1eDeiKkDMqyNNad2jE3ll/hjsX739XKsUmGEdE0123AukSBrYWmNbweiXXZjNeiXIrR/fsdsKefKUT/agBQQ/BUgkJBEuNbin5DUNdl2yu7Io7GPz2OZY8adkft27Pt3jmtlehtvD+kieFIcnUFcfsB8D7b2JfoC5Zbv7xeICGwclPAkBdrZNsTyMPooPZmxWiaJDpPd0mkkswA0Veo/TQeonTFkPSZc4OdxuVlgoN0NFFj8xmR3wuB5E5Qxj3TGjFq5UD8ebChIipSWmyfIiXODL6sktmR5JwNG6ON2CJpJG1bX3txuliSzZTZY3/bCXXPYu6Jdsmn+E6ty7FiFgpMEh0Y10mQC+A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6687.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(366004)(396003)(376002)(346002)(39840400004)(33430700001)(478600001)(33440700001)(2906002)(33656002)(110136005)(316002)(66946007)(76116006)(6506007)(7696005)(66556008)(64756008)(186003)(4326008)(66476007)(26005)(9686003)(66446008)(52536014)(53546011)(8676002)(55016002)(8936002)(5660300002)(86362001)(71200400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: ld8X//3AQWoeER8b8MoAfnhNPYB/5CtzfhneWJ+IxVccCt5tCU2JQvG0zAJEp9bibPVeWpBqcaV6Q0R2UNL01An1UXTjcUXbbqQKq/MH8TobWoeZMPj3h2FyXjbh+T0XksbJEUKEvm/ZhPJ7i3D/cInfF1bpGy0bbjVQuQJnJJuFI2jKK7AC1Mr14vZTE92IMBm95Cn/F+mqEflNKAOLow8BjFsJLKXY8psusYhn5+Re0HtuOOtFcKOI2vwEs/dF6AAiZt5Jv5QUUbOcPCEDGdhWMTdymrlHJY51S8FUwNN7vWZFJp5Z96hzqB454q+dOmWW6WgrTZnpu/poNleHFgHD6dXy4pXDLsh3+IDG/9ZyeeiVrBhHp9dzrj9ujfcidH1NRY2X+bvcuamkJ76ZvQEu6gl6vZSwaEAbO9MUgvLn0RdJTs4ACGrGjV3njGW2kVkPPb/GsEYjcHThKpUOOPU+pA7hGWY9SwgyEjfQLP+7freUxfuIzEQprCMhgwR/F4DaJgzF/qE4GlVhcGODmiJDBbm6qwYXXBvaKyh+QKDVW7YjZLzJDASU0yn5Q2abqKtTY1zGXYLR7/WmDih7Rvjtcz2GdIO2myH4CIYxv+50dxWbvzcUTXFSp/5shaIkzIfoA9tJWKlHuWxwH93fSdPU2Ir47ctjS7IlWcaR71UuWehQhkbiZ/qPdXu63ncYGL/snoDse2LwcdS1jZatzysM5WBb70hU1watS1WHRKJLMFb6AMkMDVDMfJdogfVcCJDD6HBFQv9qXrpaZN6ukziJmHP4k2mu6qO3KaW9uII= 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: fffcbc3d-d6b5-4c81-90c3-08d7f132d9dc X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2020 20:28:20.1004 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: L+ejT2aROeyRCw92keY5pu16gZO7MA5i4KMp6LooVeFX37Ip8BHzISC4CI6B23eEy6uJck0bKMALOHHJpXY6Qg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6349 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Ioana Ciornei > Sent: Tuesday, May 5, 2020 3:14 PM > To: davem@davemloft.net; netdev@vger.kernel.org; linux- > kernel@vger.kernel.org > Cc: Youri Querry ; Leo Li ; > Ioana Ciornei > Subject: [PATCH net] soc: fsl: dpio: properly compute the consumer index >=20 > Mask the consumer index before using it. Without this, we would be writin= g > frame descriptors beyond the ring size supported by the QBMAN block. >=20 > Fixes: 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array mode with ring > mode enqueue") > Signed-off-by: Ioana Ciornei If you would like it go through net tree. Acked-by: Li Yang > --- >=20 > I am sending this fix through the net tree since the bug manifests itself= only > on net-next and not the soc trees. This way it would be easier to integra= te > this sooner rather than later. Since the description of the patch says it fixes a patch included from soc = tree, it is not very clear why this problem only exists on net-next. >=20 > drivers/soc/fsl/dpio/qbman-portal.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/soc/fsl/dpio/qbman-portal.c > b/drivers/soc/fsl/dpio/qbman-portal.c > index 804b8ba9bf5c..23a1377971f4 100644 > --- a/drivers/soc/fsl/dpio/qbman-portal.c > +++ b/drivers/soc/fsl/dpio/qbman-portal.c > @@ -669,6 +669,7 @@ int qbman_swp_enqueue_multiple_direct(struct > qbman_swp *s, > eqcr_ci =3D s->eqcr.ci; > p =3D s->addr_cena + QBMAN_CENA_SWP_EQCR_CI; > s->eqcr.ci =3D qbman_read_register(s, > QBMAN_CINH_SWP_EQCR_CI); > + s->eqcr.ci &=3D full_mask; >=20 > s->eqcr.available =3D qm_cyc_diff(s->eqcr.pi_ring_size, > eqcr_ci, s->eqcr.ci); > -- > 2.17.1