From: Jingjing Wu Date: Sat, 10 Dec 2016 11:24:46 +0000 (+0800) Subject: net/i40e/base: comment that UDP port must be in host order X-Git-Tag: spdx-start~5016 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=37392dc7dcab327d66a6a31b5e4d56aaf59e6761;p=dpdk.git net/i40e/base: comment that UDP port must be in host order The firmware expects the Port number to be in Little Endian format, and the i40e_aq_add_udp_tunnel command clearly expects the udp_port variable to be in Host order, as it uses CPU_TO_LE16(). It was recently discovered in the Linux driver that we were passing a Big Endian port number, which was therefor not enabling the UDP tunnel correctly. Signed-off-by: Jingjing Wu --- diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 17b53aee68..852cbf74c1 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -4419,11 +4419,15 @@ enum i40e_status_code i40e_aq_start_stop_dcbx(struct i40e_hw *hw, /** * i40e_aq_add_udp_tunnel * @hw: pointer to the hw struct - * @udp_port: the UDP port to add + * @udp_port: the UDP port to add in Host byte order * @header_len: length of the tunneling header length in DWords * @protocol_index: protocol index type * @filter_index: pointer to filter index * @cmd_details: pointer to command details structure or NULL + * + * Note: Firmware expects the udp_port value to be in Little Endian format, + * and this function will call CPU_TO_LE16 to convert from Host byte order to + * Little Endian order. **/ enum i40e_status_code i40e_aq_add_udp_tunnel(struct i40e_hw *hw, u16 udp_port, u8 protocol_index,