Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2056067pxb; Thu, 11 Feb 2021 03:16:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPeJ9UNndkG/ZBJYqdSaojcM3CCyeSKYRyupjXJJoI0gLumuEPNU7SuFqiQnRf3yTL6qQ8 X-Received: by 2002:a50:fb84:: with SMTP id e4mr2827204edq.227.1613042165607; Thu, 11 Feb 2021 03:16:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613042165; cv=none; d=google.com; s=arc-20160816; b=gYiMH4tYcb1/OMRgk/fVGeBs3prceB6FMLbXUjQtxmJPMFoHud0lQNCwOUy6+diVRQ g+I23LYzusN/jhk8FGqwOHZgkGjGTFw6o9x0B10d0QwvUnGs/yJLen2Vj+GP+Xna1tcv hxvHZK6IWBdOTUyWK0Q0a7wjnVCXCJXdLtEtrVO0W8k17KWChPihQl5XaVF7dtyngV2W wMqldp35GNj7HXCjkdWtzWIpL37cKe/ZGoJzDO48fTuiauWMIbxaA+v+tkccybHZ9+kD wXmeJLgS5M1Jc52mJNHMbNSYbf6GqlNsO55L5CiUW2phb7dZ/p+MzLbd+Y4fod8zIWCA rWeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=P9xCMOru1/Zj81RD4aoWE/w0ZfHdvMe1Cb500/kNnBc=; b=DleNdANR+t/8FJ8NcCsu71jryvPmc9MAmNb2juxtkAPjHxR6sS+K5RePhereOrrNfX NYTTlT9SioRIEW+PzB/ocQfzEmihPOHbXqBAttvxO1hQvZAx73LwipN+WzDQhaQa4CHB OcfLybrpXnbo3Txkm97XR5FqI9KdSuCA7vxnuflFzwXIz0l3dhDwkkA7cB4GXfp6gJvu jmZq2b5QgDARbHwUNSiWknE+JDiNbdNZhYhIGgtgo2oBWb5U/eX4tq6pnZ8b9EVjEZqI Bt3Aa++5j5w4GOIWw6+KhGXfCby1BaxxM2LrBQ+i0ABnO5d6FkvAKgtvHKnsxSK7phJM bCZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=s0OmhzXz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si3534106eds.547.2021.02.11.03.15.42; Thu, 11 Feb 2021 03:16:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=s0OmhzXz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230492AbhBKLOX (ORCPT + 99 others); Thu, 11 Feb 2021 06:14:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:53348 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231273AbhBKKyK (ORCPT ); Thu, 11 Feb 2021 05:54:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613040804; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P9xCMOru1/Zj81RD4aoWE/w0ZfHdvMe1Cb500/kNnBc=; b=s0OmhzXzKBbfO921BFeUxxT/ihk9SFXl7epMlPgOjbgR6yN2M4AUqSnSyTjwhH7Dd3Fp7s FeDSPBTOPkers18yXi01hmlp6e518rfVmCeJGbzmmAeEgqMq+vGDAIo5LvC7A+YVKAVxbC Y9vMsgVC9OJaTxyCYqIQ2pnYd+vRDiw= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8840DB11A; Thu, 11 Feb 2021 10:53:23 +0000 (UTC) Subject: Re: [PATCH v2 4/8] xen/netback: fix spurious event detection for common event case To: Juergen Gross Cc: Wei Liu , Paul Durrant , "David S. Miller" , Jakub Kicinski , xen-devel@lists.xenproject.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210211101616.13788-1-jgross@suse.com> <20210211101616.13788-5-jgross@suse.com> From: Jan Beulich Message-ID: Date: Thu, 11 Feb 2021 11:53:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210211101616.13788-5-jgross@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Jan