netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	Realtek linux nic maintainers <nic_swsd@realtek.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/3] r8169: use new macro netif_subqueue_maybe_stop in rtl8169_start_xmit
Date: Fri, 14 Apr 2023 18:53:29 -0700	[thread overview]
Message-ID: <20230414185329.6e8ada34@kernel.org> (raw)
In-Reply-To: <ad9be871-92a6-6c72-7485-ebb424f2381d@gmail.com>

On Thu, 13 Apr 2023 21:15:37 +0200 Heiner Kallweit wrote:
> +	stop_queue = netif_subqueue_maybe_stop(dev, 0, rtl_tx_slots_avail(tp),
> +					       R8169_TX_STOP_THRS,
> +					       R8169_TX_START_THRS);
> +	if (door_bell || stop_queue < 0)

Macro returns 0 if it did the action. So I'd have expected <= or !
Maybe better to invert the return value at the call site..

	stopped = !netif_subqueue_maybe_stop(...
	if (door_bell || stopped)
		..

  parent reply	other threads:[~2023-04-15  1:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 19:13 [PATCH net-next 0/3] r8169: use new macros from netdev_queues.h Heiner Kallweit
2023-04-13 19:14 ` [PATCH net-next 1/3] net: add macro netif_subqueue_completed_wake Heiner Kallweit
2023-04-13 19:22   ` Jacob Keller
2023-04-13 19:15 ` [PATCH net-next 2/3] r8169: use new macro netif_subqueue_maybe_stop in rtl8169_start_xmit Heiner Kallweit
2023-04-13 19:24   ` Jacob Keller
2023-04-15  1:53   ` Jakub Kicinski [this message]
2023-04-15  7:14     ` Heiner Kallweit
2023-04-13 19:16 ` [PATCH net-next 3/3] r8169: use new macro netif_subqueue_completed_wake in the tx cleanup path Heiner Kallweit
2023-04-13 19:25   ` Jacob Keller
2023-04-13 19:36     ` Heiner Kallweit
2023-04-13 21:04       ` Jacob Keller
2023-04-13 19:17 ` [PATCH net-next 0/3] r8169: use new macros from netdev_queues.h Jacob Keller

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=20230414185329.6e8ada34@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.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).