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: <CAKv+Gu96Xjvr9Vr=pbHT60YXyhpWVBYNXJ_u0MijmX8Tp_hG2w@mail.gmail.com>
Date:   Thu, 11 Oct 2018 15:49:59 +0200
From:   Ard Biesheuvel <ard.biesheuvel@...aro.org>
To:     Ilias Apalodimas <ilias.apalodimas@...aro.org>
Cc:     "<netdev@...r.kernel.org>" <netdev@...r.kernel.org>,
        Jaswinder Singh <jaswinder.singh@...aro.org>,
        Masami Hiramatsu <masami.hiramatsu@...aro.org>
Subject: Re: [PATCH 1/1] net: socionext: clear rx irq correctly

On 11 October 2018 at 14:28, Ilias Apalodimas
<ilias.apalodimas@...aro.org> wrote:
> commit 63ae7949e94a ("net: socionext: Use descriptor info instead of MMIO reads on Rx")
> removed constant mmio reads from the driver and started using a descriptor
> field to check if packet should be processed.
> This lead the napi rx handler being constantly called while no packets
> needed processing and ksoftirq getting 100% cpu usage. Issue one mmio read
> to clear the irq correcty after processing packets
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@...aro.org>
> Reported-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>

Tested-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>

> ---
>  drivers/net/ethernet/socionext/netsec.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
> index 7aa5ebb..4289ccb 100644
> --- a/drivers/net/ethernet/socionext/netsec.c
> +++ b/drivers/net/ethernet/socionext/netsec.c
> @@ -735,8 +735,11 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget)
>                 u16 idx = dring->tail;
>                 struct netsec_de *de = dring->vaddr + (DESC_SZ * idx);
>
> -               if (de->attr & (1U << NETSEC_RX_PKT_OWN_FIELD))
> +               if (de->attr & (1U << NETSEC_RX_PKT_OWN_FIELD)) {
> +                       /* reading the register clears the irq */
> +                       netsec_read(priv, NETSEC_REG_NRM_RX_PKTCNT);
>                         break;
> +               }
>
>                 /* This  barrier is needed to keep us from reading
>                  * any other fields out of the netsec_de until we have
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ