I have been successfully using nanomsg instead of virtual interfaces to run simple switch. An example is this PR:
p4lang/p4c#3951
However, there is one problem. If simple_switch crashes, the nn framework seems to get stuck at this point:
|
self.packet_inject.port_remove(self.port_number) |
It tries to remove the port but does not get a response back, presumably because the socket is blocking indefinitely? Is there a straightforward way to fix this?