From patchwork Mon Sep 18 02:11:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simei Su X-Patchwork-Id: 131532 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7AB1F425C9; Mon, 18 Sep 2023 04:13:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B14640DF5; Mon, 18 Sep 2023 04:12:48 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 6F1E640A81 for ; Mon, 18 Sep 2023 04:12:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695003160; x=1726539160; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YnoEODMP7vfTqs3M1d5U2sorNJaC5zIVYCSxZNy5VcY=; b=RVWEieBc1ZGgojcgBkkJUbvoUcBc7WQ6QQWJ8aD3TMXWE2wrWLQn+Ifr aIe4Qqk++k4UKHTxnm3g4Mr6AFwwcWD47YeXidHPgxoW8U6s/cmHJ402d NGbNLpY0UKlN+GpZaTKwqwb4LG5gs/i4rl6qigPhcp/343g1uqH+aKAwQ RtZeeLHs9jkOHjq+2OFAHZbqZ4WjrD5ae6V8iYVc1WEZGQ4SaZgiBkIuy D+T7XVs+vAmhAcQbdyZVS7/iY4fsQ9kFJLswnCGuEOuSPRQwIjrdBqW5b jiOyL4Qf3ddyQiXc29ALF4UG8lKzHyrMLvyaqdrDuleb5+pyUFC1ADn85 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="359801771" X-IronPort-AV: E=Sophos;i="6.02,155,1688454000"; d="scan'208";a="359801771" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2023 19:11:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="815847071" X-IronPort-AV: E=Sophos;i="6.02,155,1688454000"; d="scan'208";a="815847071" Received: from dpdk-simei-icelake.sh.intel.com ([10.67.110.167]) by fmsmga004.fm.intel.com with ESMTP; 17 Sep 2023 19:11:43 -0700 From: Simei Su To: jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, wenjun1.wu@intel.com, mingxia.liu@intel.com, wenjing.qiao@intel.com, Simei Su , Pavan Kumar Linga Subject: [PATCH v4 16/18] common/idpf/base: don't declare union with 'flex' Date: Mon, 18 Sep 2023 10:11:28 +0800 Message-Id: <20230918021130.192982-17-simei.su@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230918021130.192982-1-simei.su@intel.com> References: <20230915021730.2681882-1-simei.su@intel.com> <20230918021130.192982-1-simei.su@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Signed-off-by: Simei Su Acked-by: Beilei Xing --- drivers/common/idpf/base/idpf_lan_txrx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; };