intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
432 stars 239 forks source link

Allow storage of tc values for IFB and preventing overwrites by mobility #396

Closed awlane closed 3 years ago

awlane commented 3 years ago

This change introduces improvements to the current handling of tc parameters for wireless interfaces. While they are presently discarded upon being set, this change stores them on a per interface basis on their parent node and allows the user to use the setTC method on nodes to configure these parameters automatically for IFBs. This also allows for the user to prevent configured tc values being overwritten by mobility code.

ramonfontes commented 3 years ago

The patch works. However, I don't think it's a good idea to apply it in the codebase due to the inclusion of new conditionals.

awlane commented 3 years ago

Would you be open to a refactored change or are you against the storage of these values in general? The change to setTC was purely to prevent the user from having to implement it, it's not necessary to the patch.

ramonfontes commented 3 years ago

Yes, I'm open to a refactored change.

awlane commented 3 years ago

I can't think of an elegant way of accomplishing the changes I want to make to setTC, so failing that I'm reopening with the changes there removed so we maintain a clean codebase.

ramonfontes commented 3 years ago

That sounds good to me. However, some conflicts must be resolved due to the recent updates in link.py

ramonfontes commented 3 years ago

One more thing: a node may have multiple interfaces. Thus, I'd move self.intf_tcto IntfWireless instead.

awlane commented 3 years ago

One more thing: a node may have multiple interfaces. Thus, I'd move self.intf_tcto IntfWireless instead.

It's a dictionary whose keys are interface names to handle this situation, and as I believe we discussed previously assigning values to the interface object causes issues because different copies can be returned.