On Tue, Sep 29, 2015 at 01:40:25PM -0700, Joe Stringer wrote:
> Commit 7eb4b1f1d "ofp-actions: Support OF1.5 (draft) masked Set-Field,
> merge with reg_load." purportedly merged the set_field and reg_load
> fields, including the commandline parsing to use the metafield syntax
> like "load:192.168.0.1->OXM_OF_IPV4_SRC". However, the actual reg_load
> parsing code was not updated.
>
> This patch takes advantage of the newly refactored parse_set_field()
> helpers to make parse_reg_load() conform to the documentation, which
> allows more thorough validation of inputs, and allows reg_load to parse
> fields that are wider than 64 bits, as well as masked fields.
>
> Note that this disallows syntax that was previously allowed, such as:
> load:0x0a000001->OXM_OF_IPV4_SRC
>
> Signed-off-by: Joe Stringer <[email protected]>
> ---
>
> Note that v2.4.0 includes the aforementioned commit; we should consider
> either backporting this fix to branch-2.4, or reverting the
> documentation modification on branch-2.4 to be consistent with the
> previous syntax.
I'm having a little trouble following here. Can you give an example of
a "load" or a "set_field" for which (before this commit) the
documentation and the implementation disagree?
Also I think that this commit leads to an inconsistency between parsing
and formatting. For example, take a look at ofproto-dpif.at line 1537,
which is part of the output of "ovs-ofctl dump-flows":
cookie=0xd, n_packets=3, n_bytes=180, arp,dl_src=80:88:88:88:88:88
actions=load:0x2->NXM_OF_ARP_OP[[]],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[[]],CONTROLLER:65535,load:0x404444444441->NXM_NX_ARP_THA[[]],load:0x1010101->NXM_OF_ARP_SPA[[]],load:0x2020202->NXM_OF_ARP_TPA[[]],CONTROLLER:65535
It contains (after m4 processing) "load:0xc0a88001->NXM_OF_ARP_SPA[]",
which "ovs-ofctl add-flow" now rejects:
$ ovs-ofctl add-flow br0 "actions=load:0xc0a88001->NXM_OF_ARP_SPA[]"
ovs-ofctl: 0xc0a88001: invalid IP address
I'm pretty nervous about rejecting syntax that's been valid for a long
time.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev