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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b935d954-88ff-4c32-9798-792acb5b0ea9@microchip.com>
Date: Mon, 19 Aug 2024 10:11:35 +0000
From: <Parthiban.Veerasooran@...rochip.com>
To: <kuba@...nel.org>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
	<horms@...nel.org>, <saeedm@...dia.com>, <anthony.l.nguyen@...el.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <andrew@...n.ch>,
	<corbet@....net>, <linux-doc@...r.kernel.org>, <robh+dt@...nel.org>,
	<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
	<devicetree@...r.kernel.org>, <Horatiu.Vultur@...rochip.com>,
	<ruanjinjie@...wei.com>, <Steen.Hegelund@...rochip.com>,
	<vladimir.oltean@....com>, <masahiroy@...nel.org>, <alexanderduyck@...com>,
	<krzk+dt@...nel.org>, <robh@...nel.org>, <rdunlap@...radead.org>,
	<hkallweit1@...il.com>, <linux@...linux.org.uk>,
	<UNGLinuxDriver@...rochip.com>, <Thorsten.Kummermehr@...rochip.com>,
	<Pier.Beruto@...emi.com>, <Selvamani.Rajagopal@...emi.com>,
	<Nicolas.Ferre@...rochip.com>, <benjamin.bigler@...nformulastudent.ch>,
	<linux@...ler.io>, <markku.vorne@...power.com>
Subject: Re: [PATCH net-next v6 09/14] net: ethernet: oa_tc6: implement
 transmit path to transfer tx ethernet frames

Hi Jakub,

On 16/08/24 10:25 pm, Jakub Kicinski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Mon, 12 Aug 2024 15:56:06 +0530 Parthiban Veerasooran wrote:
>> +             if (skb_queue_len(&tc6->tx_skb_q) < OA_TC6_TX_SKB_QUEUE_SIZE &&
>> +                 netif_queue_stopped(tc6->netdev))
>> +                     netif_wake_queue(tc6->netdev);
> 
> FWIW I'm not sure you actually need a queue in the driver.
> "A queue of 1" may be enough, IIUC calling netif_wake_queue()
Ah ok. Actually "A queue of 1" is enough but for holding one tx skb, a 
queue is too much. So if I understand correctly, I can replace,

struct sk_buff_head tx_skb_q ---> struct sk_buff *waiting_tx_skb

which holds one tx skb waiting and

struct sk_buff *tx_skb ---> struct sk_buff *ongoing_tx_skb

which holds one on going tx skb.

So that I can remove the queue handling. I did a quick test by doing the 
above changes and it works as expected. Thanks for the info. I will 
update this in the next version.

> will cause something like an interrupt to fire immediately,
> and start_xmit for the next frame should get called before
> netif_wake_queue() returns. I could be wrong :)
I think, it is ok as the while will be executed immediately once 
returning from netif_wake_queue() which is the expected behavior.

Best regards,
Parthiban V
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ