openvswitch: split flow structures into ovs specific and generic ones

After this, flow related structures can be used in other code.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
net: rename netdev_phys_port_id to more generic name

So this can be reused for identification of other "items" as well.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
net: introduce generic switch devices support

The goal of this is to provide a possibility to suport various switch
chips. Drivers should implement relevant ndos to do so. So far, only one
ndo for getting physical switch id is in place.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
rtnl: expose physical switch id for particular device

The netdevice represents a port in a switch, it will expose
IFLA_PHYS_SWITCH_ID value via rtnl. Two netdevices with the same value
belong to one physical switch.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
net-sysfs: expose physical switch id for particular device

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
switchdev: introduce basic support for flows

This patch adds a couple of ndos which can be used to work with flows.
Note that user can use random port netdevice to access the switch.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
net: introduce dummy switch

Dummy switch implementation using switchdev interface

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
dsa: implement ndo_swdev_get_id

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
net: add netdev_for_each_all_lower_dev_rcu helper

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
openvswitch: introduce vport_op get_netdev

This will allow to query easily if the vport has netdev. Also it allows
to unexpose netdev_vport_priv and struct netdev_vport.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
openvswitch: add support for datapath hardware offload

Benefit from the possibility to work with flows in switch devices and
use the swdev api to offload flow datapath.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
rocker: implement switch ID

Signed-off-by: Jiri Pirko <jiri@resnulli.us>