[ovs-dev] openflow-1.0 : ovs-ofctl can't set correct max_len
Justin Pettit
jpettit at nicira.com
Tue Feb 23 18:18:39 PST 2010
Thank you very much! I've made the change and pushed it out.
(Earlier today, I pushed out a fix for the OpenFlow frag enum problem you mentioned, too.)
--Justin
On Feb 23, 2010, at 5:54 PM, Tetsuo NAKAGAWA wrote:
> Hi.
>
> I'm using Open vSwitch with openflow-1.0 branch.
>
> ovs-ofctl(8) can't send correct OFPT_FLOW_MOD.
>
> Even if I execute "add-flow" with "contrller:100",
> UINT16_MAX (0xffff) is set as max_len.
>
> # ovs-ofctl add-flow tcp:127.0.0.1 "dl_dst=88:88:88:88:88:88 actions=controller:100"
> # ovs-ofctl dump-flows tcp:127.0.0.1
> stats_reply (xid=0x7ded5d88): flags=none type=1(flow)
> cookie=0s, duration_sec=4s, duration_nsec=742000000s, table_id=1, priority=32768, n_packets=0, n_bytes=0, idle_timeout=60,dl_dst=88:88:88:88:88:88,actions=CONTROLLER:65535
>
> I monitored the OFPT_FLOW_MOD by tcpdump. The output of
> tcpdump is as follows.
>
> 20:23:50.672129 IP 127.0.0.1.33012 > 127.0.0.1.6633: P 9:89(80) ack 9 win 257 <nop,nop,timestamp 4306037 4306037>flow_mod (xid=0x7f6900f1):dl_dst=88:88:88:88:88:88, ADD: cookie:0 idle:60 hard:0 pri:32768 buf:0xffffffff flags:0 actions=CONTROLLER:65535
>
> 0x0000: 4500 0084 cbdb 4000 4006 7096 7f00 0001
> 0x0010: 7f00 0001 80f4 19e9 59af 7fab 5972 ac6c
> 0x0020: 8018 0101 fe78 0000 0101 080a 0041 b475
> 0x0030: 0041 b475 010e 0050 f100 697f 003f fff7
> 0x0040: 0000 0000 0000 0000 8888 8888 8888 0000
> 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
> 0x0060: 0000 0000 0000 0000 0000 0000 0000 003c
> 0x0070: 0000 8000 ffff ffff 0000 0000 0000 0008
> 0x0080: fffd ffff
> ====
> max_len
>
> The patch to this defect is as follows.
>
> --- ./openvswitch-openflow-1.0-20100216.org/utilities/ovs-ofctl.c 2010-02-13 06:18:45.000000000 +0900
> +++ ./openvswitch-openflow-1.0-20100216/utilities/ovs-ofctl.c 2010-02-23 20:35:15.000000000 +0900
> @@ -676,7 +676,7 @@
>
> /* Unless a numeric argument is specified, we send the whole
> * packet to the controller. */
> - if (arg && (strspn(act, "0123456789") == strlen(act))) {
> + if (arg && (strspn(arg, "0123456789") == strlen(arg))) {
> oao->max_len = htons(str_to_u32(arg));
> } else {
> oao->max_len = htons(UINT16_MAX);
>
> There is also same defect in master, next branch.
>
> best regards,
>
> --- Tetsuo NAKAGAWA
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list