[v4,16/18] common/idpf/base: don't declare union with 'flex'

Message ID 20230918021130.192982-17-simei.su@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series update idpf base code |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Simei Su Sept. 18, 2023, 2:11 a.m. UTC
  In idpf_flex_tx_desc structure, instead of naming the union with 'flex',
use no name union as the union name is not really necessary there. This
reduces the level of indirection in the hotpath.

Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/common/idpf/base/idpf_lan_txrx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/common/idpf/base/idpf_lan_txrx.h b/drivers/common/idpf/base/idpf_lan_txrx.h
index f213c49e47..1e19aeafac 100644
--- a/drivers/common/idpf/base/idpf_lan_txrx.h
+++ b/drivers/common/idpf/base/idpf_lan_txrx.h
@@ -226,11 +226,11 @@  enum idpf_tx_flex_desc_cmd_bits {
 struct idpf_flex_tx_desc {
 	__le64 buf_addr;	/* Packet buffer address */
 	struct {
-		__le16 cmd_dtype;
 #define IDPF_FLEX_TXD_QW1_DTYPE_S	0
 #define IDPF_FLEX_TXD_QW1_DTYPE_M	GENMASK(4, 0)
 #define IDPF_FLEX_TXD_QW1_CMD_S		5
 #define IDPF_FLEX_TXD_QW1_CMD_M		GENMASK(15, 5)
+		__le16 cmd_dtype;
 		union {
 			/* DTYPE = IDPF_TX_DESC_DTYPE_FLEX_DATA_(0x03) */
 			u8 raw[4];
@@ -247,7 +247,7 @@  struct idpf_flex_tx_desc {
 				__le16 l2tag1;
 				__le16 l2tag2;
 			} l2tags;
-		} flex;
+		};
 		__le16 buf_size;
 	} qw1;
 };