Expand lport to 32-bits to match OF-DPA, moving tunnel ports to 0x0001xxxx

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Split TLV accessors into two types: one for LE and one for no byte-swap

To support specific byte-swap needs, use __lexx variants of TLV accessors for
TLV values that are explicitly LE.  Use _uXX variant for TLV values which don't
require a byte-swap, such as TLV value for network packet fields (passed in in
network-byte order).

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Add FLOW TLV defintions

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
fix some reg_guide FLOW definitions

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
pass in desc buf and desc info to world_do_cmd() since buf/desc may be modified

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
add port egress func to send iov pkt out front-panel port

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
add ipv4/ipv6 is_multicast helpers needed for flow.c changes

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Add functional flow.c support

Get flow.c working per OF-DPA.  Flow cmd processing is in place for FLOW_ADD
and handles flow/group table adds for all flow tables except ACL.  FLOW_MOD is
stubbed out, but not implemented.  FLOW_DEL and FLOW_GET_STATS are implemented,
but untested.

FLow processing pipeline is implemented and working.  Flow processing is per
OF-DPA.  Ingress pkts will progress thru tables, going thru pkt updates (vlan
tag/strip, for example) and ultimately being dropped or forwarded for egress or
pushed to CPU for further processing.  Table match algorithm is brute force
linear walk, currently.  This will be improved later, but for now, to get basic
functionality working, linear walk is sufficient.  Match algorithm only matches
relevant fields for each table, so for most tables this requires only a few u64
bit-wise comparisions per table entry.

A few default flow table entries are hard-coded for testing.  Once kernel
driver is hooked up to add/mod/del flow table entries, we can remove the
hard-coded table entries.  Current hard-coded table rules are:

1) INGRESS_PORT table: ingress pkts on front-panel ports goto VLAN table,
2) VLAN table: untagged pkts on front-panel port 0 get tagged internally as VLAN 100,
3) BRIDGING table: pkts on VLAN 100 goto group 1
4) group 1: egress pk on front-panel port 1, stripping VLAN tag

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>