summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e.h
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2017-02-06 14:38:38 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-03-20 16:45:19 -0700
commitfe0b0cd97b4f210ecd1693edba6eec10820e11f2 (patch)
treea25efe0d6a3ae2dfc73ae8f0114219b5b2b46a9c /drivers/net/ethernet/intel/i40e/i40e.h
parent48ce88022dbc28eebddc524d1fc2b913f03f64ba (diff)
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 b3f5c7bc88ba ("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: b3f5c7bc88ba ("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>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e.h')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index a5cf5d11d0e7..fba8495a8787 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -244,7 +244,8 @@ struct i40e_tc_configuration {
};
struct i40e_udp_port_config {
- __be16 index;
+ /* AdminQ command interface expects port number in Host byte order */
+ u16 index;
u8 type;
};