Re: [PATCH net-next v4 2/5] ice: configure FW logging
From: Paul M Stillwell Jr <hidden>
Date: 2023-10-12 00:40:14
On 10/10/2023 7:01 PM, Jakub Kicinski wrote:
On Tue, 10 Oct 2023 16:26:15 -0700 Paul M Stillwell Jr wrote:quoted
I'm probably missing something here, but I don't know if this will do what I need or not. What I have is a user passing a module name and a log level and I'm trying to match those strings and create integer values from them so I can configure the FW log for that module. I'm not seeing how the above gets me there... I was trying to not use strncmp and instead use the built in kernel string matching functions so that's how I ended up with the code I haveYou're supposed to do very simple and targeted matching here. The cmdline parsing makes the code harder to follow.
OK, so what if we changed the code to create a new debugfs file entry for each module and used the dentry for ther file to know what file is being written to. Then we would only need to parse the log level. Would that be acceptable? My confusion is around what makes the cmdline parsing harder to follow. Obviously for me it's easy :) so I am trying to understand your point of view.