From patchwork Fri Aug 25 10:13:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simei Su X-Patchwork-Id: 130762 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 59A5B430FF; Fri, 25 Aug 2023 12:15:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09A0B43294; Fri, 25 Aug 2023 12:14:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 622ED400D5 for ; Fri, 25 Aug 2023 12:14:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692958466; x=1724494466; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DvkS7icNFXqLT20/6VpQCZ8UmjWxHtFbTLsSrCgkrRs=; b=FGoCTgRKzUh1kcrPBFt+65w9sBZeb8/gKZAFIR8NEmdRbwmbmKEF9u8W w5BcCufnjA7YEaUeFKm4JECYBsEOPhrfIPs2bZaB2r/CexhjqMx/LjrJm 4YzUr1L0wKBLIpGCK5p+cieK52RG8nuxSfu0XyCzLliImxP+WBh7Orpqh lvgIrCidVG60m+E6iqHxBKHZk1BIEfcvXUw2IqmO6k8R7CMnOOymxEvTU /PJ7yv0byz/pzUWbvG1whr2QTMRJmbIqrcA9z3LnJGg7RqfCKunaGbPt0 HRpbLCn2oJHxYo4MAUiOyyse8BE8mmR3xVHyqN222J99uiBS+C+TcoSk7 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="441028146" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="441028146" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2023 03:14:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="772439785" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="772439785" Received: from dpdk-simei-icelake.sh.intel.com ([10.67.110.167]) by orsmga001.jf.intel.com with ESMTP; 25 Aug 2023 03:14:23 -0700 From: Simei Su To: jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, mingxia.liu@intel.com, wenjing.qiao@intel.com, Simei Su , Pavan Kumar Linga Subject: [PATCH v2 15/17] common/idpf/base: dont declare union with 'flex' Date: Fri, 25 Aug 2023 18:13:42 +0800 Message-Id: <20230825101344.1828774-16-simei.su@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230825101344.1828774-1-simei.su@intel.com> References: <20230809013308.1449103-1-wenjing.qiao@intel.com> <20230825101344.1828774-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 --- 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; };