Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-15 Thread Ben Pfaff
On Thu, Dec 15, 2016 at 07:38:15AM -0800, William Tu wrote: > > Here are some examples of translations from OpenFlow to datapath > > actions, the way I would expect them to happen: > > > > OF: 1, clone(truncate(100), push_vlan, 2), 3 > > dp: 1, truncate(100), push_vlan, 2, pop_vlan, 3 > > >

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-15 Thread William Tu
> Here are some examples of translations from OpenFlow to datapath > actions, the way I would expect them to happen: > > OF: 1, clone(truncate(100), push_vlan, 2), 3 > dp: 1, truncate(100), push_vlan, 2, pop_vlan, 3 > I see your point; the "clone" is handled at translation code, and pop_vla

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-14 Thread Ben Pfaff
On Wed, Dec 14, 2016 at 06:41:46PM -0800, William Tu wrote: > >> actions= > >> clone(truncate(100), push_vlan, resubmit, ...) > >> where we don't need to worry about missing the truncate_unset() because > >> truncated packet is not visible outside the clone(). > > > > I see how "clone" helps with

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-14 Thread William Tu
Thanks for the feedback. >> actions= >> clone(truncate(100), push_vlan, resubmit, ...) >> where we don't need to worry about missing the truncate_unset() because >> truncated packet is not visible outside the clone(). > > I see how "clone" helps with this conceptually, but I'm not sure why the >

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-14 Thread Ben Pfaff
On Wed, Nov 30, 2016 at 01:35:49PM -0800, William Tu wrote: > This patch adds OpenFlow clone action with syntax as below: > "clone([action][,action...])". The clone() action makes a copy of the > current packet and executes the list of actions against the packet, > without affecting the packet aft

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-04 Thread Ben Pfaff
I sent out a series based on this, but it appears to reveal a bug in the clone action that causes segfaults. Try the series without the patch "XXX Fix segfault in clone action" applied and you should get test failures in several tests, e.g. 2249 2251 2252 2253 2254 2256 2259 2260 2266 2268 2277 22

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-02 Thread William Tu
Note that there are some differences between kernel datapath and userspace datapath, when using the SAMPLE action. For userspace, we execute the nested actions inside SAMPLE inline/immediately, while in kernel datapath, we defer the nested actions to a fifo queue and execute in the end. For exampl

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-02 Thread Ben Pfaff
On Wed, Nov 30, 2016 at 01:35:49PM -0800, William Tu wrote: > This patch adds OpenFlow clone action with syntax as below: > "clone([action][,action...])". The clone() action makes a copy of the > current packet and executes the list of actions against the packet, > without affecting the packet aft

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-01 Thread William Tu
On Thu, Dec 1, 2016 at 6:25 PM, Gao Zhenyu wrote: > Thanks for working on it! > > Can we have nested clone? > > actions=clone(push_vlan(1), resubmit(1,2), clone(mod_dl_src:, > output:5) ) > I tested it for a couple of simple cases, it seems ok. But it might complicate things a lot. > BTW, I beli

Re: [ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-12-01 Thread Gao Zhenyu
Thanks for working on it! Can we have nested clone? actions=clone(push_vlan(1), resubmit(1,2), clone(mod_dl_src:, output:5) ) BTW, I believe the port 3 will get a 104byte size packet with this action, right? actions= clone(truncate(100), push_vlan, output:3) Thanks Zhenyu Gao 2016-12-01 5:35

[ovs-dev] [RFC PATCHv2] ofp-actions: Add clone action.

2016-11-30 Thread William Tu
This patch adds OpenFlow clone action with syntax as below: "clone([action][,action...])". The clone() action makes a copy of the current packet and executes the list of actions against the packet, without affecting the packet after the "clone(...)" action. In other word, the packet before the cl