OXM: Fix VLAN test

If a mask of 0xf0f is used then an input value of 0x123 will
be output as 0x103. That is, the second least significant nibble
will be masked to 0.

This patch should be rolled into "OXM: Allow VLAN VID match to be masked".

Signed-off-by: Simon Horman <horms@verge.net.au>
OXM: Set CFI bit of mask

Like the value, the mask of a VLAN_VID should include the
CFI bit internally.

This patch should be rolled into "OXM: Allow VLAN VID match to be masked".

Signed-off-by: Simon Horman <horms@verge.net.au>
nx-match: printf wrong format

> lib/nx-match.c: In function 'nx_pull_match__':
> lib/nx-match.c:108:21: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t' [-Wformat]

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
set-field.c: quieten warning

This is a temporal work around which should be eliminated later.

> lib/set-field.c: In function 'set_field_check':
> lib/set-field.c:108:72: warning: unused parameter 'flow' [-Wunused-parameter]

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
ofp-actions/ofpacts_insts_to_openflow11: typo

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Fix ovs-ofctl pop_vlan

With this patch, we can set up pop_vlan via ovs-ofctl:

fujita@node1:~$ sudo ovs-ofctl add-flow dp0 'in_port=1,dl_vlan=4,nw_src=192.68.1.0/24,actions=apply_actions(pop_vlan,set_field:aa:aa:aa:aa:aa:aa->OXM_OF_ETH_SRC,set_field:bb:bb:bb:bb:bb:bb->OXM_OF_ETH_DST,push_mpls:0x8847,output:2)'

fujita@node1:~$ sudo ovs-ofctl dump-flows dp0
OFPST11_FLOW reply (OF1.2) (xid=0x2): cookie=0x0, duration=13.171s, table=0, n_packets=0, n_bytes=0, in_port=1,dl_vlan=4 actions=apply_actions(pop_vlan,set_field:aa:aa:aa:aa:aa:aa->eth_src,set_field:bb:bb:bb:bb:bb:bb->eth_dst,push_mpls:0x8847,output:2)

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofp-util:use ofpbuf_at_assert() in ofputil_put_match()

Use ofpbuf_at_assert() instead of directly accessing ofpbuf->data

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
ofp-util: ofputil_encode_packet_in() use ofp12_packet_in for OF12

struct ofp12_packet_in is different from struct ofp12_packet_in.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
nx-match: teach nx_put_match() oxm more

When oxm is designated, nx_put_match() shouldn't put nx only match.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
ofp-util: ofputil_decode_packet_in() use ofp12_packet_in for OF12

Use struct ofp12_packet_in for decoding OpenFlow 1.2 PacketIn messages.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofp-util: Use valid error in ofputil_decode_packet_out()

For OpenFlow 1.2 it seems to make more sense to
return OFPERR_OFPBRC_BAD_PORT if the in port is invalid
as OFPERR_NXBRC_BAD_IN_PORT is itself invalid for
OpenFlow 1.2.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofp-actions: Allow decoding of PacketIn actions

PacketIn actions are not encapsualted in an instruction
so an alternate decoder is required.

Signed-off-by: Simon Horman <horms@verge.net.au>
Fix initialisatino of struct ofproto_table_stats ts

The oXts elements of struct ofproto_table_stats ts are members of an
anymous uninon member of struct ofproto_table_stats ts.

Using 4.5.2-8ubuntu4 it appears to be necessary to wrap the initialisation
of these members in an additional set of braces.

Signed-off-by: Simon Horman <horms@verge.net.au>
classifier: Show IPv6 flow label mask if there are any non-zero bits

Signed-off-by: Simon Horman <horms@verge.net.au>

---

Hi Hiyama-san,

I believe that this resolves the latest ipv6_label problem you
raised in issue #6.

Hi Fujita-san,

please consider this for the mpls-of12 branch.
Fix VLAN_VID masked match

The masked value should be stored not the raw value.

Signed-off-by: Simon Horman <horms@verge.net.au>
nx-match: Remove suprious debug message

This is an artifact of my development work and should never have
been in included

Signed-off-by: Simon Horman <horms@verge.net.au>