lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210422092608.6b8ed5ff@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Thu, 22 Apr 2021 09:26:08 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Ilya Lipnitskiy <ilya.lipnitskiy@...il.com>
Cc:     Felix Fietkau <nbd@....name>, John Crispin <john@...ozen.org>,
        Sean Wang <sean.wang@...iatek.com>,
        Mark Lee <Mark-MC.Lee@...iatek.com>,
        "David S. Miller" <davem@...emloft.net>,
        Matthias Brugger <matthias.bgg@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next 12/14] net: ethernet: mtk_eth_soc: reduce
 unnecessary interrupts

On Wed, 21 Apr 2021 21:09:12 -0700 Ilya Lipnitskiy wrote:
> @@ -1551,8 +1551,9 @@ static int mtk_napi_rx(struct napi_struct *napi, int budget)
>  		remain_budget -= rx_done;
>  		goto poll_again;
>  	}
> -	napi_complete(napi);
> -	mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
> +
> +	if (napi_complete(napi))
> +		mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);

Why not napi_complete_done(napi, rx_done + budget - remain_budget)?
(Modulo possible elimination of rx_done in this function.)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ