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]
Date:   Thu, 19 May 2022 09:12:24 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Lorenzo Bianconi <lorenzo@...nel.org>
Cc:     netdev@...r.kernel.org, nbd@....name, john@...ozen.org,
        sean.wang@...iatek.com, Mark-MC.Lee@...iatek.com,
        davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
        Sam.Shih@...iatek.com, linux-mediatek@...ts.infradead.org,
        devicetree@...r.kernel.org, robh@...nel.org,
        lorenzo.bianconi@...hat.com
Subject: Re: [PATCH v2 net-next 11/15] net: ethernet: mtk_eth_soc: introduce
 device register map

On Thu, 19 May 2022 09:51:28 +0200 Lorenzo Bianconi wrote:
> > I don't think there's a best known practice, you'll have to exercise
> > your judgment. Taking a look at a random example of MTK_PDMA_INT_STATUS.
> > Looks like that one is already assigned to eth->tx_int_status_reg.
> > Maybe that can be generalized? Personally I'd forgo the macros
> > completely and just use eth->soc->register_name in the code.  
> 
> I personally think the code is easier to read if we use macros in this case.
> Let's consider MTK_LRO_CTRL_DW1_CFG(), it depends on the particular soc based
> on the register map and even on the ring index. I guess the best trade-off we
> can get is to explicitly pass eth to the macros as parameter when needed.

Yeah, do you, I was just sharing what my knee jerk direction would be.
You know the code better.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ