]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: send correct port number to AdminQ when enabling UDP tunnels
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 6 Feb 2017 22:38:38 +0000 (14:38 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 20 Mar 2017 23:45:19 +0000 (16:45 -0700)
commit0add1eb6a5d7c9a889309d35be8acca29f3a2405
treea25efe0d6a3ae2dfc73ae8f0114219b5b2b46a9c
parent67a03e1278faf74e3abf09c1c9f07ee538e9663f
i40e: send correct port number to AdminQ when enabling UDP tunnels

The firmware expects the port numbers for offloaded UDP tunnels in
Little Endian format. We accidentally sent the value in Big Endian
format which obviously will cause the wrong port number to be put into
the UDP tunnels list. This results in VxLAN and Geneve tunnel Rx
offloads being essentially disabled, unless the port number happens to
be identical after byte swapping. Note that i40e_aq_add_udp_tunnel()
will byteswap the parameter from host order into Little Endian so we
don't need worry about passing strictly a __le16 value to the command.

This patch essentially reverts d405ffa1ce0c ("i40e: Fix for extra byte
swap in tunnel setup", 2016-08-24), but in a way that makes the result
much more clear to the reader.

Fixes: d405ffa1ce0c ("i40e: Fix for extra byte swap in tunnel setup", 2016-08-24)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Williams, Mitch A <mitch.a.williams@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.h
drivers/net/ethernet/intel/i40e/i40e_main.c