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 133C9A0C49; Wed, 16 Jun 2021 20:35:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CF8240683; Wed, 16 Jun 2021 20:35:47 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2041.outbound.protection.outlook.com [40.107.223.41]) by mails.dpdk.org (Postfix) with ESMTP id BC6B54067A for ; Wed, 16 Jun 2021 20:35:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RAX4Xr5JqdR9Gy5ImfIq3b8kBTOZeyhw1WjgvpEUrb4nG2vAS8nOD1/SQU1NPcxwsxWwP0a0O+w8Vz7jaziNFFywoiRGx7J4ucrr4CQtruCo/CvRJigQc3LI1774mQkL4syRBtQV6GRegIagTG/8a9MbAjxQPlPjcydeFo8WWyl7XCHgm761VdWP4LxBmD9M8G/HkbtUDmaEypOdz5qoIAJzjLOBapGvI0G5lpDkYEh2W8dUE+cEuP+ydXV22ZVonBVR7tKn6htVjLu/0imiHOXEvvQngqK/3yyOe1WZTjatflHSnFRjeBJ6Dl6LB5i53N6r9IJfxGdEE6VHd5xsPQ== 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=XP5mqIvOP0/dcOMgQfFkRky3HUlF7Wwhwvf1GmXq+Kg=; b=gZfR5lr6eRjHB3eRBINM0VCQKYHyDk3RO1y0wGL5F1IRIl14sQqdQ1Zsx7AxlBk5XGi1dkDf6oZHL8Rw+bn73GxhkZcCquXDZF2pz6tAmuLgj0DtX2b3xDKvgalJQJBN9YTcm6T7qbjtYTgwh2fBXsjzTLGqwq2LR1M6jaR7Y45vuGoJc41hM2VHxKS3xuJMOgfP2wQPWQ9yUCiNoTFPi41YTJNyuxv98DzY9poLZthRdiVIONss6jvzy84AlX5vOBhd98/OhNo0tC89T6GU2yddyclddVaZQnldMfWN3YpxZuycJolZ5VRgPPPoDzD3M9nburYj0A+2kM8AK4/oKg== 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=none 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=XP5mqIvOP0/dcOMgQfFkRky3HUlF7Wwhwvf1GmXq+Kg=; b=oj5U8b+0X57B6+w2WYMa/xw4G0hSBwgCWGF7CpqGcs8OomEIxeI+mkLztkWt/6Zie7jbYK9Lu3T6QfVyt/nFehq40ivs/X7tvhCdRP9VvH3KQVagw3hdDbrKdocwnjgeTc+KK9pOyOOpnnqYH11ziu7MIaLCXbZrGApcjG35fiNWKo3LbC6Njz891AY5xg+Lc4AmrDYAF0m4DZ+KIGWX2ce3pZLeHwLczsnKo5F+Fx3b6l2D04zYUx1GlW30LaW6kSbp5JqdH+7raRT9hbJpEJyS2sRfCEBqQFfwm6HlplQzU1EyIPJo0AyZb6RpYFr5nLeNU6CcI6vSKlYKS1IhOw== Received: from MW2PR16CA0057.namprd16.prod.outlook.com (2603:10b6:907:1::34) by DM5PR12MB1180.namprd12.prod.outlook.com (2603:10b6:3:74::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Wed, 16 Jun 2021 18:35:44 +0000 Received: from CO1NAM11FT046.eop-nam11.prod.protection.outlook.com (2603:10b6:907:1:cafe::1) by MW2PR16CA0057.outlook.office365.com (2603:10b6:907:1::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19 via Frontend Transport; Wed, 16 Jun 2021 18:35:44 +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 CO1NAM11FT046.mail.protection.outlook.com (10.13.174.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4242.16 via Frontend Transport; Wed, 16 Jun 2021 18:35:44 +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; Wed, 16 Jun 2021 18:35:42 +0000 From: Alexander Kozyrev To: CC: , , Date: Wed, 16 Jun 2021 21:34:44 +0300 Message-ID: <20210616183444.2815030-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8fe75db8-2b45-4d56-9d45-08d930f58d26 X-MS-TrafficTypeDiagnostic: DM5PR12MB1180: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YzwbFq2UfoA5rtoe9GSadKCxVcjC6SQeXPF+QmIpR6MpctT9sd1W9uibixpwMPX7gQtjB2/5JECQFV2a5A3XrNslRrnAKNPzMO2xjPxz2G3eEzUdowOdORlC3uF9V4QsPJ9DRgj+aaWEoQsRFRLNB6MtHa0tL4L5ZXVLJl9LZBeysBxZuaasOdM5X4ulr9yNHVk7rG5iFnlZUcLpSv8YQcMk2NXiilDV3ZD7pkCgeUsFtnySY6lmk2xGXrFfZM56bfnwmaHM74+S2un5J9bvTfs7SJKJ0yk3ARRyFJvVtogcgfc3vAtaXRDe4l39l3/9LQ6USFSpCpiLfQbfGTUcHI1gLo3DlCvstKE2iSEdbao1fX7THS3xqm0aW5vp4WmYPjV+VRv3HcLYfpE+hxfhgU8oxSTBmbzuFpGOG1kI3jBEiC2c9xDTcDJ2IV2bqbZkPDD3li+8dQwpAlUggtDhNfsYKrg+JTjhyWl2LWrOl9HGlukLE0g2eTazU3Uac2QC/I27Zdq8iu6NgLXlUPpab6xEaqpqStCcmwQ4L+8oWp66jrzHT2V68usqaLOzBzN3B8JG+PP0Lwx8N9UNLDbdy6o0FgIK+CP89WKg4bnDAPFVMMik1GHa11V/Ty65Htm+GTImmqpEbzs4A0VBNpLjcQ== 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)(136003)(346002)(396003)(376002)(39860400002)(46966006)(36840700001)(8676002)(36860700001)(36756003)(5660300002)(2616005)(426003)(1076003)(83380400001)(6916009)(8936002)(336012)(82310400003)(2906002)(4326008)(47076005)(7636003)(356005)(55016002)(316002)(107886003)(70206006)(16526019)(478600001)(186003)(6286002)(70586007)(26005)(54906003)(86362001)(82740400003)(7696005)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2021 18:35:44.1755 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8fe75db8-2b45-4d56-9d45-08d930f58d26 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: CO1NAM11FT046.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1180 Subject: [dpdk-dev] [PATCH] 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" Mark requires a tag resource to be registered as part of the value assigning. It is not possible during a copy operation from a packet field. Forbid this in MODIFY_FIELD. Signed-off-by: Alexander Kozyrev --- 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 dafd37ab93..26b901e32e 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -4797,10 +4797,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