Re: [net-next sample action optimization 3/3] openvswitch: Optimize sample action for the clone use cases

2017-03-14 Thread Andy Zhou
> Actions parameter which hints if it is recirc or sample. We can add > recic-id param and set it if it is recic case. > will this work? > Just posted v2. I added a patch in the end to implement this refactoring as suggested.

Re: [net-next sample action optimization 3/3] openvswitch: Optimize sample action for the clone use cases

2017-03-14 Thread Pravin Shelar
On Mon, Mar 13, 2017 at 4:39 PM, Andy Zhou wrote: - skb = skb_clone(skb, GFP_ATOMIC); - if (!skb) - /* Skip the sample action when out of memory. */ - return 0; + if (key) { + err =

Re: [net-next sample action optimization 3/3] openvswitch: Optimize sample action for the clone use cases

2017-03-13 Thread Pravin Shelar
On Mon, Mar 13, 2017 at 1:14 PM, Andy Zhou wrote: > Thanks for the review. Please see comments inline. > > On Mon, Mar 13, 2017 at 12:08 AM, Pravin Shelar wrote: >> On Fri, Mar 10, 2017 at 4:51 PM, Andy Zhou wrote: >>> With the introduction of open

Re: [net-next sample action optimization 3/3] openvswitch: Optimize sample action for the clone use cases

2017-03-13 Thread Andy Zhou
>>> - skb = skb_clone(skb, GFP_ATOMIC); >>> - if (!skb) >>> - /* Skip the sample action when out of memory. */ >>> - return 0; >>> + if (key) { >>> + err = do_execute_actions(dp, skb, key, actions, rem); >>> + } else if

Re: [net-next sample action optimization 3/3] openvswitch: Optimize sample action for the clone use cases

2017-03-13 Thread Andy Zhou
Thanks for the review. Please see comments inline. On Mon, Mar 13, 2017 at 12:08 AM, Pravin Shelar wrote: > On Fri, Mar 10, 2017 at 4:51 PM, Andy Zhou wrote: >> With the introduction of open flow 'clone' action, the OVS user space >> can now translate the 'clone'

Re: [net-next sample action optimization 3/3] openvswitch: Optimize sample action for the clone use cases

2017-03-13 Thread Pravin Shelar
On Fri, Mar 10, 2017 at 4:51 PM, Andy Zhou wrote: > With the introduction of open flow 'clone' action, the OVS user space > can now translate the 'clone' action into kernel datapath 'sample' > action, with 100% probability, to ensure that the clone semantics, > which is that the