'looped in Yugandhar/Chetan/Karthikeyan From: [email protected] [mailto:[email protected]] On Behalf Of Kochba, Alon Sent: Tuesday, February 28, 2017 9:31 PM To: [email protected]; openflowplugin-dev <[email protected]>; [email protected] Subject: [netvirt-dev] SNAT test UDP failure - race between flows being written and packet out?
Hi, We have a CSIT test in netvirt that tests UDP connectivity using netvirt's SNAT feature, that's sporadically failing. The same test in TCP succeeds all the time. We debugged the flows and it seems there is a race between these three events - ODL receives the initial packet, and then: a. Installs an inbound flow using NaptEventHandler#buildAndInstallNatFlows() b. Installs an outbound flow using NaptEventHandler#buildAndInstallNatFlows() c. Sends the original packet as a packet out to OFPP_TABLE for re-processing by pipeline. For the test to work properly, (c) must happen after (a) and (b) have been programmed to the switch properly. The flows are written using genius' mdsalManager.syncInstallFlow(), which does a synchronous write into the flows CONFIG data store. The packet out is sent via openflowplugin PacketProcessingService.transmitPacket() Is there a way to ensure (c) is triggered only after (a) and (b) are properly configured? Perhaps delay the packet out somehow? Use barrier somehow? If this is not a possibility, we can try two things that are pretty ugly: a. Reverse (a) and (b) - because then if only (a) is installed (which seems more common), the request would have to be re-punted to the ODL, delaying it. [1] will do that, but we need to run it many times to verify it helps. This still won't fix anything if (c) happens before both (a) and (b). b. Leave the entire bug, but try to fix this on a test level - add delay to the server's response or use something other than netcat that might retry UDP. The reason this might be ok, is that we have flow based SNAT coming up in Carbon which should eliminate this race. [1] https://git.opendaylight.org/gerrit/#/c/52380 --alon
_______________________________________________ openflowplugin-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev
