]> www.infradead.org Git - users/jedix/linux-maple.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)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:25 +0000 (14:15 -0700)
commit87747234e4c92a5d0e5f77e5ac8702d9c92ed46d
treeef5669cb4baa827445fc6442c34e704c5dbe421f
parent073844f416dab355b2b81425b5137c4f2c68c7dd
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>
Orabug: 26785018
(cherry picked from commit d8b2c700a3a07c7108d9031dc88a6298c101e05d)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c