On Thu, Nov 22, 2012 at 05:25:00PM +0200, Jarno Rajahalme wrote:
> static const struct ofperr_domain *
> ofperr_domain_from_version(enum ofp_version version)
> {
> - switch (version) {
> + switch (version) { /* FIXME: Need work for OFP13_VERSION */
> case OFP10_VERSION:
> return &ofperr_of10;
> case OFP11_VERSION:
Would you mind doing the work mentioned above? I do not think that
there is much to do. You will need to adjust
build-aux/extract-ofp-errors, to add OF1.3 to the target_map and add a
call to output_domain near the end. It would also be nice to add any
new error codes to lib/ofp-errors.h, although this can be deferred if
time is short.
> diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> index 1071457..c5452e9 100644
> --- a/lib/ofp-util.c
> +++ b/lib/ofp-util.c
> @@ -602,7 +602,7 @@ size_t ofputil_n_flow_dump_protocols =
> ARRAY_SIZE(ofputil_flow_dump_protocols);
> enum ofputil_protocol
> ofputil_protocol_from_ofp_version(enum ofp_version version)
> {
> - switch (version) {
> + switch (version) { /* FIXME: Need work for OFP13_VERSION */
Doesn't this just need a case to return OFPUTIL_P_OF13_OXM for
OPF13_VERSION?
> @@ -614,7 +614,8 @@ ofputil_protocol_from_ofp_version(enum ofp_version
> version)
> }
>
> /* Returns the OpenFlow protocol version number (e.g. OFP10_VERSION,
> - * OFP11_VERSION or OFP12_VERSION) that corresponds to 'protocol'. */
> + * OFP11_VERSION, OFP12_VERSION, or OFP13_VERSION) that corresponds
> + * to 'protocol'. */
I don't think it's necessary to add the new version to this comment,
since it's just listing some examples. (But on the other hand it
doesn't hurt anything to have it there.)
It looks to me like struct ofp13_packet_in is the same as struct
ofp12_packet_in with an additional "ovs_be64 cookie;" member at the end.
So, it might reduce the amount of duplicated code to define struct
ofp13_packet_in as:
struct ofp13_packet_in {
struct ofp12_packet_in pin12;
ovs_be64 cookie;
};
Anyway, please consider the possibility.
I don't see any new tests for the OpenFlow 1.3 packet_in. Please at
least add a decoding test to tests/ofp-print.at.
A number of these FIXMEs could cause aborts at runtime if OpenFlow 1.3
is in use. We will have to fix these before we can allow users to
enable OpenFlow 1.3.
Thanks,
Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev