[ovs-dev] [PATCH] ofp-parse: Fix parsing of out_port.
Alex Wang
alexw at nicira.com
Tue Jun 25 21:26:38 UTC 2013
looks good to me,
On Wed, Jun 19, 2013 at 2:02 PM, Ben Pfaff <blp at nicira.com> wrote:
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> lib/ofp-parse.c | 4 ++--
> tests/ovs-ofctl.at | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
> index 1c5c761..fdec1d4 100644
> --- a/lib/ofp-parse.c
> +++ b/lib/ofp-parse.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (c) 2010, 2011, 2012 Nicira, Inc.
> + * Copyright (c) 2010, 2011, 2012, 2013 Nicira, Inc.
> *
> * Licensed under the Apache License, Version 2.0 (the "License");
> * you may not use this file except in compliance with the License.
> @@ -950,7 +950,7 @@ parse_ofp_str(struct ofputil_flow_mod *fm, int
> command, const char *str_,
> if (!strcmp(name, "table")) {
> fm->table_id = str_to_table_id(value);
> } else if (!strcmp(name, "out_port")) {
> - if (!ofputil_port_from_string(name, &fm->out_port)) {
> + if (!ofputil_port_from_string(value, &fm->out_port)) {
> ofp_fatal(str_, verbose, "%s is not a valid OpenFlow
> port",
> name);
> }
> diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at
> index 6198677..6cc4c51 100644
> --- a/tests/ovs-ofctl.at
> +++ b/tests/ovs-ofctl.at
> @@ -3,7 +3,7 @@ AT_BANNER([ovs-ofctl])
> AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.0)])
> AT_DATA([flows.txt], [[
> # comment
> -tcp,tp_src=123,actions=flood
> +tcp,tp_src=123,out_port=5,actions=flood
> in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
> udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
> tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
> @@ -20,7 +20,7 @@ AT_CHECK([ovs-ofctl parse-flows flows.txt
> AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
> [[usable protocols: any
> chosen protocol: OpenFlow10-table_id
> -OFPT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
> +OFPT_FLOW_MOD: ADD tcp,tp_src=123 out_port:5 actions=FLOOD
> OFPT_FLOW_MOD: ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0
> actions=drop
> OFPT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
> OFPT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80
> actions=set_queue:37,output:1
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130625/744dae92/attachment-0003.html>
More information about the dev
mailing list