]> git.baikalelectronics.ru Git - kernel.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)
commit3677dc3c9db0e992e6cf31834596ce4b4b07ea0c
tree748b58394a8543edc2b6644e2951292f7a46d73d
parent322347c3e11984f31624b3aad020e50a1a1e3687
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