Re: [ovs-dev] [PATCH net] net: ovs: flow: fix potential illegal memory access in __parse_flow_nlattrs

2013-09-07 Thread Jesse Gross
On Sat, Sep 7, 2013 at 12:41 AM, Daniel Borkmann wrote: > In function __parse_flow_nlattrs(), we check for condition > (type > OVS_KEY_ATTR_MAX) and if true, print an error, but we do > not return from this function as in other checks. It seems this > has been forgotten, as otherwise, we could acc

[ovs-dev] [PATCH 7/8] lib/odp, ofproto xlate: Meter execution support.

2013-09-07 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/dpif-netdev.c|3 ++- lib/odp-execute.c| 18 +- lib/odp-execute.h|5 - ofproto/ofproto-dpif-xlate.c | 15 +-- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/lib/d

[ovs-dev] [PATCH 8/8] dpif-netdev: Simple DROP meter implementation.

2013-09-07 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/dpif-netdev.c | 299 + 1 file changed, 281 insertions(+), 18 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index c851d62..37e8931 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @

[ovs-dev] [PATCH 1/8] Delete meters in the right place.

2013-09-07 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- ofproto/ofproto.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 4d33de7..fe81310 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1138,11 +1138,6 @@ ofproto_destroy__(stru

[ovs-dev] [PATCH 6/8] dpif: Meter framework.

2013-09-07 Thread Jarno Rajahalme
Add DPIF-level support for meters. Allow meter_set to modify the meter configuration (e.g. set the burst size if unspecified). Signed-off-by: Jarno Rajahalme --- include/linux/openvswitch.h |3 ++ lib/dpif-linux.c| 40 lib/dpif-netdev.c | 40 +++

[ovs-dev] [PATCH 0/8] ofproto-dpif meters support.

2013-09-07 Thread Jarno Rajahalme
This series fixes some bugs, adds meter support to ovs-ofctl, and provides dpif-netdev meters implmentation of the DROP band type. Jarno Rajahalme (8): Delete meters in the right place. ofproto: Use proper error code when meter_id is out of range. ofp-parse: Set usable protocols in parse_ofp

[ovs-dev] [PATCH 4/8] ofproto meters: Avoid locking.

2013-09-07 Thread Jarno Rajahalme
Store ofproto provider meter ID corresponding to the OpenFlow meter ID to the meter action when installing flow's actions to avoid multi-threaded access to ofproto's meters. Changed the ofproto meter API to require the provider keep the provider meter ID unchanged when modifying a meter. Signed-of

[ovs-dev] [PATCH 5/8] ovs-ofctl: Add meter support.

2013-09-07 Thread Jarno Rajahalme
Adds commands add-meter, mod-meter, del-meter, del-meters, dump-meter, dump-meters, meter-stats, and meter-features. Syntax is as follows: add-meter meter= (kbps|pktps) [burst] [stats] bands= type=(drop|dscp_remark) rate= [burst_size=] [prec_level=] mod-meter meter= (kbps|pktps) [burst] [sta

[ovs-dev] [PATCH 2/8] ofproto: Use proper error code when meter_id is out of range.

2013-09-07 Thread Jarno Rajahalme
Use OUT_OF_METERS when given meter_id is greater than what is supported by the datapath. Retain the INVALID_METER error code for the meter_ids outside of the range supported by the specification. Signed-off-by: Jarno Rajahalme --- ofproto/ofproto.c |5 - 1 file changed, 4 insertions(+),

[ovs-dev] [PATCH 3/8] ofp-parse: Set usable protocols in parse_ofp_meter_mod_str__().

2013-09-07 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/ofp-parse.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index a61beb9..e28bf02 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -1370,7 +1370,7 @@ parse_ofp_meter_mod_str__(struct ofputil_mete

[ovs-dev] [RFC PATCH] ofproto: update flow_stats flags on flow_stats_request

2013-09-07 Thread Daniel Baluta
This is a first step in implementing 'on demand flow counters'. We save flow_mod flags into newly created rule when a new flow is added, and echo them back in the flow stats request. Signed-off-by: Daniel Baluta --- * This just an RFC patch and need more comments and testing ofproto/ofproto-pro

[ovs-dev] hackathon day 2 update

2013-09-07 Thread Ben Pfaff
Here's my summary of the status of the Open vSwitch hackathon as of this writing. Keep the patches coming in, and feel free to jump in on #openvswitch on irc.freenode.net if you want to coordinate in real time. Completed and In-Progress Tasks --- * Groups are in!

Re: [ovs-dev] [PATCH] openflow-1.1+: OFPT_TABLE_MOD (part 1)

2013-09-07 Thread Ben Pfaff
On Sat, Sep 07, 2013 at 03:02:32AM -0700, Andy Zhou wrote: > Added infrastructure to support Openflow OFPT_TABLE_MOD message. This > patch does not include the flexible table miss handling code > that is necessary to support the semantics specified in OFPT_TABLE_MOD > messages. > > Current Flow m

Re: [ovs-dev] [PATCH 0/3] Implement OFPT_GET_ASYNC_REQUEST, OFPT_GET_ASYNC_REPLY

2013-09-07 Thread Ben Pfaff
On Sat, Sep 07, 2013 at 03:36:20PM +0300, Alexandru Copot wrote: > This series adds a handler for OFPT_GET_ASYNC_REQUEST which > sends an OFPT_GET_ASYNC_REPLY with the configured settings. > > It also allows printing reply messages with the existing code > used for OFPT_SET_ASYNC. > > Finally, th

Re: [ovs-dev] [PATCH 3/3] tests/ofproto: add basic test for OFPT_GET_ASYNC_REQUEST/REPLY

2013-09-07 Thread Ben Pfaff
On Sat, Sep 07, 2013 at 03:36:23PM +0300, Alexandru Copot wrote: > This only checks the default settings. > > Signed-off-by: Alexandru Copot > Cc: Daniel Baluta I had never seen this use of read -r -d '' expected <<'EOF' ... EOF before. It is clever. I learned somethin

Re: [ovs-dev] [PATCH 1/3] ofproto: implement OFPT_GET_ASYNC_REQUEST

2013-09-07 Thread Alexandru Copot
On Sat, Sep 7, 2013 at 7:54 PM, Ben Pfaff wrote: > On Sat, Sep 07, 2013 at 03:36:21PM +0300, Alexandru Copot wrote: >> Signed-off-by: Alexandru Copot >> Cc: Daniel Baluta > > "sparse" reported that the byte order conversions were reversed, so I > folded this in: Ok, thanks for fixing it for me!

Re: [ovs-dev] [PATCH 1/3] ofproto: implement OFPT_GET_ASYNC_REQUEST

2013-09-07 Thread Ben Pfaff
On Sat, Sep 07, 2013 at 03:36:21PM +0300, Alexandru Copot wrote: > Signed-off-by: Alexandru Copot > Cc: Daniel Baluta "sparse" reported that the byte order conversions were reversed, so I folded this in: diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 36151dd..6900e99 100644 --- a/ofpr

Re: [ovs-dev] [PATCH 0/2] netdev: Don't allow adding loopback devices

2013-09-07 Thread Ben Pfaff
On Sat, Sep 07, 2013 at 12:35:13PM +0300, Alexandru Copot wrote: > This series fixes a behaviour found in a comment in dpif-netdev.c > by rejecting loopback devices when trying to add them as a port. Both applied, thanks! ___ dev mailing list dev@openvsw

[ovs-dev] [PATCH 3/3] tests/ofproto: add basic test for OFPT_GET_ASYNC_REQUEST/REPLY

2013-09-07 Thread Alexandru Copot
This only checks the default settings. Signed-off-by: Alexandru Copot Cc: Daniel Baluta --- tests/ofproto.at | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tests/ofproto.at b/tests/ofproto.at index 38bfb02..44f81b8 100644 --- a/tests/ofproto.at +++ b/tes

[ovs-dev] [PATCH 2/3] ofp-print: display OFPT_GET_ASYNC_REPLY in same way as OFPT_SET_ASYNC

2013-09-07 Thread Alexandru Copot
Signed-off-by: Alexandru Copot Cc: Daniel Baluta --- lib/ofp-print.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 518f9af..b280a37 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -2374,8 +2374,6 @@ ofp_to_string__(const s

[ovs-dev] [PATCH 1/3] ofproto: implement OFPT_GET_ASYNC_REQUEST

2013-09-07 Thread Alexandru Copot
Signed-off-by: Alexandru Copot Cc: Daniel Baluta --- ofproto/connmgr.c | 9 + ofproto/connmgr.h | 3 +++ ofproto/ofproto.c | 29 - 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 1e9ef5b..2f315e6 100

[ovs-dev] [PATCH 0/3] Implement OFPT_GET_ASYNC_REQUEST, OFPT_GET_ASYNC_REPLY

2013-09-07 Thread Alexandru Copot
This series adds a handler for OFPT_GET_ASYNC_REQUEST which sends an OFPT_GET_ASYNC_REPLY with the configured settings. It also allows printing reply messages with the existing code used for OFPT_SET_ASYNC. Finally, there is a basic test which checks the default reply output. Alexandru Copot (3)

[ovs-dev] [PATCH] openflow-1.1+: OFPT_TABLE_MOD (part 1)

2013-09-07 Thread Andy Zhou
Added infrastructure to support Openflow OFPT_TABLE_MOD message. This patch does not include the flexible table miss handling code that is necessary to support the semantics specified in OFPT_TABLE_MOD messages. Current Flow miss continue to conform to Opoenflow 1.0. Future commits to add more fl

[ovs-dev] [PATCH 2/2] dpif-netdev: Do not allow adding loopback devices

2013-09-07 Thread Alexandru Copot
Signed-off-by: Alexandru Copot --- lib/dpif-netdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 46eb743..0d489ba 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -407,6 +407,7 @@ do_add_port(struct dp_netdev *dp

[ovs-dev] [PATCH 0/2] netdev: Don't allow adding loopback devices

2013-09-07 Thread Alexandru Copot
This series fixes a behaviour found in a comment in dpif-netdev.c by rejecting loopback devices when trying to add them as a port. Alexandru Copot (2): netdev: update IFF_LOOPBACK flag for linux and bsd devices dpif-netdev: Do not allow adding loopback devices lib/dpif-netdev.c | 9

[ovs-dev] [PATCH 1/2] netdev: update IFF_LOOPBACK flag for linux and bsd devices

2013-09-07 Thread Alexandru Copot
Signed-off-by: Alexandru Copot --- lib/netdev-bsd.c | 6 ++ lib/netdev-linux.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c index fdea10b..3eb29ea 100644 --- a/lib/netdev-bsd.c +++ b/lib/netdev-bsd.c @@ -1428,6 +1428,9 @@ nd_to_iff_flags(en