From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F300EA00C2; Thu, 3 Feb 2022 09:47:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9F8F426D4; Thu, 3 Feb 2022 09:47:23 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2086.outbound.protection.outlook.com [40.107.243.86]) by mails.dpdk.org (Postfix) with ESMTP id 46BA84014F for ; Thu, 3 Feb 2022 09:47:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VDKJh0zrECtWVxZezjvu8OG4H9kg2TOV3rG9SZIihywJkwzEWCRS7M8DiRqbo/Xppx3LpB7CaLNkK+UW4rP1nn92UjfUZxQX+WQHOpcJ51W9wLJ48wmYIZ9Kyfha5/6ozbKSsriw02vF6OiFaVMYi8YUIYeVBz/sDPTGUhoLB8NqXwGQnbxUhw7YcRD9dca6JdqOl8D/niByCF3z8eFGo9eb5/gF2lFRSkZcsZIZ86z7qsh3/LVmMb88AvJufTXKiaRgRx3FmIafkDe9UpFAgc0hhvhJkbsBDrw2ZJVvYhruPv4pYakQabIifJzlY3IB1jfuo+zEi4whAV5uDffgIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=quPrIIWBd0iLhR6fPVfHpRUxjLImdFNC9FJFrRuHsqk=; b=G5UF+HOh+JWC3z3uNU4CZHgdXOJ5SpASvIExx6+ixVbUuuQpaAiB4k+6dRN+mCT1KTW8tvKqEbCZ3soJFpkYOxZhkapaMVQfp+CIeuKxEY7mTgqPnkogtKbILvl2t9WAYSA5jnTc6qK0fya5GEDAanOIPRqam8u1pMsFAyZQtrkfsSl3NGCXC0L2YEW8n0hiYPGh2wId0tF1keLdm19FBwc/n1+v52RLS/aaRwbm+oTzTgQKLmo7MFndsijZ0FHHAz2efp0478mYzfC2xT5QHrgLmYvyCHlk1vP+BqBYqd08r7jPzrSXIQ2dBf+Weshk/J0jXmiBnDbKwIpVP9z2PA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=quPrIIWBd0iLhR6fPVfHpRUxjLImdFNC9FJFrRuHsqk=; b=OQW1JbAwo43mvtiWPtg8uvKHliMVifrNWTJPNU9xGN0t/gyMeKFII7Zkuz/IWhMq9XC7CWx3986W5sxx9aeJCWoHWNgI6iBfyLeHouDUJkzdH6iyoY7SXTdlJYJZ6fCG4vSxO9Y+47CIBXEjI8VKIKc2UFhH3Khp26DEelHUMdtJzlzcXZOYffmwqNlKxR7IyuyaiBPa/VzYw3uV48g5nTTACRN1I8ip2+s3H60cnuExt0F/xnjfpL1UF8adkwCJvqXdB8GyxiqKUZ3rmcHXentc7/wIrDIDON77QZ1CA0+kCHOLpTorj0tRwNlMS4K7F0AW3hA4rKnD4fkWB/Fb8w== Received: from CO1PR15CA0098.namprd15.prod.outlook.com (2603:10b6:101:21::18) by MW5PR12MB5682.namprd12.prod.outlook.com (2603:10b6:303:19f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.14; Thu, 3 Feb 2022 08:47:20 +0000 Received: from CO1NAM11FT033.eop-nam11.prod.protection.outlook.com (2603:10b6:101:21:cafe::b1) by CO1PR15CA0098.outlook.office365.com (2603:10b6:101:21::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Thu, 3 Feb 2022 08:47:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT033.mail.protection.outlook.com (10.13.174.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4951.12 via Frontend Transport; Thu, 3 Feb 2022 08:47:20 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 3 Feb 2022 08:47:19 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Thu, 3 Feb 2022 00:47:18 -0800 From: Viacheslav Ovsiienko To: CC: , , Subject: [PATCH v2 2/2] net/mlx5: remove unused metadata shift parameter Date: Thu, 3 Feb 2022 10:46:52 +0200 Message-ID: <20220203084652.19167-2-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20220203084652.19167-1-viacheslavo@nvidia.com> References: <49fa76c7-30fe-3128-81ac-38779f557f33@intel.com> <20220203084652.19167-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fcde728a-3a31-4e81-dcee-08d9e6f1ca53 X-MS-TrafficTypeDiagnostic: MW5PR12MB5682:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:628; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0KNZS9klLkBAGss1aa46JLdlD0RNRYEfbCYFcubZc7oQn285zMcW/5OSLon8mRCRrXLoBpysYb0uVvpcr06KXM4+FQ3ngIbZRgGaVg43BeutnunfxnpEQN8xbXngF64yJzodwKI84iYkrRufIgrRHJSLdygN8nBbhy8zvGoCbR2Ab/i74RHfcg42GmGsltInbhZnUsioTNzTXasmvax3HkEuPCN0j2o79rJWImoaW7fZEE9/duCnDDFEmw7p1CBvES2Mrjv96ulM2mK/XllgXqgT9R7ZJo81HeUnHzrCbaPBP/Gy+GSD63zNR2zgajretMOyN6o5ltArhZGu65Xz0IUlXWaZ5QD/TG8SLS513FHvUVPtefFV2/5FLzqNqduh0i2XxqrQKrXuTpoODvF29/xavuegiFTts80bVSlsKpiXCENQ3gZV5k9ZLsJNrieT+htLsklAcp33S7M4Dmpu32ryEJTE1ynxjBa+EwDS/HxIAHeaPOqFMwH+pBMpgmrF4Gw1BaTY6mV93z61ddvJGZEV/Vq2daXdH2PyDbaaIDz/A4NqUZ40cUvB2oiHHNBlwp9u0/9UmRivZx6dOg57hTAHjWfBuLgAQW38YhQlbc+dMmf1jmBfox27RW+2ThT5U5DM4pe/EpSPhY4RMkkvnDs5DNjOgrRSbTyWBTfVoWdXR9fzSgzLf9Dq482vi6UUkDd4XcHT+O2Vf/rftq4uQtQzBTDTY5HGM1X4sWtLE00/Ij/MjpGkKcncB4V3JYku46kUl3VrIeqA/8IcyMh2UBTxXrkIkjmoLNVm5L2PoOk= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(4636009)(40470700004)(46966006)(36840700001)(6916009)(8676002)(70206006)(186003)(70586007)(2616005)(356005)(83380400001)(36756003)(508600001)(8936002)(107886003)(336012)(1076003)(81166007)(7696005)(4326008)(82310400004)(36860700001)(16526019)(316002)(55016003)(6666004)(5660300002)(6286002)(26005)(54906003)(2906002)(86362001)(426003)(40460700003)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2022 08:47:20.4386 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fcde728a-3a31-4e81-dcee-08d9e6f1ca53 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT033.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5682 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 Due to updated modify field actionimmediate value buffer pattern [1] the implicit shift for the metadata is not needed anymore and should be removed. [1] commit 40c8fb1fd3b3 ("net/mlx5: update modify field action") Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 10ef2af06a..ef9c66eddf 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1451,7 +1451,7 @@ static void mlx5_flow_field_id_to_modify_info (const struct rte_flow_action_modify_data *data, struct field_modify_info *info, uint32_t *mask, - uint32_t width, uint32_t *shift, struct rte_eth_dev *dev, + uint32_t width, struct rte_eth_dev *dev, const struct rte_flow_attr *attr, struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; @@ -1806,16 +1806,11 @@ mlx5_flow_field_id_to_modify_info { uint32_t meta_mask = priv->sh->dv_meta_mask; uint32_t meta_count = __builtin_popcount(meta_mask); - uint32_t msk_c0 = - rte_cpu_to_be_32(priv->sh->dv_regc0_mask); - uint32_t shl_c0 = rte_bsf32(msk_c0); int reg = flow_dv_get_metadata_reg(dev, attr, error); if (reg < 0) return; MLX5_ASSERT(reg != REG_NON); MLX5_ASSERT((unsigned int)reg < RTE_DIM(reg_to_field)); - if (reg == REG_C_0) - *shift = shl_c0; info[idx] = (struct field_modify_info){4, 0, reg_to_field[reg]}; if (mask) @@ -1868,14 +1863,13 @@ flow_dv_convert_action_modify_field {0, 0, 0} }; uint32_t mask[MLX5_ACT_MAX_MOD_FIELDS] = {0, 0, 0, 0, 0}; uint32_t type, meta = 0; - uint32_t shift = 0; if (conf->src.field == RTE_FLOW_FIELD_POINTER || conf->src.field == RTE_FLOW_FIELD_VALUE) { type = MLX5_MODIFICATION_TYPE_SET; /** For SET fill the destination field (field) first. */ mlx5_flow_field_id_to_modify_info(&conf->dst, field, mask, - conf->width, &shift, dev, + conf->width, dev, attr, error); item.spec = conf->src.field == RTE_FLOW_FIELD_POINTER ? (void *)(uintptr_t)conf->src.pvalue : @@ -1889,12 +1883,12 @@ flow_dv_convert_action_modify_field type = MLX5_MODIFICATION_TYPE_COPY; /** For COPY fill the destination field (dcopy) without mask. */ mlx5_flow_field_id_to_modify_info(&conf->dst, dcopy, NULL, - conf->width, &shift, dev, + conf->width, dev, attr, error); /** Then construct the source field (field) with mask. */ mlx5_flow_field_id_to_modify_info(&conf->src, field, mask, - conf->width, &shift, - dev, attr, error); + conf->width, dev, + attr, error); } item.mask = &mask; return flow_dv_convert_modify_action(&item, -- 2.18.1