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: <1485352637.5145.4.camel@edumazet-glaptop3.roam.corp.google.com>
Date:   Wed, 25 Jan 2017 05:57:17 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Hayes Wang <hayeswang@...ltek.com>
Cc:     netdev@...r.kernel.org, nic_swsd@...ltek.com,
        linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH net v2 3/4] r8152: re-schedule napi for tx

On Wed, 2017-01-25 at 16:13 +0800, Hayes Wang wrote:
> Re-schedule napi after napi_complete() for tx, if it is necessay.
> 
> In r8152_poll(), if the tx is completed after tx_bottom() and before
> napi_complete(), the scheduling of napi would be lost. Then, no
> one handles the next tx until the next napi_schedule() is called.
> 
> Signed-off-by: Hayes Wang <hayeswang@...ltek.com>
> ---
>  drivers/net/usb/r8152.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index ec882be..45d168e 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -1936,6 +1936,9 @@ static int r8152_poll(struct napi_struct *napi, int budget)
>  		napi_complete(napi);
>  		if (!list_empty(&tp->rx_done))
>  			napi_schedule(napi);
> +		else if (!skb_queue_empty(&tp->tx_queue) &&
> +			 !list_empty(&tp->tx_free))
> +			napi_schedule(&tp->napi);

Why using &tp->napi instead of napi here, as done 3 lines above ?



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ