intrig-unicamp / mininet-wifi

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

bmv2.py: added timeout parameter for P4Switch class #383

Closed emdneto closed 3 years ago

emdneto commented 3 years ago

When we trying to load a very large json configuration file, the default timeout of 10 seconds is not enough.

For this, I extended the P4Switch class to support the customizable timeout parameter.

So, when we need a timeout greater than 10 seconds, we can use it directly as a parameter of the P4Switch class as follows:

s1 = net.addSwitch ('s1', cls=P4Switch, netcfg=True, loglevel='debug', json=bigfile.json, thriftport=50001, timeout=15)