From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D38D4C43381 for ; Tue, 19 Feb 2019 09:30:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E62921904 for ; Tue, 19 Feb 2019 09:30:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="fRfpk77O" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726763AbfBSJag (ORCPT ); Tue, 19 Feb 2019 04:30:36 -0500 Received: from mail-eopbgr30042.outbound.protection.outlook.com ([40.107.3.42]:64304 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726289AbfBSJaf (ORCPT ); Tue, 19 Feb 2019 04:30:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M72qLkNORQVKLo/LTfz1+3yw8fEj2gc50RNUIQ+8Vk4=; b=fRfpk77OmacBsJjHSNDKm4pxwJbPoiQrxjrl0mP61cn4OOK9Yd7hqhGWGqhIuy3UHi9rWZYXrlsYrT0IB4He/2FCSA68gtbECNC0f3PJTwvGDkfKisL6jiynL1i9YlZ3CZHnnz0SCkYmsEEtHgIdbwIY6R6/bjbK6J61v7Wz5/U= Received: from AM6PR05MB5240.eurprd05.prod.outlook.com (20.177.196.214) by AM6PR05MB6311.eurprd05.prod.outlook.com (20.179.5.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Tue, 19 Feb 2019 09:30:32 +0000 Received: from AM6PR05MB5240.eurprd05.prod.outlook.com ([fe80::3542:889c:3a85:3866]) by AM6PR05MB5240.eurprd05.prod.outlook.com ([fe80::3542:889c:3a85:3866%5]) with mapi id 15.20.1643.014; Tue, 19 Feb 2019 09:30:31 +0000 From: Ido Schimmel To: David Miller CC: "netdev@vger.kernel.org" , Jiri Pirko , Petr Machata , mlxsw Subject: Re: [PATCH net] mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable Thread-Topic: [PATCH net] mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable Thread-Index: AQHUxpECM8fyEF/wjkiAGoGq3Nm3/6XkbbEAgAJwroA= Date: Tue, 19 Feb 2019 09:30:31 +0000 Message-ID: <20190219093029.GA10647@splinter> References: <20190217071809.19295-1-idosch@mellanox.com> <20190217.101440.744217887687576351.davem@davemloft.net> In-Reply-To: <20190217.101440.744217887687576351.davem@davemloft.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR04CA0029.eurprd04.prod.outlook.com (2603:10a6:206:1::42) To AM6PR05MB5240.eurprd05.prod.outlook.com (2603:10a6:20b:64::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e423d6ee-5595-4f00-9a53-08d6964ce490 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR05MB6311; x-ms-traffictypediagnostic: AM6PR05MB6311: x-microsoft-exchange-diagnostics: =?us-ascii?Q?1;AM6PR05MB6311;23:KdB2PmV/u457zUhcMtCEETOKq9f++T7X6qWOiM5Ko?= =?us-ascii?Q?yvNXytqsGa4fSkK+edlT3LiIrm2vp4CZpMgTWvl0DhOmNgpsOaIZk9gZ8MIm?= =?us-ascii?Q?RJAPJcItPGXCX1hby66l677PA9Gi4RhN4MsoaPnoPCt3fPQVCu7pplNsqpqO?= =?us-ascii?Q?UFDBWE27eLEbEDTyrNVl1j+PBkh7FhAcaxWnD7zh66ICzM2sIw6SfZLoqVKw?= =?us-ascii?Q?b9/jVu3Ez5ZoAUrZtqn8pHjL4JoaYaKqmrnq50X6bXRss2B4s0uuQ+y8PY7w?= =?us-ascii?Q?WvSlluldEzzHreGnFQTzHJ1fO8646C+MnpVx0mXr4GaYiRMmb4rtyWjgtHOK?= =?us-ascii?Q?dob3Ggvog4Y6EBw87fMG/sVAOzdd2CQHFBEB3L+/Sm92MKQOIL1bCThj6x5L?= =?us-ascii?Q?Sle9INb+7u60HfNDjWjbxDmRiwnp6oeXALIe1/NcEPri9lyZdlrKVekFoJZn?= =?us-ascii?Q?ATLa9F0HZ2cYnGoqDwXlnJ+E9K/eglb71zesaKk8priwAOSHglhfEzR380zw?= =?us-ascii?Q?KIjxajScNAckrU9jo24K55/x34q2lxglzTjeEvWWA7mS0oyDzRVJgets0qAu?= =?us-ascii?Q?/Jc6M/qB1iJ5YMNJThhiTVnsSZhzEkBTa85MfpgBPy9y2b670xAHaV+58f+3?= =?us-ascii?Q?PpNxO9mxE3n7JQ2Nh+45y4MNuBMBmJZkEsBMPhCcKTU9a0o3RKwN4ZLcBn+t?= =?us-ascii?Q?Qj969C75WpHyL5EyKrAyFqiKqEUH9YfcTnLGMnFgCWz5THSDmv/T7yhr/kq/?= =?us-ascii?Q?R1isWcomhKyFDj/SDk3KLdt69+nD+/dAYyxPUiAcoAK1gytofArjw2gv0QFm?= =?us-ascii?Q?0a+1R544SeG/FGZ1cQ4c/mNiNCDH6AH9wJjpA2LB40ZEtz3Y2YLgTEo6sQqS?= =?us-ascii?Q?y9hhCHArMCU/CitV3DeAKScgvyYwIZKqa/NVGwJv9gR3E4ZJ1CBknCVqh3OU?= =?us-ascii?Q?07GjHGaZWO6ai9NUmweALglkTWEW/gyirbeBeWLOMpOBoatBm8m3XbdBfZ6R?= =?us-ascii?Q?+K6GsW8zx1Bto+JTIarVh4pSUWxUCZ6lDKP4YjFeIhTq13rocxpi9jTwDWkZ?= =?us-ascii?Q?3Rb1tlKdgdIzqeNS+iCkpucztUuG92nH/iKR7YBKNNajrEX1wGovWQyQlgv6?= =?us-ascii?Q?0p1H1NP8StTO/QPZObeUy2SlxY0akC1XeA33Yj8rF1JgkDH9cehmiI8Jdf2D?= =?us-ascii?Q?OYBk7uxSPZNWBHlXsmNEOSp1muDdS9D8HOY+JkrlPW7xQiXmvGJ1obQ4BQ2z?= =?us-ascii?Q?l9ocrQaVCdvnqOgKKSSEyww1JBg/9ySrx7H+E8lJd/RDl5636RibXRLItoYV?= =?us-ascii?Q?a9ACQFTIuZcZ2q9RTu/8XhnSCXnYkA33Ih1AN0PxlmJWlg85RogpqwFBuH9r?= =?us-ascii?Q?SoRDYRdjCDzEwA8DrEB6e3E7e9+zXA4z+sAm9XETaPwlZqx?= x-microsoft-antispam-prvs: x-forefront-prvs: 09538D3531 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(7916004)(366004)(346002)(39860400002)(396003)(376002)(136003)(199004)(189003)(5660300002)(446003)(71200400001)(102836004)(107886003)(76176011)(52116002)(99286004)(11346002)(81156014)(8676002)(81166006)(66066001)(26005)(68736007)(305945005)(33896004)(86362001)(71190400001)(6916009)(14454004)(25786009)(486006)(6246003)(476003)(54906003)(4326008)(316002)(7736002)(1076003)(3846002)(256004)(478600001)(229853002)(97736004)(6116002)(53936002)(33656002)(105586002)(9686003)(6512007)(8936002)(386003)(6506007)(2906002)(186003)(6486002)(33716001)(106356001)(6436002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB6311;H:AM6PR05MB5240.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 111oxxzHKkhBXKVcU40Ixs37Xts5HaGnSLzrc19t2+Wmmxfp9tsPHJy24P0tcpRfes2yb5Q/RtjSFZre30aYEa/F3a4T2DG9MSwYZlc6qGgK4Ju0/h7GytMDWOI5Egj6c/pgM3V6x7gzpAKp6ovkk1WGi04QG0cci7okVwCCf3dYROPWnv0OfaUpYVdzeXV6J9L1tyc8RfnREY2y1DIN+ww8hmP94HcPnesN+8YJslcj3uxVQCT7HRT0NEAoeEUgPQknr+N000doCVC9KT7XlY+0LQtZQRBcHQM9q6Uh2y4+iLZC4HhP87V37pJrL2nmA2ubEH2zzs/zzt+hBhPqv1BGzK/Oo7qMmV1YXLy8OBNDtIZNlLC1ASOn7PMStyiWD4hEQkbLcp9Tq/RxId5zkKMO9e+f6F5h9882nbF2qpw= Content-Type: text/plain; charset="us-ascii" Content-ID: <63ECB1E73C43924BB991CF270A0D72AD@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e423d6ee-5595-4f00-9a53-08d6964ce490 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2019 09:30:31.3925 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB6311 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, Feb 17, 2019 at 10:14:40AM -0800, David Miller wrote: > From: Ido Schimmel > Date: Sun, 17 Feb 2019 07:18:41 +0000 >=20 > > From: Petr Machata > >=20 > > The function-local variable "delay" enters the loop interpreted as dela= y > > in bits. However, inside the loop it gets overwritten by the result of > > mlxsw_sp_pg_buf_delay_get(), and thus leaves the loop as quantity in > > cells. Thus on second and further loop iterations, the headroom for a > > given priority is configured with a wrong size. > >=20 > > Fix by introducing a loop-local variable, delay_cells. Rename thres to > > thres_cells for consistency. > >=20 > > Fixes: f417f04da589 ("mlxsw: spectrum: Refactor port buffer configurati= on") > > Signed-off-by: Petr Machata > > Acked-by: Jiri Pirko > > Signed-off-by: Ido Schimmel >=20 > Applied and queued up for -stable, thanks Ido. Hi David, We have a series for net-next that adds support for Spectrum-2 shared buffers and it depends on this patch. I was wondering if you could merge net into net-next today or later this week, so that we could submit it. Normally I would just wait for the merge to happen, but it looks like this is going to be the last week to submit changes and I prefer not to miss the window while waiting for the inevitable merge. Thanks and sorry about the noise.