Skip to content

RFC Initial refactor for hwsim frame processing

James Prestwood iwd 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5dbus: remove dependency on agentsrc/agent.c src/agent.h src/dbus.c +1 more+19 -90 replies
2/5dbus: remove iwd.h dependencyMakefile.am src/dbus.c+17 -172 replies
3/5hwsim: use dbus.c moduleMakefile.am tools/hwsim.c+7 -220 replies
4/5hwsim: refactor rules processing into separate fileMakefile.am tools/hwsim.c tools/hwsim.h +1 more+1176 -10360 replies
5/5module: temporary hack to allow for no module dependenciessrc/module.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/5] Initial refactor for hwsim frame processing

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.

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.

Cleanup:
- Find solution for the IWD_MODULE_DEPENDS issue
- Add getters for radio/interface info objects, possibly for hwsim_frame too rather than everything exposed in hwsim.h.
- 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.

The dbus dependency patches by themselves are actually useful so feel free to merge those if they look ok. If you don't like the preprocessor define thats fine, its a minimal amount of code duplicated between iwd/hwsim so its not _that_ bad as it stands today.

Note: These were done on top of the ADD/DEL mac changes so if they don't apply that is likely the issue. Again, just looking for a yay or nay on this concept.

James Prestwood (5):
dbus: remove dependency on agent
dbus: remove iwd.h dependency
hwsim: use dbus.c module
hwsim: refactor rules processing into separate file
module: temporary hack to allow for no module dependencies

 Makefile.am   |    9 +-
 src/agent.c   |   12 +-
 src/agent.h   |    2 -
 src/dbus.c    |   43 +-
 src/dbus.h    |    4 +
 src/module.c  |    6 +
 tools/hwsim.c | 1115 +++----------------------------------------------
 tools/hwsim.h |   99 +++++
 tools/rules.c | 1017 ++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 1224 insertions(+), 1083 deletions(-)
 create mode 100644 tools/hwsim.h
 create mode 100644 tools/rules.c
Signature · 1 line
2.25.1