From: Alexander Duyck <aduyck@mirantis.com> To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Cc: hannes@redhat.com, jesse@kernel.org, eugenia@mellanox.com, jbenc@redhat.com, alexander.duyck@gmail.com, saeedm@mellanox.com, ariel.elior@qlogic.com, tom@herbertland.com, michael.chan@broadcom.com, Dept-GELinuxNICDev@qlogic.com, davem@davemloft.net Subject: [net-next PATCH v3 00/17] Future-proof tunnel offload handlers Date: Thu, 16 Jun 2016 12:20:35 -0700 [thread overview] Message-ID: <20160616191851.20872.67154.stgit@localhost.localdomain> (raw) s patch is meant to address two things. First we are currently using the ndo_add/del_vxlan_port calls with VXLAN-GPE tunnels and we cannot really support that as it is likely to cause more harm than good since VXLAN-GPE can support tunnels without a MAC address on the inner header. As such we need to add a new offload to advertise this, but in doing so it would mean introducing 3 new functions for the driver to request the ports, and then for the tunnel to push the changes to add and delete the ports to the device. However instead of taking that approach I think it would be much better if we just made one common function for fetching the ports, and provided a generic means to push the tunnels to the device. So in order to make this work this patch set does several things. First it merges the existing VXLAN and GENEVE functionality into one set of functions and passes an enum in order to specify the type of tunnel we want to offload. By doing this we only have to extend this enum in the future if we want to add additional types. Second it goes through the drivers replacing all of the tunnel specific offload calls with implementations that support the generic calls so that we can drop the VXLAN and GENEVE specific calls entirely. Finally I go through in the last patch and replace the VXLAN specific offload request that was being used for VXLAN-GPE with one that specifies if we want to offload VXLAN or VXLAN-GPE so that the hardware can decide if it can actually support it or not. I also ended up with some minor clean-up built into the driver patches for this. Most of it is to either fix misuse of build flags, specifying a type to ignore instead of the type that should be used, or in the case of ixgbe I actually moved a rtnl_lock/unlock in order to avoid taking it unless it was actually needed. v2: I did my best to remove the word "offload" from any of the calls or notifiers as this isn't really an offload. It is a workaround for the fact that the drivers don't provide basic features like CHECKSUM_COMPLETE. I also added a disclaimer to the section defining the function prototypes explaining that these are essentially workarounds. I ended up going through and stripping all of the VXLAN and GENEVE build flags from the drivers. There isn't much point in carrying them. In addition I dropped the use of the vxlan.h or geneve.h header files in favor of udp_tunnel.h in the cases where a driver didn't need anything from either of those headers. I updated the tunnel add/del functions so that they pass a udp_tunnel_info structure instead of a list of arguments. This way we should be able to add additional information in the future with little impact on the other drivers. I updated bnxt so that it doesn't use a hard-coded port number for GENEVE. I have been able to test mlx4e, mlx5e, and i40e and verified functionality on these drivers. Though there are patches for the net tree I submitted due to unrelated bugs I found in the mlx4e and i40e/i40evf drivers. v3: Fixed a typo that caused us to add geneve port when we should have been deleting it. Ended up dropping geneve and vxlan wrappers for udp_tunnel_notify_rx_add/del_port and instead just called them directly. Updated comments for functions to call out RTNL instead of port lock. Updated patch description to remove changes that were moved into a second patch. Rebased on latest net-next to fix merge conflict on bnxt driver. --- Alexander Duyck (17): vxlan/geneve: Include udp_tunnel.h in vxlan/geneve.h and fixup includes net: Combine GENEVE and VXLAN port notifiers into single functions net: Merge VXLAN and GENEVE push notifiers into a single notifier bnx2x: Move all UDP port notifiers to single function bnxt: Update drivers to support unified UDP encapsulation offload functions bnxt: Move GENEVE support from hard-coded port to using port notifier benet: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port fm10k: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port i40e: Move all UDP port notifiers to single function ixgbe: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port mlx4_en: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port mlx5_en: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port nfp: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port qede: Move all UDP port notifiers to single function qlcnic: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port net: Remove deprecated tunnel specific UDP offload functions vxlan: Add new UDP encapsulation offload type for VXLAN-GPE drivers/net/ethernet/broadcom/Kconfig | 21 -- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 94 ++++------ drivers/net/ethernet/broadcom/bnxt/bnxt.c | 104 ++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 drivers/net/ethernet/emulex/benet/Kconfig | 8 - drivers/net/ethernet/emulex/benet/be_main.c | 32 ++- drivers/net/ethernet/intel/Kconfig | 43 ----- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 36 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 186 +++++--------------- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 57 +++--- drivers/net/ethernet/mellanox/mlx4/Kconfig | 7 - drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 41 ++-- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 22 ++ drivers/net/ethernet/qlogic/Kconfig | 30 --- drivers/net/ethernet/qlogic/qede/qede_main.c | 115 +++++------- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 2 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 4 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 30 ++- drivers/net/geneve.c | 61 +------ drivers/net/vxlan.c | 85 ++------- include/linux/netdevice.h | 58 ++---- include/net/geneve.h | 9 - include/net/udp_tunnel.h | 42 +++++ include/net/vxlan.h | 13 - net/ipv4/udp_tunnel.c | 61 +++++++ 27 files changed, 477 insertions(+), 709 deletions(-)
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Duyck <aduyck@mirantis.com> To: intel-wired-lan@osuosl.org Subject: [Intel-wired-lan] [net-next PATCH v3 00/17] Future-proof tunnel offload handlers Date: Thu, 16 Jun 2016 12:20:35 -0700 [thread overview] Message-ID: <20160616191851.20872.67154.stgit@localhost.localdomain> (raw) s patch is meant to address two things. First we are currently using the ndo_add/del_vxlan_port calls with VXLAN-GPE tunnels and we cannot really support that as it is likely to cause more harm than good since VXLAN-GPE can support tunnels without a MAC address on the inner header. As such we need to add a new offload to advertise this, but in doing so it would mean introducing 3 new functions for the driver to request the ports, and then for the tunnel to push the changes to add and delete the ports to the device. However instead of taking that approach I think it would be much better if we just made one common function for fetching the ports, and provided a generic means to push the tunnels to the device. So in order to make this work this patch set does several things. First it merges the existing VXLAN and GENEVE functionality into one set of functions and passes an enum in order to specify the type of tunnel we want to offload. By doing this we only have to extend this enum in the future if we want to add additional types. Second it goes through the drivers replacing all of the tunnel specific offload calls with implementations that support the generic calls so that we can drop the VXLAN and GENEVE specific calls entirely. Finally I go through in the last patch and replace the VXLAN specific offload request that was being used for VXLAN-GPE with one that specifies if we want to offload VXLAN or VXLAN-GPE so that the hardware can decide if it can actually support it or not. I also ended up with some minor clean-up built into the driver patches for this. Most of it is to either fix misuse of build flags, specifying a type to ignore instead of the type that should be used, or in the case of ixgbe I actually moved a rtnl_lock/unlock in order to avoid taking it unless it was actually needed. v2: I did my best to remove the word "offload" from any of the calls or notifiers as this isn't really an offload. It is a workaround for the fact that the drivers don't provide basic features like CHECKSUM_COMPLETE. I also added a disclaimer to the section defining the function prototypes explaining that these are essentially workarounds. I ended up going through and stripping all of the VXLAN and GENEVE build flags from the drivers. There isn't much point in carrying them. In addition I dropped the use of the vxlan.h or geneve.h header files in favor of udp_tunnel.h in the cases where a driver didn't need anything from either of those headers. I updated the tunnel add/del functions so that they pass a udp_tunnel_info structure instead of a list of arguments. This way we should be able to add additional information in the future with little impact on the other drivers. I updated bnxt so that it doesn't use a hard-coded port number for GENEVE. I have been able to test mlx4e, mlx5e, and i40e and verified functionality on these drivers. Though there are patches for the net tree I submitted due to unrelated bugs I found in the mlx4e and i40e/i40evf drivers. v3: Fixed a typo that caused us to add geneve port when we should have been deleting it. Ended up dropping geneve and vxlan wrappers for udp_tunnel_notify_rx_add/del_port and instead just called them directly. Updated comments for functions to call out RTNL instead of port lock. Updated patch description to remove changes that were moved into a second patch. Rebased on latest net-next to fix merge conflict on bnxt driver. --- Alexander Duyck (17): vxlan/geneve: Include udp_tunnel.h in vxlan/geneve.h and fixup includes net: Combine GENEVE and VXLAN port notifiers into single functions net: Merge VXLAN and GENEVE push notifiers into a single notifier bnx2x: Move all UDP port notifiers to single function bnxt: Update drivers to support unified UDP encapsulation offload functions bnxt: Move GENEVE support from hard-coded port to using port notifier benet: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port fm10k: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port i40e: Move all UDP port notifiers to single function ixgbe: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port mlx4_en: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port mlx5_en: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port nfp: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port qede: Move all UDP port notifiers to single function qlcnic: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port net: Remove deprecated tunnel specific UDP offload functions vxlan: Add new UDP encapsulation offload type for VXLAN-GPE drivers/net/ethernet/broadcom/Kconfig | 21 -- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 94 ++++------ drivers/net/ethernet/broadcom/bnxt/bnxt.c | 104 ++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 drivers/net/ethernet/emulex/benet/Kconfig | 8 - drivers/net/ethernet/emulex/benet/be_main.c | 32 ++- drivers/net/ethernet/intel/Kconfig | 43 ----- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 36 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 186 +++++--------------- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 57 +++--- drivers/net/ethernet/mellanox/mlx4/Kconfig | 7 - drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 41 ++-- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 22 ++ drivers/net/ethernet/qlogic/Kconfig | 30 --- drivers/net/ethernet/qlogic/qede/qede_main.c | 115 +++++------- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 2 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 4 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 30 ++- drivers/net/geneve.c | 61 +------ drivers/net/vxlan.c | 85 ++------- include/linux/netdevice.h | 58 ++---- include/net/geneve.h | 9 - include/net/udp_tunnel.h | 42 +++++ include/net/vxlan.h | 13 - net/ipv4/udp_tunnel.c | 61 +++++++ 27 files changed, 477 insertions(+), 709 deletions(-) --
next reply other threads:[~2016-06-16 19:20 UTC|newest] Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-06-16 19:20 Alexander Duyck [this message] 2016-06-16 19:20 ` [Intel-wired-lan] [net-next PATCH v3 00/17] Future-proof tunnel offload handlers Alexander Duyck 2016-06-16 19:20 ` [net-next PATCH v3 01/17] vxlan/geneve: Include udp_tunnel.h in vxlan/geneve.h and fixup includes Alexander Duyck 2016-06-16 19:20 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 23:06 ` Hannes Frederic Sowa 2016-06-16 23:06 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-16 19:20 ` [net-next PATCH v3 02/17] net: Combine GENEVE and VXLAN port notifiers into single functions Alexander Duyck 2016-06-16 19:20 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 22:45 ` Hannes Frederic Sowa 2016-06-16 22:45 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-16 19:21 ` [net-next PATCH v3 03/17] net: Merge VXLAN and GENEVE push notifiers into a single notifier Alexander Duyck 2016-06-16 19:21 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 22:47 ` Hannes Frederic Sowa 2016-06-16 22:47 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-16 19:21 ` [net-next PATCH v3 04/17] bnx2x: Move all UDP port notifiers to single function Alexander Duyck 2016-06-16 19:21 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:21 ` [net-next PATCH v3 05/17] bnxt: Update drivers to support unified UDP encapsulation offload functions Alexander Duyck 2016-06-16 19:21 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:21 ` [net-next PATCH v3 06/17] bnxt: Move GENEVE support from hard-coded port to using port notifier Alexander Duyck 2016-06-16 19:21 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 23:12 ` Michael Chan 2016-06-16 23:12 ` [Intel-wired-lan] " Michael Chan 2016-06-16 19:21 ` [net-next PATCH v3 07/17] benet: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port Alexander Duyck 2016-06-16 19:21 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:21 ` [net-next PATCH v3 08/17] fm10k: " Alexander Duyck 2016-06-16 19:21 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:22 ` [net-next PATCH v3 09/17] i40e: Move all UDP port notifiers to single function Alexander Duyck 2016-06-16 19:22 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:22 ` [net-next PATCH v3 10/17] ixgbe: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port Alexander Duyck 2016-06-16 19:22 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:22 ` [net-next PATCH v3 11/17] mlx4_en: " Alexander Duyck 2016-06-16 19:22 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:22 ` [net-next PATCH v3 12/17] mlx5_en: " Alexander Duyck 2016-06-16 19:22 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:22 ` [net-next PATCH v3 13/17] nfp: " Alexander Duyck 2016-06-16 19:22 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:22 ` [net-next PATCH v3 14/17] qede: Move all UDP port notifiers to single function Alexander Duyck 2016-06-16 19:22 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:23 ` [net-next PATCH v3 15/17] qlcnic: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port Alexander Duyck 2016-06-16 19:23 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 19:23 ` [net-next PATCH v3 16/17] net: Remove deprecated tunnel specific UDP offload functions Alexander Duyck 2016-06-16 19:23 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 22:59 ` Hannes Frederic Sowa 2016-06-16 22:59 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-16 19:23 ` [net-next PATCH v3 17/17] vxlan: Add new UDP encapsulation offload type for VXLAN-GPE Alexander Duyck 2016-06-16 19:23 ` [Intel-wired-lan] " Alexander Duyck 2016-06-16 23:01 ` Hannes Frederic Sowa 2016-06-16 23:01 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-18 3:26 ` [net-next PATCH v3 00/17] Future-proof tunnel offload handlers David Miller 2016-06-18 3:26 ` [Intel-wired-lan] " David Miller 2016-06-20 17:05 ` Tom Herbert 2016-06-20 17:05 ` [Intel-wired-lan] " Tom Herbert 2016-06-20 18:11 ` Hannes Frederic Sowa 2016-06-20 18:11 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-20 19:27 ` Tom Herbert 2016-06-20 19:27 ` [Intel-wired-lan] " Tom Herbert 2016-06-20 21:36 ` Hannes Frederic Sowa 2016-06-20 21:36 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-20 21:45 ` Tom Herbert 2016-06-20 21:45 ` [Intel-wired-lan] " Tom Herbert 2016-06-21 8:34 ` David Miller 2016-06-21 8:34 ` [Intel-wired-lan] " David Miller 2016-06-21 8:22 ` David Miller 2016-06-21 8:22 ` [Intel-wired-lan] " David Miller 2016-06-21 10:41 ` Edward Cree 2016-06-21 10:41 ` [Intel-wired-lan] " Edward Cree 2016-06-21 15:23 ` Hannes Frederic Sowa 2016-06-21 15:23 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-21 17:05 ` Alexander Duyck 2016-06-21 17:05 ` [Intel-wired-lan] " Alexander Duyck 2016-06-21 17:27 ` Edward Cree 2016-06-21 17:27 ` [Intel-wired-lan] " Edward Cree 2016-06-21 17:40 ` Hannes Frederic Sowa 2016-06-21 17:40 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-21 18:17 ` Alexander Duyck 2016-06-21 18:17 ` [Intel-wired-lan] " Alexander Duyck 2016-06-21 18:42 ` Tom Herbert 2016-06-21 18:42 ` [Intel-wired-lan] " Tom Herbert 2016-06-21 21:34 ` Hannes Frederic Sowa 2016-06-21 21:34 ` [Intel-wired-lan] " Hannes Frederic Sowa 2016-06-21 18:23 ` Edward Cree 2016-06-21 18:23 ` [Intel-wired-lan] " Edward Cree
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160616191851.20872.67154.stgit@localhost.localdomain \ --to=aduyck@mirantis.com \ --cc=Dept-GELinuxNICDev@qlogic.com \ --cc=alexander.duyck@gmail.com \ --cc=ariel.elior@qlogic.com \ --cc=davem@davemloft.net \ --cc=eugenia@mellanox.com \ --cc=hannes@redhat.com \ --cc=intel-wired-lan@lists.osuosl.org \ --cc=jbenc@redhat.com \ --cc=jesse@kernel.org \ --cc=michael.chan@broadcom.com \ --cc=netdev@vger.kernel.org \ --cc=saeedm@mellanox.com \ --cc=tom@herbertland.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.