xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Juergen Gross <jgross@suse.com>
Cc: Wei Liu <wei.liu@kernel.org>, Paul Durrant <paul@xen.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	xen-devel@lists.xenproject.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/8] xen/netback: fix spurious event detection for common event case
Date: Thu, 11 Feb 2021 11:53:17 +0100	[thread overview]
Message-ID: <c164ff57-69f2-8a5f-43f4-ec170bd99c22@suse.com> (raw)
In-Reply-To: <20210211101616.13788-5-jgross@suse.com>

On 11.02.2021 11:16, Juergen Gross wrote:
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -162,13 +162,15 @@ irqreturn_t xenvif_interrupt(int irq, void *dev_id)
>  {
>  	struct xenvif_queue *queue = dev_id;
>  	int old;
> +	bool has_rx, has_tx;
>  
>  	old = atomic_fetch_or(NETBK_COMMON_EOI, &queue->eoi_pending);
>  	WARN(old, "Interrupt while EOI pending\n");
>  
> -	/* Use bitwise or as we need to call both functions. */
> -	if ((!xenvif_handle_tx_interrupt(queue) |
> -	     !xenvif_handle_rx_interrupt(queue))) {
> +	has_tx = xenvif_handle_tx_interrupt(queue);
> +	has_rx = xenvif_handle_rx_interrupt(queue);
> +
> +	if (!has_rx && !has_tx) {
>  		atomic_andnot(NETBK_COMMON_EOI, &queue->eoi_pending);
>  		xen_irq_lateeoi(irq, XEN_EOI_FLAG_SPURIOUS);
>  	}
> 

Ah yes, what was originally meant really was

	if (!(xenvif_handle_tx_interrupt(queue) |
	      xenvif_handle_rx_interrupt(queue))) {

(also hinted at by the otherwise pointless inner parentheses),
which you simply write in an alternative way.

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan


  reply	other threads:[~2021-02-11 10:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 10:16 [PATCH v2 0/8] xen/events: bug fixes and some diagnostic aids Juergen Gross
2021-02-11 10:16 ` [PATCH v2 1/8] xen/events: reset affinity of 2-level event when tearing it down Juergen Gross
2021-02-14 21:17   ` Julien Grall
2021-02-11 10:16 ` [PATCH v2 2/8] xen/events: don't unmask an event channel when an eoi is pending Juergen Gross
2021-02-11 10:16 ` [PATCH v2 3/8] xen/events: avoid handling the same event on two cpus at the same time Juergen Gross
2021-02-14 21:34   ` Julien Grall
2021-02-15  6:55     ` Jürgen Groß
2021-02-15 21:35   ` Boris Ostrovsky
2021-02-18 11:47     ` Jürgen Groß
2021-02-11 10:16 ` [PATCH v2 4/8] xen/netback: fix spurious event detection for common event case Juergen Gross
2021-02-11 10:53   ` Jan Beulich [this message]
2021-02-11 14:15   ` Paul Durrant
2021-02-11 15:24   ` Wei Liu
2021-02-11 10:16 ` [PATCH v2 5/8] xen/events: link interdomain events to associated xenbus device Juergen Gross
2021-02-11 14:16   ` Paul Durrant
2021-02-11 10:16 ` [PATCH v2 6/8] xen/events: add per-xenbus device event statistics and settings Juergen Gross
2021-02-15 21:54   ` Boris Ostrovsky
2021-02-11 10:16 ` [PATCH v2 7/8] xen/evtch: use smp barriers for user event ring Juergen Gross
2021-02-11 10:16 ` [PATCH v2 8/8] xen/evtchn: use READ/WRITE_ONCE() for accessing ring indices Juergen Gross
2021-02-17 13:29   ` Ross Lagerwall
2021-02-18 11:46     ` Jürgen Groß

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=c164ff57-69f2-8a5f-43f4-ec170bd99c22@suse.com \
    --to=jbeulich@suse.com \
    --cc=davem@davemloft.net \
    --cc=jgross@suse.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul@xen.org \
    --cc=wei.liu@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).