HI Alon,

Yeah, I too realized later that flow modification only comes in if stats are 
enabled which we want to avoid. Which means listener won't work and we'll have 
to use RPC to query flows and cycle through them to see if it has been added.

Barrier could help but believe not available in 1.3 Is there a Nicira extension 
that serves similar purpose?

Regads,
Vishal.

-----Original Message-----
From: Kochba, Alon [mailto:[email protected]] 
Sent: 01 March 2017 14:18
To: Vishal Thapar <[email protected]>; Jamo Luhrsen 
<[email protected]>; Chetan Arakere Gowdru 
<[email protected]>; N Vivekanandan 
<[email protected]>; [email protected]; 
'openflowplugin-dev' <[email protected]>; 
[email protected]
Cc: Karthikeyan Krishnan <[email protected]>
Subject: RE: [openflowplugin-dev] [netvirt-dev] SNAT test UDP failure - race 
between flows being written and packet out?

Vishal, Chetan, you both mentioned some way to only do an operation after the 
flow has been configured on the switch.
As far as I know there is no flow notification on flow mod, so the only way 
this could be done is using statistics to poll the flows.

That solution is problematic since it probably takes a while to get the 
confirmation, and requires statistics to be enabled?
IMdsalApiManager actually seemed to do this in the past according to the docs 
and delayTime parameter, but it seems this was removed at some point and 
delayTime is no longer used.

Ideally it would be nice if openflowplugin could at least ensure the packet out 
is processed after the flow mod has been sent.

What listener did you have in mind Vishal?

--alon

-----Original Message-----
From: Vishal Thapar [mailto:[email protected]]
Sent: Wednesday, 1 March 2017 08:14
To: Jamo Luhrsen <[email protected]>; Chetan Arakere Gowdru 
<[email protected]>; N Vivekanandan 
<[email protected]>; Kochba, Alon <[email protected]>; 
[email protected]; 'openflowplugin-dev' 
<[email protected]>; [email protected]
Cc: Karthikeyan Krishnan <[email protected]>
Subject: RE: [openflowplugin-dev] [netvirt-dev] SNAT test UDP failure - race 
between flows being written and packet out?

Aha! I thought [1] was the proper fix.

Chetan,

I think yours is the only sure-shot fix that would work. We can create an 
ephemeral listener that lists for flow to be added and once it gets 
notification it sends out the packet and exits.

Regards,
Vishal.

-----Original Message-----
From: Jamo Luhrsen [mailto:[email protected]]
Sent: 01 March 2017 11:39
To: Vishal Thapar <[email protected]>; Chetan Arakere Gowdru 
<[email protected]>; N Vivekanandan 
<[email protected]>; 'Kochba, Alon' <[email protected]>; 
[email protected]; 'openflowplugin-dev' 
<[email protected]>; [email protected]
Cc: Karthikeyan Krishnan <[email protected]>
Subject: Re: [openflowplugin-dev] [netvirt-dev] SNAT test UDP failure - race 
between flows being written and packet out?

Vishal,

I think Alon's [1] was not the new flow based SNAT coming up, but rather one of 
his "ugly" ideas. [1] is reversing the inbound/outbound flow installation order.

JamO

On 02/28/2017 10:04 PM, Vishal Thapar wrote:
> Hi Alon,
> 
>  
> 
> If [1] is expected to fix this problem, then why do we need test 
> change or any other temp fix? Let this be a known failure, we’ll see if it 
> passes on [1] and if not then we can choose to work on separate fix or fix it 
> as part of [1] itself.
> 
>  
> 
> Regards,
> 
> Vishal.
> 
>  
> 
> *From:*[email protected]
> [mailto:[email protected]] *On Behalf Of 
> *Chetan A G
> *Sent:* 01 March 2017 10:53
> *To:* N Vivekanandan <[email protected]>; 'Kochba, Alon' 
> <[email protected]>; [email protected];
> 'openflowplugin-dev' <[email protected]>;
> [email protected]
> *Cc:* Karthikeyan Krishnan <[email protected]>
> *Subject:* Re: [netvirt-dev] SNAT test UDP failure - race between flows being 
> written and packet out?
> 
>  
> 
> Hi Alon,
> 
>  
> 
> Can we somehow make step (c) to wait for onFlowAdded notifications of (a) and 
> (b) and then only execute (c) for UDP packets ?
> 
>  
> 
> Thanks,
> 
> Chetan
> 
>  
> 
> *From:*N Vivekanandan [mailto:[email protected]]
> *Sent:* 28 February 2017 21:41
> *To:* Kochba, Alon <[email protected] <mailto:[email protected]>>; 
> [email protected]
> <mailto:[email protected]>; openflowplugin-dev 
> <[email protected]
> <mailto:[email protected]>>;
> [email protected]
> <mailto:[email protected]>
> *Cc:* Yugandhar Sarraju <[email protected] 
> <mailto:[email protected]>>; Chetan Arakere Gowdru 
> <[email protected]
> <mailto:[email protected]>>; Karthikeyan Krishnan 
> <[email protected]
> <mailto:[email protected]>>
> *Subject:* RE: [netvirt-dev] SNAT test UDP failure - race between flows being 
> written and packet out?
> 
>  
> 
> ‘looped in Yugandhar/Chetan/Karthikeyan
> 
>  
> 
> *From:*[email protected]
> <mailto:[email protected]>
> [mailto:[email protected]] *On Behalf Of 
> *Kochba, Alon
> *Sent:* Tuesday, February 28, 2017 9:31 PM
> *To:* [email protected]
> <mailto:[email protected]>; openflowplugin-dev 
> <[email protected]
> <mailto:[email protected]>>;
> [email protected]
> <mailto:[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:
> 
>  1. Installs an inbound flow using 
> NaptEventHandler#buildAndInstallNatFlows()
>  2. Installs an outbound flow using 
> NaptEventHandler#buildAndInstallNatFlows()
>  3. 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:
> 
>  1. 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).
> 
>  2. 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
> 
_______________________________________________
openflowplugin-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev

Reply via email to