]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
i40e: display correct UDP tunnel type name
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 20 Jun 2017 22:17:00 +0000 (15:17 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 26 Jul 2017 10:25:20 +0000 (03:25 -0700)
commitd8b2c700a3a07c7108d9031dc88a6298c101e05d
tree748b58394a8543edc2b6644e2951292f7a46d73d
parentb85c94b617c0004d1f2bd6ca32baa9132a6c2fe5
i40e: display correct UDP tunnel type name

The i40e driver attempts to display the UDP tunnel name by doing a check
against the type, where for non-zero types we use "vxlan" and for zero
type we use "geneve". This is not future proof, because if new tunnel
types get added, we'll incorrectly label them. It also depends on the
value of UDP_TUNNEL_TYPE_GENEVE == 0, which is brittle.

Instead, replace this with a function that can return a constant string
depending on the type. For now we'll use "unknown" for types we don't
know about, and we can expand this in the future if new types get added.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c