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] [day] [month] [year] [list]
Date:   Mon, 24 Apr 2023 14:18:53 -0700
From:   Justin Chen <justinpopo6@...il.com>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Heiner Kallweit <hkallweit1@...il.com>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linaro-mm-sig@...ts.linaro.org,
        bcm-kernel-feedback-list@...adcom.com, justin.chen@...adcom.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, opendmb@...il.com,
        andrew@...n.ch, linux@...linux.org.uk, richardcochran@...il.com,
        sumit.semwal@...aro.org, christian.koenig@....com
Subject: Re: [PATCH net-next 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

On Wed, Apr 19, 2023 at 9:33 AM Florian Fainelli <f.fainelli@...il.com> wrote:
>
> On 4/18/23 23:35, Heiner Kallweit wrote:
> > On 19.04.2023 02:10, Justin Chen wrote:
> >> Add support for the Broadcom ASP 2.0 Ethernet controller which is first
> >> introduced with 72165. This controller features two distinct Ethernet
> >> ports that can be independently operated.
> >>
> >> This patch supports:
> [snip]
> >> +    intf->tx_spb_index = spb_index;
> >> +    intf->tx_spb_dma_valid = valid;
> >> +    bcmasp_intf_tx_write(intf, intf->tx_spb_dma_valid);
> >> +
> >> +    if (tx_spb_ring_full(intf, MAX_SKB_FRAGS + 1))
> >> +            netif_stop_queue(dev);
> >> +
> >
> > Here it may be better to use the new macros from include/net/netdev_queues.h.
> > It seems your code (together with the related part in tx_poll) doesn't consider
> > the queue restart case.
> > In addition you should check whether using READ_ONCE()/WRITE_ONCE() is needed,
> > e.g. in ring_full().
>
> Thanks Heiner. Can you trim the parts you are not quoting otherwise one
> has to scroll all the way down to where you responded. Thanks!
> --
> Florian
>

Hello Heiner,

The implementation is a locked single queue xmit. Not sure how
netdev_queues.h fits into the picture here. I believe I am handling
the queue restart here.
+static int bcmasp_tx_poll(struct napi_struct *napi, int budget)
+{
[snip]
+ if (released)
+ netif_wake_queue(intf->ndev);
+
+ return 0;
+}
Let me know if I am misunderstanding the feedback here.

Thanks,
Justin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ