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: <19d66fa8-f42c-4c52-b42b-49994f29e293@lunn.ch>
Date: Fri, 15 Aug 2025 05:59:10 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Yibo Dong <dong100@...se.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
	corbet@....net, gur.stavi@...wei.com, maddy@...ux.ibm.com,
	mpe@...erman.id.au, danishanwar@...com, lee@...ger.us,
	gongfan1@...wei.com, lorenzo@...nel.org, geert+renesas@...der.be,
	Parthiban.Veerasooran@...rochip.com, lukas.bulwahn@...hat.com,
	alexanderduyck@...com, richardcochran@...il.com,
	netdev@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 3/5] net: rnpgbe: Add basic mbx ops support

On Fri, Aug 15, 2025 at 10:43:02AM +0800, Yibo Dong wrote:
> On Fri, Aug 15, 2025 at 04:13:52AM +0200, Andrew Lunn wrote:
> > > +const struct mucse_mbx_operations mucse_mbx_ops_generic = {
> > > +	.init_params = mucse_init_mbx_params_pf,
> > > +	.read = mucse_read_mbx_pf,
> > > +	.write = mucse_write_mbx_pf,
> > > +	.read_posted = mucse_read_posted_mbx,
> > > +	.write_posted = mucse_write_posted_mbx,
> > > +	.check_for_msg = mucse_check_for_msg_pf,
> > > +	.check_for_ack = mucse_check_for_ack_pf,
> > > +	.configure = mucse_mbx_configure_pf,
> > > +};
> > 
> > As far as i can see, this is the only instance of
> > mucse_mbx_operations. Will there be other instances of this structure?
> > 
> > 	Andrew
> > 
> 
> Yes, It is the only instance. Not other instances at all.
> Is there any improvement?

So throw away the abstraction and call the functions directly. Only
add abstractions if you have some differences to abstract over. Only
make the driver more complex and harder to understand, if you need to
make the driver more complex and harder to understand.... KISS.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ