On Fri, Jul 20, 2012 at 10:36:55AM -0700, Ben Pfaff wrote: > On Fri, Jul 20, 2012 at 10:29:25AM +0900, Simon Horman wrote: > > Add OFPUTIL_P_OF12 and NXFF_OPENFLOW12 for Open Flow 1.2 > > > > OFPUTIL_P_OF12_TID and in turn OFPUTIL_P_OF12_ANY is not provided as > > OFPUTIL_P_OF12 supports the use of table ids in modify flow messages. > > > > Signed-off-by: Simon Horman <ho...@verge.net.au> > > With this applied:
Thanks. I propose the merging the following into this patch. It should work around the problem at hand and can be reversed once all the required pieces are in place. diff --git a/lib/ofp-util.c b/lib/ofp-util.c index d844931..8f2217f 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -1299,7 +1299,7 @@ ofputil_protocol_to_string(enum ofputil_protocol protocol) return "OpenFlow10+table_id"; case OFPUTIL_P_OF12: - return "OpenFlow12"; + return NULL; } /* Check abbreviations. */ diff --git a/lib/ofp-util.h b/lib/ofp-util.h index 809f3d6..36ae581 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -151,10 +151,10 @@ enum ofputil_protocol { OFPUTIL_P_OF12 = 1 << 4, /* OpenFlow 1.2 flow format. */ /* All protocols. */ -#define OFPUTIL_P_ANY (OFPUTIL_P_OF10_ANY | OFPUTIL_P_NXM_ANY | OFPUTIL_P_OF12) +#define OFPUTIL_P_ANY (OFPUTIL_P_OF10_ANY | OFPUTIL_P_NXM_ANY) /* Protocols in which a specific table may be specified in flow_mods. */ -#define OFPUTIL_P_TID (OFPUTIL_P_OF10_TID | OFPUTIL_P_NXM_TID | OFPUTIL_P_OF12) +#define OFPUTIL_P_TID (OFPUTIL_P_OF10_TID | OFPUTIL_P_NXM_TID) }; /* Protocols to use for flow dumps, from most to least preferred. */ diff --git a/tests/learn.at b/tests/learn.at index b527276..da82f51 100644 --- a/tests/learn.at +++ b/tests/learn.at @@ -24,7 +24,7 @@ table=0 actions=learn(table=1,hard_timeout=10, NXM_OF_VLAN_TCI[0..11],output:NXM table=1 priority=0 actions=flood ]]) AT_CHECK([ovs-ofctl parse-flows flows.txt], [0], -[[usable protocols: OpenFlow10+table_id,NXM+table_id,OpenFlow12 +[[usable protocols: OpenFlow10+table_id,NXM+table_id chosen protocol: OpenFlow10+table_id OFPT_FLOW_MOD (xid=0x1): ADD table:255 actions=learn(table=1,in_port=99,NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG1[16..31]) OFPT_FLOW_MOD (xid=0x2): ADD table:255 actions=learn(table=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[]) > > hda:~# gdb --args ovs-ofctl -F openflow12 add-flow br0 actions=drop > GNU gdb (GDB) 7.2-debian > Copyright (C) 2010 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "i486-linux-gnu". > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/>... > Reading symbols from /mnt/_build/utilities/ovs-ofctl...done. > (gdb) r > Starting program: /mnt/_build/utilities/ovs-ofctl -F openflow12 add-flow br0 > actions=drop > [Thread debugging using libthread_db enabled] > > Program received signal SIGABRT, Aborted. > 0xffffe416 in __kernel_vsyscall () > (gdb) bt > #0 0xffffe416 in __kernel_vsyscall () > #1 0xb7cef911 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 > #2 0xb7cf2d42 in abort () at abort.c:92 > #3 0x0807399d in ofputil_encode_flow_mod (fm=0xbffff9e4, > protocol=OFPUTIL_P_OF12) at ../lib/ofp-util.c:1847 > #4 0x0804dfc7 in ofctl_flow_mod__ (remote=<value optimized out>, > fms=<value optimized out>, n_fms=<value optimized out>) > at ../utilities/ovs-ofctl.c:1044 > #5 0x0804e13d in ofctl_flow_mod (argc=<value optimized out>, > argv=0xbffffc90, > command=0) at ../utilities/ovs-ofctl.c:1069 > #6 0x08052afd in run_command (argc=3, argv=0xbffffc90, commands=0x80a5ae0) > at ../lib/command-line.c:78 > #7 0x0804f53a in main (argc=6, argv=0xbffffc84) > at ../utilities/ovs-ofctl.c:113 > (gdb) > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev