The basic idea is to introduce a generic infractructure to support various switch chips in kernel.
The current patchset RFC is a heavy rework of the previous ones. The goal is to be low-intrusive and to use as much as possible from the existing infrastructure. Also the idea is to benefit from currently existing Open vSwitch userspace infrastructure prividing a HW offload for it. Note that this is just one usecase. Other sw*dev_ndos can be easily added to support many more usecases, Please see Documentation/networking/switchdev.txt for more details about the model. Next step would be to introduce a flag via which OVS userspace could tell if the flow should be inserted in HW or just in the SW datapath. That would extend current 2 level cashing (kernel, userspace) to 3 level (hw, kernel, userspace). Next step would be to improve internal kernel notifiers and introduce a listener which would call sw*dev_ndos to setup the switch according to what the user wants. This would allow a usecase then a user configures bridges, bonds, etc and the switch chip underneath gets configured by that. Any suggestions, feedbacks welcome. Jiri Pirko (10): openvswitch: split flow structures into ovs specific and generic ones net: rename netdev_phys_port_id to more generic name net: introduce generic switch devices support rtnl: expose physical switch id for particular device switchdev: introduce basic support for flows net: introduce dummy switch dsa: implement ndo_swdev_get_id net: add netdev_for_each_all_lower_dev_rcu helper openvswitch: introduce vport_op get_netdev openvswitch: add support for datapath hardware offload Documentation/networking/switchdev.txt | 53 +++++++ drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/dummyswitch.c | 126 +++++++++++++++++ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 +- include/linux/netdevice.h | 74 ++++++++-- include/linux/sw_flow.h | 122 ++++++++++++++++ include/linux/switchdev.h | 55 ++++++++ include/uapi/linux/if_link.h | 10 ++ net/Kconfig | 6 + net/core/Makefile | 1 + net/core/dev.c | 28 ++-- net/core/net-sysfs.c | 2 +- net/core/rtnetlink.c | 30 +++- net/core/switchdev.c | 90 ++++++++++++ net/dsa/slave.c | 16 +++ net/openvswitch/Makefile | 3 +- net/openvswitch/datapath.c | 63 +++++---- net/openvswitch/datapath.h | 4 +- net/openvswitch/dp_notify.c | 7 +- net/openvswitch/flow.c | 14 +- net/openvswitch/flow.h | 123 ++++------------ net/openvswitch/flow_netlink.c | 24 ++-- net/openvswitch/flow_netlink.h | 4 +- net/openvswitch/flow_table.c | 100 ++++++------- net/openvswitch/flow_table.h | 18 +-- net/openvswitch/hw_offload.c | 170 +++++++++++++++++++++++ net/openvswitch/hw_offload.h | 31 +++++ net/openvswitch/vport-gre.c | 4 +- net/openvswitch/vport-internal_dev.c | 53 ++++--- net/openvswitch/vport-netdev.c | 16 +++ net/openvswitch/vport-netdev.h | 12 -- net/openvswitch/vport-vxlan.c | 2 +- net/openvswitch/vport.c | 2 +- net/openvswitch/vport.h | 4 +- 37 files changed, 1004 insertions(+), 277 deletions(-) create mode 100644 Documentation/networking/switchdev.txt create mode 100644 drivers/net/dummyswitch.c create mode 100644 include/linux/sw_flow.h create mode 100644 include/linux/switchdev.h create mode 100644 net/core/switchdev.c create mode 100644 net/openvswitch/hw_offload.c create mode 100644 net/openvswitch/hw_offload.h -- 1.9.0 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
