oxm_fields: add some routines

these will be used by the later OFPMatch and OFPActionSetField changes.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: make OFPMatch use oxm_fields routines

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: change OFPMatch json representation to match with on-wire

old:
    { "OFPMatch": {
        "eth_dst": "f2:0b:a4:7d:f8:ea"
    }}

new:
    { "OFPMatch": {
        "oxm_fields": [
            { "OXMTlv": {
                "field": "eth_dst",
                "mask": null,
                "value": "f2:0b:a4:7d:f8:ea"
            }}
        ]
    }}

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: update *.json after OFPMatch changes

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: make OFPMatch use oxm_fields routines

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: change OFPMatch json representation to match with on-wire

old:
    { "OFPMatch": {
        "eth_dst": "f2:0b:a4:7d:f8:ea"
    }}

new:
    { "OFPMatch": {
        "oxm_fields": [
            { "OXMTlv": {
                "field": "eth_dst",
                "mask": null,
                "value": "f2:0b:a4:7d:f8:ea"
            }}
        ]
    }}

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: update *.json after OFPMatch changes

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: change OFPActionSetField api, following the recent OFPMatch api

old api:
    OFPActionSetField(MTInPort(OXM_OF_IN_PORT, 1))

new api:
    OFPActionSetField(in_port=1)

and make the json representation similar to OFPMatch as well.
an example:
          "OFPActionSetField": {
             "field": {
                "OXMTlv": {
                   "field": "vlan_vid",
                   "mask": null,
                   "value": 258
                }
             }
          }

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: packet_data_generator: use set_field action

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: test_parser: regen *.packet

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of12: test_parser: update expected *.json results

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: change OFPActionSetField api, following the recent OFPMatch api

old api:
    OFPActionSetField(MTInPort(OXM_OF_IN_PORT, 1))

new api:
    OFPActionSetField(in_port=1)

and make the json representation similar to OFPMatch as well.
an example:
          "OFPActionSetField": {
             "field": {
                "OXMTlv": {
                   "field": "vlan_vid",
                   "mask": null,
                   "value": 258
                }
             }
          }

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: packet_data_generator: use set_field action

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: test_parser: regen *.packet

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of13: test_parser: update expected *.json results

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>