Re: [patch net-next v2 08/11] devlink: introduce set of macros and use it for split ops definitions
From: Jiri Pirko <jiri@resnulli.us>
Date: 2023-07-31 12:22:23
From: Jiri Pirko <jiri@resnulli.us>
Date: 2023-07-31 12:22:23
Tue, Jul 25, 2023 at 07:38:16PM CEST, kuba@kernel.org wrote:
On Thu, 20 Jul 2023 14:18:26 +0200 Jiri Pirko wrote:quoted
The split ops structures for all commands look pretty much the same. The are all using the same/similar callbacks. Introduce a set of macros to make the code shorter and also avoid possible future copy&paste mistakes and inconsistencies. Use this macros for already converted commands.If you want to use split ops extensively please use the nlspec and generate the table automatically. Integrating closer with the spec will have many benefits.
Yeah, I was thinging about it, it just didn't seem necessary. Okay, will check that out. Btw, does that mean that any split-ops usage would require generated code? If yes, could you please document that somewhere, probably near the struct? Thanks!