All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <me@pmachata.org>
To: netdev@vger.kernel.org
Cc: Ido Schimmel <idosch@mellanox.com>,
	Petr Machata <petrm@mellanox.com>,
	David Miller <davem@davemloft.net>
Subject: [PATCH net-next 0/4] selftests: Use busywait() in a couple places
Date: Mon,  2 Mar 2020 19:56:01 +0200	[thread overview]
Message-ID: <cover.1583170249.git.petrm@mellanox.com> (raw)

From: Petr Machata <petrm@mellanox.com>

Two helper function for active waiting for an event were recently
introduced: busywait() as the active-waiting tool, and until_counter_is()
as a configurable predicate that can be plugged into busywait(). Use these
in tc_common and mlxsw's qos_defprio instead of hand-coding equivalents.

Patches #1 and #2 extend lib.sh facilities to make the transition possible.
Patch #3 converts tc_common, and patch #4 qos_defprio.

Petr Machata (4):
  selftests: forwarding: lib: Add tc_rule_handle_stats_get()
  selftests: forwarding: Convert until_counter_is() to take expression
  selftests: forwarding: tc_common: Convert to use busywait
  selftests: mlxsw: qos_defprio: Use until_counter_is

 .../drivers/net/mlxsw/qos_defprio.sh          | 18 +++--------
 .../drivers/net/mlxsw/sch_red_core.sh         |  6 ++--
 tools/testing/selftests/net/forwarding/lib.sh | 17 ++++++++--
 .../selftests/net/forwarding/tc_common.sh     | 32 +++----------------
 4 files changed, 25 insertions(+), 48 deletions(-)

-- 
2.20.1


             reply	other threads:[~2020-03-02 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 17:56 Petr Machata [this message]
2020-03-02 17:56 ` [PATCH net-next 1/4] selftests: forwarding: lib: Add tc_rule_handle_stats_get() Petr Machata
2020-03-02 17:56 ` [PATCH net-next 2/4] selftests: forwarding: Convert until_counter_is() to take expression Petr Machata
2020-03-02 17:56 ` [PATCH net-next 3/4] selftests: forwarding: tc_common: Convert to use busywait Petr Machata
2020-03-02 17:56 ` [PATCH net-next 4/4] selftests: mlxsw: qos_defprio: Use until_counter_is Petr Machata
2020-03-04  1:04 ` [PATCH net-next 0/4] selftests: Use busywait() in a couple places 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=cover.1583170249.git.petrm@mellanox.com \
    --to=me@pmachata.org \
    --cc=davem@davemloft.net \
    --cc=idosch@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.