rocker: flow table numbering per OF-DPA spec section 3.8

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: flatten of-dpa flow tlvs

Remove one level of TLV nesting for OF-DPA flow cmds.  Previously, TLVs where
nested as:

	CMD_TYPE
	CMD_INFO
		OF_DPA_TABLE_ID
		OF_DPA_COOKIE
		OF_DPA_HARDTIME
		...
		OF_DPA_INFO
			OF_DPA_INFO_xxx
			OF_DPA_INFO_yyy
			...

Now nesting is:

	CMD_TYPE
	CMD_INFO
		OF_DPA_TABLE_ID
		OF_DPA_COOKIE
		OF_DPA_HARDTIME
		...
		OF_DPA_xxx
		OF_DPA_yyy

The original nesting was an artifact of having per-table nest, but since table
ID is present, the context of OF_DPA_xxx attribute is known so there is no need
for per-table nest or even the OF_DPA_INFO nest.  OF_DPA_INFO nest isn't adding
any value to the command structure.

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: allow for short keys on flow table match

In the flow table match algo, there was an optimization to skip over flows when
the key length of the flow doesn't match the packet match key length.  The
check should skip only when flow key length is greater than packet match
length, to allow for flow keys with partial info.  For example, consider these
two bridge table flows:

	1) vlan 100 -> DLF VLAN bridging
	2) vlan 100, dst_mac 00:01:02:03:04:05 -> Unicast VLAN Briding

The key length for 1) is shorter than 2), but both should be matched against
the packet since the packet includes both vlan and dst_mac.

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: add default miss rule for igress port table

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: in_lport can be masked in ingress port table

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: proper check for physical port for vlan and term_mac tables

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: vlan table untagged flow has vlan_id mask of 0x0

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: bug fix vlan range check on vlan table add

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: remove hard-coded flows

These hard-coded flows where there to push ingress pkts up to driver.  Remove the hard-coded flows and force the controller (via driver) to install flow rules so ingress pkts can be passed up.

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: move OF_DPA cmds to OF_DPA_FLOW cmds in preparation for new OF_DPA_GROUP cmds

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: group_id is 32-bit

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: make group id an argument when creating group

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: add OF-DPA group cmds

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: change OF_DPA_STAT to OF_DPA_FLOW_STAT in preperation for adding OF-DPA group stats

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
rocker: add OF-DPA group ID get/set macros

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