From patchwork Wed May 18 04:34:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 111258 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 0354DA0503; Wed, 18 May 2022 06:35:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A04394068B; Wed, 18 May 2022 06:35:24 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2055.outbound.protection.outlook.com [40.107.243.55]) by mails.dpdk.org (Postfix) with ESMTP id 99C0340685 for ; Wed, 18 May 2022 06:35:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EUd8h0fFAsKec8fH1Ff0TQ7HabdUbSCmYK+5noS7+2L+I713S6bp14psf1Mo2h1VU/AILTLSnXo8+603Y6hQGYRXniYWWcjQlXt8HkSoZomng08/SDPUbEhwbnuRBRq0DckVPOjE2rxG6eNpo5DysSWVbhxoVJROqdjI3yT0VIUvZa1JG4NvHWhXKvRraBF9OM8f8cY+r2t92Agm3NXlOmWm3iLXf34bKxPv++ZSFQ/pwhdvJQ2tn4Ptl9PIwK5ecAyVToDl70CJ4GCA3qusDvIpqZ9jUlLnrxO3zIh3LYaP8+F1BfR4DeXNERHRbt4aKk5jbDvrrYcoVL4s1k0owA== 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=X//BO1/r4EUVjaN3RqgWdJ4fvbg3gRRDEDkZ3CwbjEQ=; b=hyz8Gy4gJ5y1y/QHK2yqf/kwd5bHrNlzeieHVKie4yPsjeHda2SYzdaDAYt11FHRR4XPGv9Id7XNXkhlcWgod87nl1Q5txUwu5nWx4b3vr7pbNtXn2kjmDhnz6OMfKJa1y/gugO9JIcar3dr64iuftM6oc6n8xJjNa1fPsiLrsTt+2efWELNB/9JzksGlFZwARTVDuilTD+criV3TtplM7pKbQVKYpl/Y96jHZbe3cp3SS+3aXImiAeD1BtOfHYcZxSEC4NgK3nZjI4ILiGxBnzwp8Y+V0KL6YbpfBDRB9nFQPQeq2cXjDHJceJPxZQdwThOJ/r9qIcfI5N9/MAKlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) 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=X//BO1/r4EUVjaN3RqgWdJ4fvbg3gRRDEDkZ3CwbjEQ=; b=dvGnoalRNj9U6RZZYYkj4lIb9FlbVLoefhwCyalZYLDPODUrpfufKlF8pc75iru3PULpIVTxYKeCSmSUoOEAtrWDfAUVi7UYbWqVaFdrvdikGnxD6xQMR4KQKLbSvbJFMkVvVh6Z+zWwTM2a7eMQqYjLpqwQe/7FWWIB5asIeWzjcG47N7uFfPrA+tpUOiW6VWH/vIQsdn2hCMe++GjDXEAg0fFmNfgLOr/OmvSTHW78HSFkLjTD+bty6W5bP2gij5y7jYtlOrPp9d26k0Yx0ni39ZP3CdVAp0ZinJMS4owsgEoTX/P3xLWPY726oKIPrIzSw8h9gP6udktgj6NlGA== Received: from BN9PR03CA0201.namprd03.prod.outlook.com (2603:10b6:408:f9::26) by DS0PR12MB6440.namprd12.prod.outlook.com (2603:10b6:8:c8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Wed, 18 May 2022 04:35:21 +0000 Received: from BN8NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f9:cafe::3a) by BN9PR03CA0201.outlook.office365.com (2603:10b6:408:f9::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14 via Frontend Transport; Wed, 18 May 2022 04:35:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT041.mail.protection.outlook.com (10.13.177.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5273.14 via Frontend Transport; Wed, 18 May 2022 04:35:20 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 18 May 2022 04:35:19 +0000 Received: from pegasus01.mtr.labs.mlnx (10.126.230.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.22; Tue, 17 May 2022 21:35:15 -0700 From: Alexander Kozyrev To: CC: , , , , , , , , , , , Subject: [PATCH 0/4] ethdev: separate metering and marking from policing Date: Wed, 18 May 2022 07:34:55 +0300 Message-ID: <20220518043459.1281590-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20220502200439.4100965-1-akozyrev@nvidia.com> References: <20220502200439.4100965-1-akozyrev@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9ea5be3e-76d8-47b4-9b36-08da3887d11b X-MS-TrafficTypeDiagnostic: DS0PR12MB6440:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2+47P8qKJ+DMcROI5Obf7oJ782bDueXrIKXNqHV+OhL42zV57634Sw5uDnasHarGkxas/SQND4fU+nkgBYZR7L6lzjQJOrPbFHP4eF0dcSmS4W/OUNZlAigQ1uvBCBBxkmGAIuVYUtfSWkXGCjTEEj1AHrzpDM9sjMhas4ADSTT/dsoTvkYbr1OR2Zi1GcCrTBywDw68EFk6meR0MTDvQtv3EDq8tsF0agzAW7rgRIniak2uYcihvSwafiR3FlzUEoB9U6ZMpMpjwUg9bgspPTo/92QfmKUt5BGQQwZIu5meOwhCb6CslLPsC7HYWduDp/sPWTDcp210Vh1klvF0+rP6+O3o8bpd0WyA2Fo6+sozGOtJSjxNXMnl+0f/FjZL5eC9r8zCt7/PcoPhhLh4DcpOyxIWrnXHe0ZQNVZ5DGa3iMPweA+0yyY232ZEYOdfKkTljpPFzfyqSaCNITZfQ8dvP3yMHLRl5zYHkCyizi71LTzz4AnAZzauJBaCLPkJD3BC4V9dS9stQ4Tey2jIrwN+YWY2TCXmp4S+Vn2fzu6/AFMBUR0tuXbWZYl8Q1JufdQTrfHpLQrfjaOkEiGA4CO5H0Kl2axlsF4I0BF5Qw9aKSPBCmnbMq4nyigDq8wduMyjfmN+l0tLQ3cgTx1CxcmcTIv5935ayqmxZ9Zcwxtnt3LUzNoEc4FUtAPIsb7n3tFwkt4w0hRTnPugHJ+9tPxoonIYZCt7BnRX1Dq+mx0Qr20/t4vu1d3z4DYLj1k4Nxd5Se1gCtGcPSO4SCwLyMYW1wPCdc72Yl0+9iApFcw= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(356005)(966005)(7416002)(508600001)(8936002)(81166007)(5660300002)(26005)(2906002)(36860700001)(36756003)(82310400005)(54906003)(6916009)(1076003)(70586007)(186003)(16526019)(2616005)(6666004)(316002)(70206006)(426003)(86362001)(40460700003)(336012)(47076005)(8676002)(4326008)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2022 04:35:20.4771 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ea5be3e-76d8-47b4-9b36-08da3887d11b 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.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6440 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 Extend Metering and Marking support in the Flow API: 1. Add METER_COLOR item to match Color Marker set by a Meter. 2. Add the ability to set Color Marker via modify_field Flow API. 3. Add Meter API to calculate profile configuration values. 4. Add METER_MARK action to perform Meter color marking only. Provide greater flexibility in how Metering can be used. RFC: https://patchwork.dpdk.org/project/dpdk/cover/20220502200439.4100965-1-akozyrev@nvidia.com/ Signed-off-by: Alexander Kozyrev Alexander Kozyrev (4): ethdev: add meter color flow matching item ethdev: allow meter color marker modification ethdev: add meter profile config calculation ethdev: add meter color mark flow action doc/guides/prog_guide/rte_flow.rst | 33 ++++++++++ .../traffic_metering_and_policing.rst | 2 + doc/guides/rel_notes/release_22_07.rst | 7 +++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 61 +++++++++++++++++++ lib/ethdev/rte_mtr.c | 12 ++++ lib/ethdev/rte_mtr.h | 24 ++++++++ lib/ethdev/rte_mtr_driver.h | 9 +++ lib/ethdev/version.map | 3 + 9 files changed, 152 insertions(+)