All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jakub.kicinski@netronome.com,
	jiri@mellanox.com, petrm@mellanox.com, mlxsw@mellanox.com,
	Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 0/2] mlxsw: Update main pool computation and pool size limits
Date: Wed, 23 Oct 2019 09:04:58 +0300	[thread overview]
Message-ID: <20191023060500.19709-1-idosch@idosch.org> (raw)

From: Ido Schimmel <idosch@mellanox.com>

Petr says:

In Spectrum ASICs, the shared buffer is an area of memory where packets are
kept until they can be transmitted. There are two resources associated with
shared buffer size: cap_total_buffer_size and cap_guaranteed_shared_buffer.
So far, mlxsw has been using the former as a limit when validating shared
buffer pool size configuration. However, the total size also includes
headrooms and reserved space, which really cannot be used for shared buffer
pools. Patch #1 mends this and has mlxsw use the guaranteed size.

To configure default pool sizes, mlxsw has historically hard-coded one or
two smallish pools, and one "main" pool that took most of the shared buffer
(that would be pool 0 on ingress and pool 4 on egress). During the
development of Spectrum-2, it became clear that the shared buffer size
keeps shrinking as bugs are identified and worked around. In order to
prevent having to tweak the size of pools 0 and 4 to catch up with updates
to values reported by the FW, patch #2 changes the way these pools are set.
Instead of hard-coding a fixed value, the main pool now takes whatever is
left from the guaranteed size after the smaller pool(s) are taken into
account.

Petr Machata (2):
  mlxsw: spectrum: Use guaranteed buffer size as pool size limit
  mlxsw: spectrum_buffers: Calculate the size of the main pool

 .../net/ethernet/mellanox/mlxsw/resources.h   |  4 +-
 .../mellanox/mlxsw/spectrum_buffers.c         | 53 +++++++++++++------
 .../ethernet/mellanox/mlxsw/spectrum_qdisc.c  |  3 +-
 3 files changed, 42 insertions(+), 18 deletions(-)

-- 
2.21.0


             reply	other threads:[~2019-10-23  6:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  6:04 Ido Schimmel [this message]
2019-10-23  6:04 ` [PATCH net-next 1/2] mlxsw: spectrum: Use guaranteed buffer size as pool size limit Ido Schimmel
2019-10-23  6:05 ` [PATCH net-next 2/2] mlxsw: spectrum_buffers: Calculate the size of the main pool Ido Schimmel
2019-10-30  3:31   ` Nathan Chancellor
2019-10-30  7:57     ` Ido Schimmel
2019-10-24  4:31 ` [PATCH net-next 0/2] mlxsw: Update main pool computation and pool size limits 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=20191023060500.19709-1-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.