ofctl_v1_2/3: fix SET_FIELD action and some match fields

this patch fixes the following bugs:

  - "SET_FIELD" action caused an exception at mod_flow_entry command.
  - following match fields caused an exception at get_flow_stats command:
    * mpls_label, arp_spa, arp_tpa
  - following fields in "SET_FIELD" were displayed as classes:
    * eth_dst, eth_src, vlan_vid, mpls_label
  - "arp_spa" and "arp_tpa" were not displayed as IPv4 address

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Correct OF1.4 OFP_ACTION_HEADER_PACK_STR

As per parsers for earlier OF versions,
include 4 trailing bytes in the header.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Correct OF1.4 OFPMatch JSON serialisation and formatting

Prior to this patch the code serialises an OFPMatch as:

   "OFPMatch": {
      "oxm_fields": {
         "arp_op": 1,
         ...
      }
   }

But the parser fails, complaining that "oxm_fields" is an unknown field name.

Resolve this by using the same JSON format as OF1.3:

   "OFPMatch": {
      "length": 329,
      "oxm_fields": [
         {
            "OXMTlv": {
               "field": "in_port",
               "mask": null,
               "value": 84281096
            }
         },
         ...
      }
   }

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 multipart experimenter request and reply message support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 group stats request and reply message support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 desc stats request and reply message support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 OFPMatchField support

This covers fields that are also present in OF1.3.
In particular it does not cover PBB_UCA.
I plan to address this in a subsequent patch.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 SetField action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 CopyTtlOut action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 CopyTtlIn action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 PopPbb action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 PushPbb action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 PopMpls action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 PushMpls action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 PopVlan action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 PushVlan action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 DecMplsTtl action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 DecNwTtl action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 SetNwTtl action support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add OF1.4 echo request and reply message support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>