[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6b95c3c9-3b8b-4db3-b755-a3652c1a59cc@redhat.com>
Date: Mon, 21 Oct 2024 11:23:36 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Felix Fietkau <nbd@....name>, Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, Sean Wang <sean.wang@...iatek.com>,
Mark Lee <Mark-MC.Lee@...iatek.com>, Lorenzo Bianconi <lorenzo@...nel.org>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next 4/4] net: ethernet: mtk_eth_soc: optimize dma
ring address/index calculation
On 10/15/24 15:07, Felix Fietkau wrote:
> On 15.10.24 14:54, Andrew Lunn wrote:
>> On Tue, Oct 15, 2024 at 01:09:38PM +0200, Felix Fietkau wrote:
>>> Since DMA descriptor sizes are all power of 2, we can avoid costly integer
>>> division in favor or simple shifts.
>>
>> Could a BUILD_BUG_ON() be added to validate this?
>
> Not sure if that would be useful. I can't put the BUILD_BUG_ON in the
> initializer macro, so I could only add it for the individual dma
> descriptor structs.
> Since the size of those structs will not be changed (otherwise it would
> immediately visibly break with existing hw), the remaining possibility
> would be adding new structs that violate this expectation. However,
> those would then not be covered by the BUILD_BUG_ON.
>
>> Do you have some benchmark data for this series? It would be good to
>> add to a patch 0/4.
>
> No, I just ran basic tests that everything still works well and looked
> at the assembly diff to ensure that the generated code seems sane.
Since this series is about performances, some related quick figures
would be really a plus.
At least we need a cover-letter to try to keep the git log history
clean. Otherwise cooking the net-next PR at the end of the cycle will be
a 10w worth task;)
Please re-send with a cover letter.
Thanks,
Paolo
Powered by blists - more mailing lists