From: Alice Michael <alice.michael@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that udp_port must be in host byte order
Date: Wed, 7 Jun 2017 05:43:04 -0400 [thread overview]
Message-ID: <20170607094313.32060-4-alice.michael@intel.com> (raw)
In-Reply-To: <20170607094313.32060-1-alice.michael@intel.com>
From: Jacob Keller <jacob.e.keller@intel.com>
The firmware expects the port number passed when setting up
the UDP tunnel configuration to be in Little Endian format.
The i40e_aq_add_udp_tunnel command byte swaps the value from
host order to Little Endian.
Since commit fe0b0cd97b4f ("i40e: send correct port number to
AdminQ when enabling UDP tunnels") we've correctly
sent the value in host order.
Let's also add a comment to the function explaining that it must
be in host order, as the port numbers are commonly stored as Big
Endian values.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_common.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index cbad4eb..8e082a9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -3614,11 +3614,15 @@ i40e_status i40e_aq_get_cee_dcb_config(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.
**/
i40e_status i40e_aq_add_udp_tunnel(struct i40e_hw *hw,
u16 udp_port, u8 protocol_index,
--
2.9.3
next prev parent reply other threads:[~2017-06-07 9:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags Alice Michael
2017-06-08 18:22 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 03/13] i40e: use dev_dbg instead of dev_info when warning about missing routine Alice Michael
2017-06-08 18:24 ` Bowers, AndrewX
2017-06-07 9:43 ` Alice Michael [this message]
2017-06-08 18:28 ` [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that udp_port must be in host byte order Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 05/13] i40e: Fix potential out of bound array access Alice Michael
2017-06-08 18:29 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 06/13] i40e: Support firmware CEE DCB UP to TC map re-definition Alice Michael
2017-06-12 16:51 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 07/13] i40e: Add message for unsupported MFP mode Alice Michael
2017-06-08 18:47 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the partition bandwidth control Alice Michael
2017-06-12 18:07 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 09/13] i40e: Add support for OEM firmware version Alice Michael
2017-06-14 14:24 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 10/13] i40e: fix disabling overflow promiscuous mode Alice Michael
2017-06-14 18:38 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 11/13] i40e: clear only cause_ena bit Alice Michael
2017-06-08 18:51 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 12/13] i40e: Handle PE_CRITERR properly with IWARP enabled Alice Michael
2017-06-12 18:14 ` Bowers, AndrewX
2017-06-07 9:43 ` [Intel-wired-lan] [next PATCH S72-V3 13/13] i40e: don't hold RTNL lock for the entire reset Alice Michael
2017-06-12 18:18 ` Bowers, AndrewX
2017-06-08 18:09 ` [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Bowers, AndrewX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170607094313.32060-4-alice.michael@intel.com \
--to=alice.michael@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.