[net-next v5 4/4] openvswitch: Add meter action support

2017-11-10 Thread Andy Zhou
Implements OVS kernel meter action support. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 3 +++ net/openvswitch/actions.c| 6 ++ net/openvswitch/datapath.h | 1 + net/openvswitch/flow_netlink.c | 6 ++ 4 files changed, 16 inse

[net-next v5 3/4] openvswitch: Add meter infrastructure

2017-11-10 Thread Andy Zhou
OVS kernel datapath so far does not support Openflow meter action. This is the first stab at adding kernel datapath meter support. This implementation supports only drop band type. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/Makefile | 1 + net/openvswitch/datapath.c

[net-next v5 2/4] openvswitch: export get_dp() API.

2017-11-10 Thread Andy Zhou
Later patches will invoke get_dp() outside of datapath.c. Export it. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/datapath.c | 29 - net/openvswitch/datapath.h | 31 +++ 2 files changed, 31 insertions(+), 29 del

[net-next v5 0/4] Openvswitch meter action

2017-11-10 Thread Andy Zhou
; references on 32 bit builds. use div_u64() instead. v4 -> v5: rebase Andy Zhou (4): openvswitch: Add meter netlink definitions openvswitch: export get_dp() API. openvswitch: Add meter infrastructure openvswitch: Add meter action support include/uapi/

[net-next v5 1/4] openvswitch: Add meter netlink definitions

2017-11-10 Thread Andy Zhou
Meter has its own netlink family. Define netlink messages and attributes for communicating with the user space programs. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 51 1 file changed, 51 insertions(+) diff

Re: [net-next v4 4/4] openvswitch: Add meter action support

2017-11-10 Thread Andy Zhou
On Thu, Nov 9, 2017 at 12:50 AM, Pravin Shelar <pshe...@ovn.org> wrote: > On Thu, Nov 9, 2017 at 11:00 AM, Andy Zhou <az...@ovn.org> wrote: >> Implements OVS kernel meter action support. >> >> Signed-off-by: Andy Zhou <az...@ovn.org> >> --- > I

[net-next v4 4/4] openvswitch: Add meter action support

2017-11-08 Thread Andy Zhou
Implements OVS kernel meter action support. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 3 +++ net/openvswitch/actions.c| 6 ++ net/openvswitch/datapath.h | 1 + net/openvswitch/flow_netlink.c | 6 ++ 4 files changed, 16 inse

[net-next v4 3/4] openvswitch: Add meter infrastructure

2017-11-08 Thread Andy Zhou
OVS kernel datapath so far does not support Openflow meter action. This is the first stab at adding kernel datapath meter support. This implementation supports only drop band type. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/Makefile | 1 + net/openvswitch/datapath.c

[net-next v4 2/4] openvswitch: export get_dp() API.

2017-11-08 Thread Andy Zhou
Later patches will invoke get_dp() outside of datapath.c. Export it. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/datapath.c | 29 - net/openvswitch/datapath.h | 31 +++ 2 files changed, 31 insertions(+), 29 del

[net-next v4 1/4] openvswitch: Add meter netlink definitions

2017-11-08 Thread Andy Zhou
Meter has its own netlink family. Define netlink messages and attributes for communicating with the user space programs. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 51 1 file changed, 51 insertions(+) diff

[net-next v3 0/4] Openvswitch meter action

2017-11-08 Thread Andy Zhou
; references on 32 bit builds. use div_u64() instead. Andy Zhou (4): openvswitch: Add meter netlink definitions openvswitch: export get_dp() API. openvswitch: Add meter infrastructure openvswitch: Add meter action support include/uapi/linux/openvswitch.h | 54 ne

[net-next v3 2/4] openvswitch: export get_dp() API.

2017-11-06 Thread Andy Zhou
Later patches will invoke get_dp() outside of datapath.c. Export it. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/datapath.c | 29 - net/openvswitch/datapath.h | 31 +++ 2 files changed, 31 insertions(+), 29 del

[net-next v3 1/4] openvswitch: Add meter netlink definitions

2017-11-06 Thread Andy Zhou
Meter has its own netlink family. Define netlink messages and attributes for communicating with the user space programs. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 51 1 file changed, 51 insertions(+) diff

[net-next v3 0/4] Openvswitch meter action

2017-11-06 Thread Andy Zhou
nes of code. With those two observations, it seems cleaner to add meter support in the openvswitch module directly. --- v1(RFC)->v2: remove unused code improve locking and other review comments v2 -> v3: rebase Andy Zhou (4): openvswitch: Add meter netlink de

[net-next v3 3/4] openvswitch: Add meter infrastructure

2017-11-06 Thread Andy Zhou
OVS kernel datapath so far does not support Openflow meter action. This is the first stab at adding kernel datapath meter support. This implementation supports only drop band type. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/Makefile | 1 + net/openvswitch/datapath.c

[net-next v3 4/4] openvswitch: Add meter action support

2017-11-06 Thread Andy Zhou
Implements OVS kernel meter action support. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 3 +++ net/openvswitch/actions.c| 6 ++ net/openvswitch/datapath.h | 1 + net/openvswitch/flow_netlink.c | 6 ++ 4 files changed, 16 inse

Re: [net-next v2 3/4] openvswitch: Add meter infrastructure

2017-11-02 Thread Andy Zhou
On Thu, Nov 2, 2017 at 5:07 AM, Pravin Shelar <pshe...@ovn.org> wrote: > On Thu, Nov 2, 2017 at 3:07 AM, Andy Zhou <az...@ovn.org> wrote: >> On Fri, Oct 20, 2017 at 8:32 PM, Pravin Shelar <pshe...@ovn.org> wrote: >>> On Thu, Oct 19, 2017 at 5:58

Re: [net-next v2 3/4] openvswitch: Add meter infrastructure

2017-11-02 Thread Andy Zhou
On Fri, Oct 20, 2017 at 8:32 PM, Pravin Shelar <pshe...@ovn.org> wrote: > On Thu, Oct 19, 2017 at 5:58 PM, Andy Zhou <az...@ovn.org> wrote: >> >> On Thu, Oct 19, 2017 at 02:47 Pravin Shelar <pshe...@ovn.org> wrote: >>> >>> On Tue, Oct 17

Re: [net-next RFC 3/4] openvswitch: Add meter infrastructure

2017-10-17 Thread Andy Zhou
On Mon, Oct 16, 2017 at 10:49 AM, Pravin Shelar <pshe...@ovn.org> wrote: > On Mon, Oct 16, 2017 at 12:05 AM, Andy Zhou <az...@ovn.org> wrote: >> On Fri, Oct 13, 2017 at 5:12 PM, Pravin Shelar <pshe...@ovn.org> wrote: >>> On Thu, Oct 12, 2017 at 3:38 PM, Andy

[net-next v2 4/4] openvswitch: Add meter action support

2017-10-17 Thread Andy Zhou
Implements OVS kernel meter action support. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 3 +++ net/openvswitch/actions.c| 6 ++ net/openvswitch/datapath.h | 1 + net/openvswitch/flow_netlink.c | 6 ++ 4 files changed, 16 inse

[net-next v2 2/4] openvswitch: export get_dp() API.

2017-10-17 Thread Andy Zhou
Later patches will invoke get_dp() outside of datapath.c. Export it. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/datapath.c | 29 - net/openvswitch/datapath.h | 31 +++ 2 files changed, 31 insertions(+), 29 del

[net-next v2 1/4] openvswitch: Add meter netlink definitions

2017-10-17 Thread Andy Zhou
Meter has its own netlink family. Define netlink messages and attributes for communicating with the user space programs. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 51 1 file changed, 51 insertions(+) diff

[net-next v2 3/4] openvswitch: Add meter infrastructure

2017-10-17 Thread Andy Zhou
OVS kernel datapath so far does not support Openflow meter action. This is the first stab at adding kernel datapath meter support. This implementation supports only drop band type. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/Makefile | 1 + net/openvswitch/datapath.c

[net-next v2 0/4] Openvswitch meter action

2017-10-17 Thread Andy Zhou
nes of code. With those two observations, it seems cleaner to add meter support in the openvswitch module directly. --- v1(RFC)->v2: remove unused code improve locking and other review comments Andy Zhou (4): openvswitch: Add meter netlink defin

Re: [net-next RFC 4/4] openvswitch: Add meter action support

2017-10-16 Thread Andy Zhou
On Fri, Oct 13, 2017 at 5:13 PM, Pravin Shelar <pshe...@ovn.org> wrote: > On Thu, Oct 12, 2017 at 3:38 PM, Andy Zhou <az...@ovn.org> wrote: >> Implements OVS kernel meter action support. >> >> Signed-off-by: Andy Zhou <az...@ovn.org> >> --- >&g

Re: [net-next RFC 3/4] openvswitch: Add meter infrastructure

2017-10-16 Thread Andy Zhou
On Fri, Oct 13, 2017 at 5:12 PM, Pravin Shelar <pshe...@ovn.org> wrote: > On Thu, Oct 12, 2017 at 3:38 PM, Andy Zhou <az...@ovn.org> wrote: >> OVS kernel datapath so far does not support Openflow meter action. >> This is the first stab at adding ke

[net-next RFC 0/4] Openvswitch meter action

2017-10-12 Thread Andy Zhou
nes of code. With those two observations, it seems cleaner to add meter support in the openvswitch module directly. Andy Zhou (4): openvswitch: Add meter netlink definitions openvswitch: export get_dp() API. openvswitch: Add meter infrastructure openvswitch: Add meter action support include/u

[net-next RFC 2/4] openvswitch: export get_dp() API.

2017-10-12 Thread Andy Zhou
Later patches will invoke get_dp() outside of datapath.c. Export it. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/datapath.c | 29 - net/openvswitch/datapath.h | 31 +++ 2 files changed, 31 insertions(+), 29 del

[net-next RFC 3/4] openvswitch: Add meter infrastructure

2017-10-12 Thread Andy Zhou
OVS kernel datapath so far does not support Openflow meter action. This is the first stab at adding kernel datapath meter support. This implementation supports only drop band type. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/Makefile | 1 + net/openvswitch/datapath.c

[net-next RFC 1/4] openvswitch: Add meter netlink definitions

2017-10-12 Thread Andy Zhou
Meter has its own netlink family. Define netlink messages and attributes for communicating with the user space programs. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 51 1 file changed, 51 insertions(+) diff

[net-next RFC 4/4] openvswitch: Add meter action support

2017-10-12 Thread Andy Zhou
Implements OVS kernel meter action support. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi/linux/openvswitch.h | 1 + net/openvswitch/actions.c| 12 net/openvswitch/datapath.h | 1 + net/openvswitch/flow_netlink.c | 6 ++ 4 files chang

[net-next sample action optimization v4 1/4] openvswitch: Deferred fifo API change.

2017-03-20 Thread Andy Zhou
to pass in action lists that are not fully encoded by themselves. Signed-off-by: Andy Zhou <az...@ovn.org> Acked-by: Joe Stringer <j...@ovn.org> --- net/openvswitch/actions.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/act

[net-next sample action optimization v4 0/4]

2017-03-20 Thread Andy Zhou
nce patch 4. Fix two bugs pointed out by Pravin, Remove 'is_sample' variable. v2->v3: Enhance patch 4, Rafctor to move more common logic to clone_execute(). v1->v2: Address Pravin's comment, Refactor recirc and sample to share more common code Andy Zhou (4): op

[net-next sample action optimization v4 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-20 Thread Andy Zhou
Added clone_execute() that both the sample and the recirc action implementation can use. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.c | 176 -- 1 file changed, 93 insertions(+), 83 deletions(-) diff --git a/net/openv

[net-next sample action optimization v4 2/4] openvswitch: Refactor recirc key allocation.

2017-03-20 Thread Andy Zhou
The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou <az...@ovn.org> Acked-by: Pravin B Shelar <pshe...@ovn.org&

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

2017-03-20 Thread Andy Zhou
is performed only once at the flow downloading time. Another related optimization is to rewrite the action list at flow downloading time in order to save the fast path from parsing the sample action list in its original form repeatedly. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi

Re: [net-next sample action optimization v3 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-20 Thread Andy Zhou
On Sat, Mar 18, 2017 at 12:22 PM, Pravin Shelar <pshe...@ovn.org> wrote: > On Thu, Mar 16, 2017 at 3:48 PM, Andy Zhou <az...@ovn.org> wrote: >> Added clone_execute() that both the sample and the recirc >> action implementation can use. >> >> Signed-off-by: A

[net-next sample action optimization v3 2/4] openvswitch: Refactor recirc key allocation.

2017-03-16 Thread Andy Zhou
The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou <az...@ovn.org> Acked-by: Pravin B Shelar <pshe...@ovn.org&

[net-next sample action optimization v3 1/4] openvswitch: Deferred fifo API change.

2017-03-16 Thread Andy Zhou
to pass in action lists that are not fully encoded by themselves. Signed-off-by: Andy Zhou <az...@ovn.org> Acked-by: Joe Stringer <j...@ovn.org> --- net/openvswitch/actions.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/act

[net-next sample action optimization v3 0/4]

2017-03-16 Thread Andy Zhou
ess pravin's comment, Refactor recirc and sample to share more common code v2->v3: Enhace patch 4, add more loigc to the common code Andy Zhou (4): openvswitch: Deferred fifo API change. openvswitch: Refactor recirc key allocation. openvswitch: Optimize sample action for the clo

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

2017-03-16 Thread Andy Zhou
is performed only once at the flow downloading time. Another related optimization is to rewrite the action list at flow downloading time in order to save the fast path from parsing the sample action list in its original form repeatedly. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi

[net-next sample action optimization v3 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-16 Thread Andy Zhou
Added clone_execute() that both the sample and the recirc action implementation can use. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.c | 175 -- 1 file changed, 92 insertions(+), 83 deletions(-) diff --git a/net/openv

Re: [net-next sample action optimization v2 1/4] openvswitch: Deferred fifo API change.

2017-03-16 Thread Andy Zhou
On Thu, Mar 16, 2017 at 10:28 AM, Pravin Shelar <pshe...@ovn.org> wrote: > On Tue, Mar 14, 2017 at 4:08 PM, Andy Zhou <az...@ovn.org> wrote: >> add_deferred_actions() API currently requires actions to be passed in >> as a fully encoded netlink message. So far both 'samp

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.

[net-next sample action optimization v2 0/4]

2017-03-14 Thread Andy Zhou
The sample action can be used for translating Openflow 'clone' action. However its implementation has not been sufficiently optimized for this use case. This series attempts to close the gap. Patch 3 commit message has more details on the specific optimizations implemented. Andy Zhou (4

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

2017-03-14 Thread Andy Zhou
is performed only once at the flow downloading time. Another related optimization is to rewrite the action list at flow downloading time in order to save the fast path from parsing the sample action list in its original form repeatedly. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi

[net-next sample action optimization v2 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-14 Thread Andy Zhou
Added execute_or_defer_actions() that both sample and recirc action's implementation can use. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.c | 96 +-- 1 file changed, 59 insertions(+), 37 deletions(-) diff --git

[net-next sample action optimization v2 2/4] openvswitch: Refactor recirc key allocation.

2017-03-14 Thread Andy Zhou
The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.

[net-next sample action optimization v2 1/4] openvswitch: Deferred fifo API change.

2017-03-14 Thread Andy Zhou
to pass in action lists that are not fully encoded by themselves. Signed-off-by: Andy Zhou <az...@ovn.org> Acked-by: Joe Stringer <j...@ovn.org> --- net/openvswitch/actions.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/act

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 <pshe...@ovn.org> wrote: > On Fri, Mar 10, 2017 at 4:51 PM, Andy Zhou <az...@ovn.org> wrote: >> With the introduction of open flow 'clone' action, the OVS user space >> c

[net-next sample action optimization 2/3] openvswitch: Refactor recirc key allocation.

2017-03-10 Thread Andy Zhou
The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.

[net-next sample action optimization 0/3]

2017-03-10 Thread Andy Zhou
The sample action can be used for translating Openflow 'clone' action. However its implementation has not been sufficiently optimized for this use case. This series attempts to close the gap. Patch 3 commit message has more details on the specific optimizations implemented. Andy Zhou (3

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

2017-03-10 Thread Andy Zhou
is performed only once at the flow downloading time. Another related optimization is to rewrite the action list at flow downloading time in order to save the fast path from parsing the sample action list in its original form repeatedly. Signed-off-by: Andy Zhou <az...@ovn.org> --- include/uapi

[net-next sample action optimization 1/3] openvswitch: Deferred fifo API change.

2017-03-10 Thread Andy Zhou
to pass in action lists that are not fully encoded by themselves. Signed-off-by: Andy Zhou <az...@ovn.org> Acked-by: Joe Stringer <j...@ovn.org> --- net/openvswitch/actions.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/act

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

2017-03-10 Thread Andy Zhou
On Thu, Mar 9, 2017 at 11:46 AM, Joe Stringer <j...@ovn.org> wrote: > On 7 March 2017 at 16:15, Andy Zhou <az...@ovn.org> wrote: >> With the introduction of open flow 'clone' action, the OVS user space >> can now translate the 'clone' action into kernel datapath '

Re: [RFC net-next sample action optimization 2/3] openvswitch: Refactor recirc key allocation.

2017-03-10 Thread Andy Zhou
On Thu, Mar 9, 2017 at 11:11 AM, Joe Stringer <j...@ovn.org> wrote: > On 7 March 2017 at 16:15, Andy Zhou <az...@ovn.org> wrote: >> The logic of allocating and copy key for each 'exec_actions_level' >> was specific to execute_recirc(). However, future patches will

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

2017-03-07 Thread Andy Zhou
only once at the flow downloading time. The third optimization implemented is to rewrite the action list at flow downloading time in order to save the fast path from parsing the sample action list in its original form repeatedly. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openv

[RFC net-next sample action optimization 2/3] openvswitch: Refactor recirc key allocation.

2017-03-07 Thread Andy Zhou
The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.

[RFC net-next sample action optimization 0/3]

2017-03-07 Thread Andy Zhou
The sample action can be used for translating Openflow 'clone' action. However its implementation has not been sufficiently optimized for this use case. This series attempts to close the gap. Patch 3 commit message has more details on the specific optimizations implemented. Andy Zhou (3

[RFC net-next sample action optimization 1/3] openvswitch: deferred fifo api change

2017-03-07 Thread Andy Zhou
to pass in action lists that are not fully encoded by themselves. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index c82301c..7

Re: [net-next ovs clone action 3/3] openvswitch: kernel datapath clone action

2017-02-01 Thread Andy Zhou
On Wed, Feb 1, 2017 at 6:30 PM, Pravin Shelar <pshe...@ovn.org> wrote: > On Tue, Jan 31, 2017 at 8:47 AM, Andy Zhou <az...@ovn.org> wrote: >> Add 'clone' kernel datapath support. In case the actions within clone >> do not modify the current flow, the actions are execut

[net-next ovs clone action 3/3] openvswitch: kernel datapath clone action

2017-01-31 Thread Andy Zhou
current flow key, a key has to be copied. In case the percpu 'flow_keys' is available for the next 'exec_actions_level', the clone actions will be executed without using the deferred fifo. Otherwise, deferred fifo is used this clone action. Signed-off-by: Andy Zhou <az...@ovn.org> --- includ

[net-next ovs clone action 2/3] openvswitch: Refactor recirc key allocation.

2017-01-31 Thread Andy Zhou
The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.

[net-next ovs clone action 1/3] openvswitch: deferred fifo api change

2017-01-31 Thread Andy Zhou
to pass in action lists that are not fully encoded by themselves. Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index efa9a88..6

Re: [userspace meter v3 1/5] netdev-dummy: Add --len option for netdev-dummy/receive command

2017-01-30 Thread Andy Zhou
Please discard this series. These are ovs user space changes, not kernel changes. They are sent in error. Sorry. On Mon, Jan 30, 2017 at 10:39 PM, Andy Zhou <az...@ovn.org> wrote: > Currently, there is no way to specify the packet size when injecting > a packet via "net

Re: [userspace meter v3 0/5] Userspace meter

2017-01-30 Thread Andy Zhou
Please discard this series. These are ovs user space changes, not kernel changes. They are sent in error. Sorry. On Mon, Jan 30, 2017 at 10:39 PM, Andy Zhou <az...@ovn.org> wrote: > Repost user space meter support. This is based Jarno's original work > at: https://mail.openvswitch.o

[userspace meter v3 4/5] ofproto: Meter translation.

2017-01-30 Thread Andy Zhou
From: Jarno Rajahalme <ja...@ovn.org> Translate OpenFlow METER instructions to datapath meter actions. Signed-off-by: Jarno Rajahalme <ja...@ovn.org> Signed-off-by: Andy Zhou <az...@ovn.org> --- include/openvswitch/ofp-actions.h | 1 + lib/dpif.c

[userspace meter v3 3/5] dpif: Meter framework.

2017-01-30 Thread Andy Zhou
From: Jarno Rajahalme <ja...@ovn.org> Add DPIF-level infrastructure for meters. Allow meter_set to modify the meter configuration (e.g. set the burst size if unspecified). Signed-off-by: Jarno Rajahalme <ja...@ovn.org> Signed-off-by: Andy Zhou <az...@ovn.org> --- datapath/li

[userspace meter v3 5/5] dpif-netdev: Simple DROP meter implementation.

2017-01-30 Thread Andy Zhou
first tried as a whole, and only if some of the meter bands are hit, we need to process the packets individually. Signed-off-by: Jarno Rajahalme <ja...@ovn.org> Signed-off-by: Andy Zhou <az...@ovn.org> --- lib/dpif-netdev.c| 362 --- te

[userspace meter v3 2/5] dp-packet: Enhance packet batch APIs.

2017-01-30 Thread Andy Zhou
. Add macros to support this use case. Signed-off-by: Andy Zhou <az...@ovn.org> --- lib/dp-packet.h | 140 +++ lib/dpif-netdev.c| 62 +-- lib/dpif.c | 2 +- lib/netdev-dummy.c

[userspace meter v3 1/5] netdev-dummy: Add --len option for netdev-dummy/receive command

2017-01-30 Thread Andy Zhou
h. Signed-off-by: Andy Zhou <az...@ovn.org> --- lib/netdev-dummy.c | 38 -- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index e6e36cd..10df0a7 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dumm

[userspace meter v3 0/5] Userspace meter

2017-01-30 Thread Andy Zhou
Repost user space meter support. This is based Jarno's original work at: https://mail.openvswitch.org/pipermail/ovs-dev/2015-November/306304.html. With some enhancements, and rebased to current master. --- v1-v2: rebase and repost. v2-v3: simplify patch 2/5. Andy Zhou (2): netdev-dummy: Add

[net-next v2] openvswitch: Simplify do_execute_actions().

2017-01-27 Thread Andy Zhou
do_execute_actions() implements a worthwhile optimization: in case an output action is the last action in an action list, skb_clone() can be avoided by outputing the current skb. However, the implementation is more complicated than necessary. This patch simplify this logic. Signed-off-by: Andy

Re: [net-next] openvswitch: Simplify do_execute_actions().

2017-01-27 Thread Andy Zhou
On Fri, Jan 27, 2017 at 12:42 PM, Pravin Shelar <pshe...@ovn.org> wrote: > On Wed, Jan 25, 2017 at 9:24 PM, Andy Zhou <az...@ovn.org> wrote: >> do_execute_actions() implements a worthwhile optimization: in case >> an output action is the last action in an action list, sk

[net-next] openvswitch: Simplify do_execute_actions().

2017-01-25 Thread Andy Zhou
do_execute_actions() implements a worthwhile optimization: in case an output action is the last action in an action list, skb_clone() can be avoided by outputing the current skb. However, the implementation is more complicated than necessary. This patch simplify this logic. Signed-off-by: Andy

[net] openvswitch: Allow deferred action fifo to expand during run time

2016-03-19 Thread Andy Zhou
ama...@linux.vnet.ibm.com> Reported-at: http://openvswitch.org/pipermail/dev/2016-March/067672.html Signed-off-by: Andy Zhou <az...@ovn.org> --- net/openvswitch/actions.c | 45 - 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/net/openvswitch/act