netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@mellanox.com>
To: David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jiri Pirko <jiri@mellanox.com>, Petr Machata <petrm@mellanox.com>,
	mlxsw <mlxsw@mellanox.com>
Subject: Re: [PATCH net] mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable
Date: Tue, 19 Feb 2019 09:30:31 +0000	[thread overview]
Message-ID: <20190219093029.GA10647@splinter> (raw)
In-Reply-To: <20190217.101440.744217887687576351.davem@davemloft.net>

On Sun, Feb 17, 2019 at 10:14:40AM -0800, David Miller wrote:
> From: Ido Schimmel <idosch@mellanox.com>
> Date: Sun, 17 Feb 2019 07:18:41 +0000
> 
> > From: Petr Machata <petrm@mellanox.com>
> > 
> > The function-local variable "delay" enters the loop interpreted as delay
> > 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.
> > 
> > Fix by introducing a loop-local variable, delay_cells. Rename thres to
> > thres_cells for consistency.
> > 
> > Fixes: f417f04da589 ("mlxsw: spectrum: Refactor port buffer configuration")
> > Signed-off-by: Petr Machata <petrm@mellanox.com>
> > Acked-by: Jiri Pirko <jiri@mellanox.com>
> > Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> 
> 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.

  reply	other threads:[~2019-02-19  9:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-17  7:18 [PATCH net] mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable Ido Schimmel
2019-02-17 18:14 ` David Miller
2019-02-19  9:30   ` Ido Schimmel [this message]
2019-02-19 18:33     ` David Miller
2019-02-20  8:12       ` Ido Schimmel
2019-02-20 18:41         ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190219093029.GA10647@splinter \
    --to=idosch@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).