All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catherine Sullivan <catherine.sullivan@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S9 03/15] i40e: fixup padding issue in get_cee_dcb_cfg_v1_resp
Date: Thu, 23 Jul 2015 16:54:32 -0400	[thread overview]
Message-ID: <1437684884-222825-4-git-send-email-catherine.sullivan@intel.com> (raw)
In-Reply-To: <1437684884-222825-1-git-send-email-catherine.sullivan@intel.com>

From: Shannon Nelson <shannon.nelson@intel.com>

The struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with
word boundary layout issues, which most compilers deal with by silently
adding padding, making the actual struct larger than designed.
This patch adds an extra byte in fields reserved3 and reserved4 to directly
acknowledge that padding.

Because the struct doesn't actually change in size or layout, this doesn't
constitute a change in the API.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: I53fa4741b73fa255621232a85fba000b0e223015
---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index 95d23bf..b840fab 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -2074,6 +2074,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start);
 #define I40E_AQC_CEE_ISCSI_STATUS_MASK	(0x7 << I40E_AQC_CEE_ISCSI_STATUS_SHIFT)
 #define I40E_AQC_CEE_FIP_STATUS_SHIFT	0x10
 #define I40E_AQC_CEE_FIP_STATUS_MASK	(0x7 << I40E_AQC_CEE_FIP_STATUS_SHIFT)
+
+/* struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with
+ * word boundary layout issues, which the Linux compilers silently deal
+ * with by adding padding, making the actual struct larger than designed.
+ * However, the FW compiler for the NIC is less lenient and complains
+ * about the struct.  Hence, the struct defined here has an extra byte in
+ * fields reserved3 and reserved4 to directly acknowledge that padding,
+ * and the new length is used in the length check macro.
+ */
 struct i40e_aqc_get_cee_dcb_cfg_v1_resp {
 	u8	reserved1;
 	u8	oper_num_tc;
@@ -2081,9 +2090,9 @@ struct i40e_aqc_get_cee_dcb_cfg_v1_resp {
 	u8	reserved2;
 	u8	oper_tc_bw[8];
 	u8	oper_pfc_en;
-	u8	reserved3;
+	u8	reserved3[2];
 	__le16	oper_app_prio;
-	u8	reserved4;
+	u8	reserved4[2];
 	__le16	tlv_status;
 };
 
-- 
1.9.3


  parent reply	other threads:[~2015-07-23 20:54 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 20:54 [Intel-wired-lan] [next PATCH S9 00/15] i40e/i40evf updates Catherine Sullivan
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 01/15] i40e/i40evf: fix up type clash in i40e_aq_rc_to_posix conversion Catherine Sullivan
2015-07-28 20:33   ` Bowers, AndrewX
2015-09-29 21:44     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 02/15] i40e: Fix a port VLAN configuration bug Catherine Sullivan
2015-07-29 20:34   ` Bowers, AndrewX
2015-07-23 20:54 ` Catherine Sullivan [this message]
2015-07-28 20:40   ` [Intel-wired-lan] [next PATCH S9 03/15] i40e: fixup padding issue in get_cee_dcb_cfg_v1_resp Bowers, AndrewX
2015-09-29 21:45     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 04/15] i40e: rename variable to prevent clash of understanding Catherine Sullivan
2015-07-28 20:44   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 05/15] i40e/i40evf: fix tx hang workaround code Catherine Sullivan
2015-07-28 20:49   ` Bowers, AndrewX
2015-09-29 21:47     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 06/15] i40e: count drops in netstat interface Catherine Sullivan
2015-07-28 20:51   ` Bowers, AndrewX
2015-09-29 21:48     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 07/15] i40e: use qos field consistently Catherine Sullivan
2015-07-28 20:55   ` Bowers, AndrewX
2015-09-29 21:49     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 08/15] i40e: limit debugfs io ops Catherine Sullivan
2015-07-28 21:09   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 09/15] i40e: Remove useless message Catherine Sullivan
2015-07-28 21:11   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 10/15] i40e/i40evf: add new device id 1588 Catherine Sullivan
2015-07-28 21:14   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 11/15] i40e: Strip VEB stats if they are disabled in HW Catherine Sullivan
2015-07-28 21:17   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 12/15] i40e: refactor interrupt enable Catherine Sullivan
2015-07-28 21:22   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 13/15] i40e: warn on double free Catherine Sullivan
2015-07-28 21:24   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 14/15] i40evf: tighten up reset polling Catherine Sullivan
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 15/15] i40e/i40evf: Bump i40e to 1.3.12 and i40evf to 1.3.6 Catherine Sullivan
2015-07-28 20:26   ` Bowers, AndrewX
2015-07-28 21:25   ` 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=1437684884-222825-4-git-send-email-catherine.sullivan@intel.com \
    --to=catherine.sullivan@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.