Message ID | 20230630191812.2884637-1-prestwoj@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | Initial refactor for hwsim frame processing | expand |
Hi James, On 6/30/23 14:18, James Prestwood wrote: > I wanted to put this out there just as an idea before I get too > invested in extending it. The code itself needs cleanup (explained > later) but I wanted some feedback on the general idea. No real objection, but if you're moving 1kloc of code around, make sure that any moves are separated from overall refinements and other changes. For example, if you're exporting API functions or structures for use in (newly created) modules, do that first. > > Eventually I'd like to extend this to support remote communication > with multiple hwsim instances, e.g. via a multicast socket. As a > starting point the rules code fit nicely as a frame processing > module. I assume you saw https://github.com/Raizo62/vwifi ? > > Cleanup: > - Find solution for the IWD_MODULE_DEPENDS issue Well, you need to put something into the section if you don't invoke IWD_MODULE_DEPENDS at least once. > - Add getters for radio/interface info objects, possibly > for hwsim_frame too rather than everything exposed in > hwsim.h. That would be preferable. > - The hwsim_frame cleanup in rules needs to be changed. Prior > hwsim_frame_unref() would send tx_info but now this needs > to be handled in rules.c. Currently we peek into the refcount > and see if it will be destroyed on unref, and send tx_info > then. Hmm, not sure I follow yet? Also, iwd/tools/* is for executables that get built from single files. I guess we could relax that, but it may be better to have hwsim live in its own directory, similar to ead & iwmon. Regards, -Denis
Hi Denis, On 7/5/23 9:36 PM, Denis Kenzior wrote: > Hi James, > > On 6/30/23 14:18, James Prestwood wrote: >> I wanted to put this out there just as an idea before I get too >> invested in extending it. The code itself needs cleanup (explained >> later) but I wanted some feedback on the general idea. > > No real objection, but if you're moving 1kloc of code around, make sure > that any moves are separated from overall refinements and other > changes. For example, if you're exporting API functions or structures > for use in (newly created) modules, do that first. Yep definitely. > >> >> Eventually I'd like to extend this to support remote communication >> with multiple hwsim instances, e.g. via a multicast socket. As a >> starting point the rules code fit nicely as a frame processing >> module. > > I assume you saw https://github.com/Raizo62/vwifi ? I had not seen that one, but its pretty close to what I'm looking for. Still would need some specific modifications but its at least being maintained somewhat. Definitely worth looking into. There is also a similar project, but its old and doesn't look particularly finished: https://github.com/cmu-sei/welled > >> >> Cleanup: >> - Find solution for the IWD_MODULE_DEPENDS issue > > Well, you need to put something into the section if you don't invoke > IWD_MODULE_DEPENDS at least once. > >> - Add getters for radio/interface info objects, possibly >> for hwsim_frame too rather than everything exposed in >> hwsim.h. > > That would be preferable. > >> - The hwsim_frame cleanup in rules needs to be changed. Prior >> hwsim_frame_unref() would send tx_info but now this needs >> to be handled in rules.c. Currently we peek into the refcount >> and see if it will be destroyed on unref, and send tx_info >> then. > > Hmm, not sure I follow yet? Just minor details really, I need to just look at it closer once its in a more finished state. > > Also, iwd/tools/* is for executables that get built from single files. > I guess we could relax that, but it may be better to have hwsim live in > its own directory, similar to ead & iwmon. Ok that does make more sense. > > Regards, > -Denis