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 1D249A0C51; Fri, 16 Jul 2021 10:43:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C30A340151; Fri, 16 Jul 2021 10:43:26 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2082.outbound.protection.outlook.com [40.107.94.82]) by mails.dpdk.org (Postfix) with ESMTP id 9222F4014D for ; Fri, 16 Jul 2021 10:43:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P0SOeQbz8/HZKwItAgYuIYCKwN0u5956BPvhPBK89qjPdMsxS8VMLlK8wqE0Ozw2Eurns/jeOSyQwP3VERJK5dORE93zRua/2o0WKdR1P3nXAd+TYT5IW0N1GBWUqeY8JQkmn9GLcFB7gc5W1Xm1n6LL6jp1W+UPflQtUb9vwt3Det1cGDWu8Lvcn4qJlidzPwAAjY20xz3BsMV7SloBbFjfbeEUrbN+8HaufHRrBknVGxNYPBBnq0Mc1gXb+v0D+E+HQYcHM1IfoLudgrja+v6eWYW2JqtwtWpneTgC6ODvsjzA+ECb9NvdmgT9w4W7rrav2qsgaDKR2SlEp7WSOg== 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-SenderADCheck; bh=2xgJo2Zi0L7qxv8sEIty06g92ZFXlTI8D0wxyyOWmEQ=; b=ZJvISR3fmnvQPVZiMD8R6jVBGvrIe9aUaIMYjkjK2+pcjgY1GOvX2Bm2cdkdne55sETaZm0Rtz4W9RyxYalqgFW6K3stJ/b6/kkDJt8g1Y8RDCEvi5NiRnyUashUeGF7qKafCDB66HRVfKUvBh3L5ZXofTtKrfQwTCRWjtzLZpC3mYH1nXqqxe7DzRzY8dx8ngSmRKlLNslGf3JiBtCEkPRFrKbayZY5mdKct3317PF+iBmU+xgrbBA9AEBwSu4LWohae+6okCyVV8GxeAO43HGR9v/L1MYD7mUOy1SsGDVrsz1BwL6UzlhYEApd4PHmM/PVR5x1Z9LcuRIAjuicwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none 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=2xgJo2Zi0L7qxv8sEIty06g92ZFXlTI8D0wxyyOWmEQ=; b=ew2mQrKJ4PE7+lL+eUnw2PPxUFr8OEbhS9cxxR2TsNsAtYowTBAkRyKq0hdyPf9lu2AasnEhugW2frEjePXvJkvSZugI5u37EJQM/k0aQADWNk+NCCE2JlZczbpNgOB6FzxGshgXweL3ou4Ip3qU+wTav3ZyBFYK6HSd/Xy3OKV2XHdonyOf3S9HXlNMh/YgKZrTbfMi7ewWNPfu3ccazKmLoLwGlCvpTg8oMmATwt3UEPUOf/ASW11TARHDhRVqce0Jh2o8nnL0p/Zk3vnwrJgcKc4j24135ZG/XcO9KULNINBbFMhJgsmC/uRNw4068YSiOlfSxLLTCJyXFpf4FQ== Received: from BN6PR11CA0062.namprd11.prod.outlook.com (2603:10b6:404:f7::24) by DM6PR12MB3322.namprd12.prod.outlook.com (2603:10b6:5:119::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Fri, 16 Jul 2021 08:43:24 +0000 Received: from BN8NAM11FT056.eop-nam11.prod.protection.outlook.com (2603:10b6:404:f7:cafe::31) by BN6PR11CA0062.outlook.office365.com (2603:10b6:404:f7::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Fri, 16 Jul 2021 08:43:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT056.mail.protection.outlook.com (10.13.177.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4331.21 via Frontend Transport; Fri, 16 Jul 2021 08:43:23 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 16 Jul 2021 08:43:22 +0000 From: Alexander Kozyrev To: CC: , , Date: Fri, 16 Jul 2021 11:43:05 +0300 Message-ID: <20210716084305.646731-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20210616183444.2815030-1-akozyrev@nvidia.com> References: <20210616183444.2815030-1-akozyrev@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0123f117-36ef-47ff-adb6-08d94835c5fa X-MS-TrafficTypeDiagnostic: DM6PR12MB3322: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2887; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JWnXjjV4VtYh4EpL7KFOlr+sWtYvoS2diu4DzlSZ5cajo/AhFF8L2E6ICm44FiRUWePEr/XuCxJniWsdC09gC2TcSBsVkrq5JRW+JtgwtmABML9yGxizYNb4WJl3P09ql35ZVymXDyhyk2j67Nrl+f7UEh7e242ubh7IEMW6vV+CGpg3fLPgGVlAwJgdet4BNK6htKic4X2NF29aZD2zqJdq0GbsD54mNyDTS23vMbJCAQszokv2VoLr626k2M3L9nFmtEstOGjcT+LCXUeFBzJLhmpm/CPCB8cVhF2FNHjm43T5BgYDYjvyzAH6g2dmH0qk+i7LOXL8UEOrXQ+I/GU2tHEY8eExWQPHvCH9T9gS3zqQXrhV8HO0fXLSKbxrjsHffkxbiDItJ1gcjIMIstZrJT9doXQRY5SFAEuEWNKlaq4dmiRQf7xIQH55b2MjH45gHyaqubSNXr2s9vAJKImLYQNAedtwBD5MPfXQVhU7fGKtQfpiHd5LVo9LXJ3uiXSDu947+XSpZPCmT6UTy/WmgN6XpUIg+CedS1h4r7gcJ91dxt1mzSOFiieFM6PQ6srasPrzcdkwWNEpJgljMUJ1D7ml+Z4kQ1BZGKelYXFQx779rkk89eiSuh4p3UPGHIBzqGiJMz/6jsjCbmRDhmNARUhtIVclJzCV+5Z6kuAgprDqs7Z1t4Z8x628YYDzRYKPXCGJQDvLh02clr7CzbfJ+ud3aXa6gRfQmrksj3r0pKRBq2sk65DlNyhMyVrrj1hhJbTwmt3NjuGaWO7m43NpN9FgrmY3ylhwrAo019v+KsUGig4RUVHlNgvn8wkX X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(396003)(39860400002)(346002)(136003)(36840700001)(46966006)(316002)(36906005)(26005)(7696005)(36860700001)(6666004)(186003)(54906003)(7636003)(70206006)(6286002)(83380400001)(70586007)(6916009)(82740400003)(107886003)(2906002)(36756003)(47076005)(5660300002)(356005)(34020700004)(82310400003)(16526019)(86362001)(1076003)(4326008)(426003)(966005)(2616005)(478600001)(336012)(8936002)(8676002)(55016002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2021 08:43:23.9213 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0123f117-36ef-47ff-adb6-08d94835c5fa X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT056.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3322 Subject: [dpdk-dev] [PATCH v2] net/mlx5: do not allow copy to mark via modify field 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 Sender: "dev" The Mark action is a two-stage process in the Mellanox driver. First, a hardware register is filled with the required value, then this value is registered in the software resource table. The MODIFY_FIELD action can instruct a Mellanox NIC to copy some value from an arbitrary packet header field into the hardware register, associated with the Mark item. But there is no way NIC can modify the software resource table as well. Due to these driver limitations the copying of arbitrary value to the MARK can not be supported and should be rejected in the MODIFY_FIELD action. Signed-off-by: Alexander Kozyrev --- v2: Rewrote the commit message to clarify the limitation better. v1: https://patchwork.dpdk.org/project/dpdk/patch/20210616183444.2815030-1-akozyrev@nvidia.com/ drivers/net/mlx5/mlx5_flow_dv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index d250486950..519c610e50 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -4940,10 +4940,11 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev, "source and destination fields" " cannot be the same"); if (action_modify_field->dst.field == RTE_FLOW_FIELD_VALUE || - action_modify_field->dst.field == RTE_FLOW_FIELD_POINTER) + action_modify_field->dst.field == RTE_FLOW_FIELD_POINTER || + action_modify_field->dst.field == RTE_FLOW_FIELD_MARK) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, - "immediate value or a pointer to it" + "mark, immediate value or a pointer to it" " cannot be used as a destination"); if (action_modify_field->dst.field == RTE_FLOW_FIELD_START || action_modify_field->src.field == RTE_FLOW_FIELD_START) -- 2.18.2