So normally for lctl set_param -P the config change is sent to lctl in userland so it can write to to the proc,sysfs, or debugfs file. In this case its a bit tricker than most since two pieces of data want to be written out. One is flavor i.e skpi etc and the other is the direction. Since set_param -P format follows $subsystem.$device.$param in this case we will have by default the source direction. This leaves us with the destination direction and the flavor needing to be set.
Their are two ways we could handle this. First make srpc_info (debugfs or proc entry) writeable. This means pushing three values, the flavor, the destination direction, and the source net, o2ib1 for example, into srpc_info. Sadly source net is missing from srpc_info. One option is to push all the settings at the same time to srpc_info. The other option is create new individual files to handle each change in sysfs. In that case we run into making the change atomic. Any ideas?
Hello James,
Just what to remind that params config file has reserved field to store which means is used to execute configuration string. For example:
Here "lctl" is stored in 2nd field which means configuration need to be execute using lctl set_param with given parameters. The original idea was to save the place to extend functionality and use any other method. But lctl set_param -P syntax need to be extended to store all permanent parameters in the same params file.