]> 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)
commitc01d259aa240578ca03fae8f3323950c5c228c07
tree748b58394a8543edc2b6644e2951292f7a46d73d
parent8ce6a99415896ec5fa067bd691c3631b919e7224
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