get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/112169/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 112169,
    "url": "http://patches.dpdk.org/api/patches/112169/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220601034408.2579943-1-akozyrev@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20220601034408.2579943-1-akozyrev@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220601034408.2579943-1-akozyrev@nvidia.com",
    "date": "2022-06-01T03:44:01",
    "name": "[v3,0/7] ethdev: separate metering and marking from policing",
    "commit_ref": null,
    "pull_url": null,
    "state": null,
    "archived": false,
    "hash": null,
    "submitter": {
        "id": 1873,
        "url": "http://patches.dpdk.org/api/people/1873/?format=api",
        "name": "Alexander Kozyrev",
        "email": "akozyrev@nvidia.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220601034408.2579943-1-akozyrev@nvidia.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/112169/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/112169/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 39DF3A0552;\n\tWed,  1 Jun 2022 05:44:32 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D288F40A84;\n\tWed,  1 Jun 2022 05:44:31 +0200 (CEST)",
            "from NAM10-BN7-obe.outbound.protection.outlook.com\n (mail-bn7nam10on2080.outbound.protection.outlook.com [40.107.92.80])\n by mails.dpdk.org (Postfix) with ESMTP id 5561F40150\n for <dev@dpdk.org>; Wed,  1 Jun 2022 05:44:30 +0200 (CEST)",
            "from DM5PR19CA0021.namprd19.prod.outlook.com (2603:10b6:3:151::31)\n by BN8PR12MB2883.namprd12.prod.outlook.com (2603:10b6:408:98::22) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Wed, 1 Jun\n 2022 03:44:28 +0000",
            "from DM6NAM11FT036.eop-nam11.prod.protection.outlook.com\n (2603:10b6:3:151:cafe::3c) by DM5PR19CA0021.outlook.office365.com\n (2603:10b6:3:151::31) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13 via Frontend\n Transport; Wed, 1 Jun 2022 03:44:28 +0000",
            "from mail.nvidia.com (12.22.5.236) by\n DM6NAM11FT036.mail.protection.outlook.com (10.13.172.64) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.5314.12 via Frontend Transport; Wed, 1 Jun 2022 03:44:27 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com\n (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32;\n Wed, 1 Jun 2022 03:44:27 +0000",
            "from pegasus01.mtr.labs.mlnx (10.126.231.35) by\n rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.986.22; Tue, 31 May 2022 20:44:23 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=LybUzQCb6dMe9muJQsKQ6l9gQPZCM8CetPJWwp7nWPRUopLOqtVQm7LUk2xPPzGAspHTIaDozTouJaGPxDm7XRb11oF4atnisQ6CeSRxRw8RRo3CfXFgl9q+H10cupvnaKc1hcxxDqTGNGFpo2FzfsDR0Na5P7PdtchfV8UB1jaR1Ve2vLq8538+c6MJbvlvBwLKlj1NeiYo+dmxdOfjtWpBX7FAH3lSQ/zEiwgkCTBnpXDMy/opc+9gPJLn9dQ1spUeaeOpKjFyr4+JpWd3cvZpwVVZLAToJNpUJq8y+MGepIU0uaDYhA1262/yXMxLoDIY5Ctbf/O2D/WfSAYhJQ==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n 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;\n bh=066KMp7W2DFWc5+HcV9RDmOGcPMC/HcCjL/Lv9VyK5Y=;\n b=RmEWNhfPS06F6SzESFUnWYXPIe63EG6y40g5WJCMA0ZL4qvfWMe/EW/pJ5YMe2eXlbRVEtzfuldppPfHlN1+IjPceHWDnKp5v/0GB5FEOmBMQIPT+LQNoB9AHkk09CzZu+n+EqAHpO398ce4nE+hC0UcljcApW7vR+xOwA9RdCZGLbm2u5nSe4v7xYrfiulWuzTpQ5QT/V2AHwHk0/elz3JW3NgdQQFK1pxGKm1T7yU1QYhRjaF+vSYA3FliLGdVOWBC7qHgQAzllTowGyPINTfmZdb0gZZXU2frPGbW314LSeyDC+1Hs9bTXv/NIw78y79dCavV++vtPqcj7e5mZA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 12.22.5.236) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass\n (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none\n (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=066KMp7W2DFWc5+HcV9RDmOGcPMC/HcCjL/Lv9VyK5Y=;\n b=kZGkWKKGxUOyC/ufsmo5mqy6tcR5E82yRqdUff1mvnVLrgR0QE202nG5JWIcG/E50wQIQ3gl1ObBmbK3NWF8fDOJdYSY++XY/ZgX7yzb7IjoAC5YB6pJ9YAKEq313gN5fytNZeUxhaDzzcC7mJ4ALuJE5RFvmvhlMpf5eRwki162b/R6xh0Krgsur2kTyoQuQYG9NcTzkO/fNat4gMf5C0N/ftqNOES0nOBgGdBkUWOfJXp6nXVLydLBM1gLVbbgLY4ESj/Ya/dxxXmRaqVJsV0jbC6bDaMPlVvrzCaKE+CHDGD/8QlVzH3WDfpu1xmg9VAEbv/A/9Tncxgdq0PPDA==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 12.22.5.236)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 12.22.5.236 as permitted sender) receiver=protection.outlook.com;\n client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C",
        "From": "Alexander Kozyrev <akozyrev@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<cristian.dumitrescu@intel.com>, <jerinjacobk@gmail.com>,\n <orika@nvidia.com>, <thomas@monjalon.net>, <ivan.malov@oktetlabs.ru>,\n <andrew.rybchenko@oktetlabs.ru>, <ferruh.yigit@xilinx.com>,\n <mohammad.abdul.awal@intel.com>, <qi.z.zhang@intel.com>,\n <jerinj@marvell.com>, <ajit.khaparde@broadcom.com>,\n <bruce.richardson@intel.com>",
        "Subject": "[PATCH v3 0/7] ethdev: separate metering and marking from policing",
        "Date": "Wed, 1 Jun 2022 06:44:01 +0300",
        "Message-ID": "<20220601034408.2579943-1-akozyrev@nvidia.com>",
        "X-Mailer": "git-send-email 2.18.2",
        "In-Reply-To": "<20220522105102.1692526-1-akozyrev@nvidia.com>",
        "References": "<20220522105102.1692526-1-akozyrev@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.231.35]",
        "X-ClientProxiedBy": "rnnvmail202.nvidia.com (10.129.68.7) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "9f080413-2420-443b-da02-08da4381076f",
        "X-MS-TrafficTypeDiagnostic": "BN8PR12MB2883:EE_",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "\n <BN8PR12MB288375CDCDCC89F6008FFDBBAFDF9@BN8PR12MB2883.namprd12.prod.outlook.com>",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n MP20VzKPnv6BzXsVPpNJ+SZAsO9vwtrlSG+oiWtZgcjksYNQU4AR3i1e+rNOmmhUaGp/aMpiPU0htOjre15ZnKWL0XMSWpxwh65mUPs2BmRhl/LwWRhWgcxrb/RoX9bCH4dN2KTtGJoGXlNsRmutfP0dwD8CxRO5HTwiQsi3MP7cHqioLHdSmPzIaQGK49Hra3B70exNNdswdo3pXKmo9Vvpc5t+UfKCCoSxx/mbbWMXcZPAE37SDH4QzRZfpdbepOMVX3kM7389FBiowAHiZc1SgNAZOP522fakXdWq2kgT3UMB5rqVa2GuEgvfibarodCHQ8ArTBYynQ8l2btlgbyKddrOQ0QcS4fx2K6oceHkzwKh+CgbMR+YQCUa1Sghh+vjnasi5XbuRGRGYS19pQZ6pDMlpLmiAgVTe0mLwNmkUlwVXmb4LiQGivfa9Ut7dWJUtak+tRXGAoWOZVQK+p2eqrlYco4TzioOwhVHEjKn56Fe2o76kjBt7gUMNHT2UNeb2i0I+SkoBbU5DS9Ukcm50wqESBGKmTRRxluK8b5rlX+G62ntg+c5enFC4c7Ex4CnZO5/ZD0T1ufAzByor/k6FhdmvfJf8Dv+hLaBP6J/qkzB+INkrQFYkyBAPVpVrj/Bd9X7D9xjOUHnoBWRty7KXl+S1r2LbyQvZ+27pc4SHNmnFnuCThQYnktz9yGpHyZTlwXIo+l+5tvrWukiwGRhFV+QxeldFN/Sm6jck3bxn8JK+Bmn5dSkrF8CPcW5aIvRaipd893iAavLZ61o0Dm/BnQ+KGtOcPzlSaLN7H4=",
        "X-Forefront-Antispam-Report": "CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE;\n SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(70586007)(54906003)(36756003)(7416002)(86362001)(70206006)(316002)(1076003)(8936002)(4326008)(8676002)(40460700003)(336012)(186003)(426003)(5660300002)(6916009)(16526019)(2616005)(81166007)(83380400001)(508600001)(36860700001)(2906002)(356005)(26005)(47076005)(82310400005)(966005)(6666004)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "01 Jun 2022 03:44:27.9865 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 9f080413-2420-443b-da02-08da4381076f",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n DM6NAM11FT036.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN8PR12MB2883",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Extend Metering and Marking support in the Flow API:\n1. Add METER_COLOR item to match Color Marker set by a Meter.\n2. Add the ability to set Color Marker via modify_field Flow API.\n3. Add Meter API to get profile/policy objects.\n4. Add METER_MARK action to perform Meter color metering and marking.\nProvide greater flexibility in how Metering can be used.\n\nRFC: https://patchwork.dpdk.org/project/dpdk/cover/20220502200439.4100965-1-akozyrev@nvidia.com/\n\nTraditional Meter Usage:\n\nprofile_id = rte_mtr_meter_profile_add(RFC_params);\npolicy_id = rte_mtr_meter_policy_add(actions[RED/YELLOW/GREEN]);\nmeter_id = rte_mtr_create(profile_id, policy_id);\nrte_flow_create(pattern=5-tuple,actions=METER(meter_id));\n\nThe METER action effectively translates to the following:\n1. Metering a packet stream.\n2. Marking packets with an appropriate color.\n3. Jump to a policy group.\n4. Match on a color.\n5. Execute assigned policy actions for the color.\n\nNew Meter Usage Model:\nprofile_id = rte_mtr_meter_profile_add(RFC_params);\n*profile_obj_ptr = rte_mtr_meter_profile_get(profile_id);\nrte_flow_create(pattern=5-tuple,\n\t\t\t\tactions=METER(profile_obj_ptr),JUMP);\nrte_flow_create(pattern=COLOR, actions=...);\n\nThe METER_MARK action effectively translates to the following:\n1. Metering a packet stream.\n2. Marking packets with an appropriate color.\n\nA user is able to match the color later with the COLOR item.\nIn order to do this we add the JUMP action after the METER action.\n\n3. Jump to a policy group.\n4. Match on a color.\n5. Execute actions for the color.\n\nHere we decoupled the meter profile usage from the meter policy usage\nfor greater flexibility and got rid of any locks related to meter_id lookup.\n\nAnother example of the meter creation to mimic the old model entirely:\nprofile_id = rte_mtr_meter_profile_add(RFC_params);\n*profile_obj_ptr = rte_mtr_meter_profile_get(profile_id);\npolicy_id = rte_mtr_meter_policy_add(actions[RED/YELLOW/GREEN]);\n*policy_obj_ptr = rte_mtr_meter_policy_get(policy_id);\nrte_flow_create(pattern=5-tuple,\n\t\t\t\tactions=METER(profile_obj_ptr, policy_obj_ptr));\n\nIn this case, we define the policy actions right away.\nThe main advantage is not having to lookup for profile_id/policy_id.\n\nTo free the meter obects we need to do the following:\nrte_flow_destroy(flow_handle);\nrte_mtr_meter_policy_delete(policy_id);\nrte_mtr_meter_profile_delete(profile_id);.\nprofile_obj_ptr and policy_obj_ptr are no longer valid after that.\n\nThe meter profile configuration cannot be updated dynamically\nwith the current set of patches, but can be supported later on.\nNow you have to destroy flows and profiles and recreate them.\nBut rte_mtr_meter_profile_update()/rte_mtr_meter_policy_update()\ncan have the corresponding siblings without mtr_id parameters.\nIn this case, we can update the config and all the flows using them.\n\nThe meter sharing is done via the indirect action Flow API:\nprofile_id = rte_mtr_meter_profile_add(RFC_params);\n*profile_obj_ptr = rte_mtr_meter_prof8ile_get(profile_id);\nhandle = rte_flow_action_handle_create(action=METER(profile_obj_ptr, NULL));\nflow1 = rte_flow_create(pattern=5-tuple-1, actions=INDIRECT(handle));\nflow2 = rte_flow_create(pattern=5-tuple-2, actions=INDIRECT(handle));\n\nOnce we are done with the flow rules we can free everything.\nrte_flow_destroy(flow1);\nrte_flow_destroy(flow2);\nrte_flow_action_handle_destroy(handle);\nrte_mtr_meter_profile_delete(profile_id);\n\nSigned-off-by: Alexander Kozyrev <akozyrev@nvidia.com>\n\nAlexander Kozyrev (7):\n  ethdev: add meter color flow matching item\n  ethdev: allow meter color marker modification\n  ethdev: get meter profile/policy objects\n  ethdev: add meter color mark flow action\n  app/testpmd: add meter color flow matching item\n  app/testpmd: allow meter color marker modification\n  app/testpmd: add meter color mark flow action\n\n app/test-pmd/cmdline_flow.c                   | 213 +++++++++++++++++-\n app/test-pmd/config.c                         |  26 +++\n app/test-pmd/testpmd.h                        |   4 +\n doc/guides/prog_guide/rte_flow.rst            |  32 +++\n .../traffic_metering_and_policing.rst         |   7 +\n doc/guides/rel_notes/release_22_07.rst        |   7 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst   |   9 +\n lib/ethdev/rte_flow.c                         |   2 +\n lib/ethdev/rte_flow.h                         |  60 +++++\n lib/ethdev/rte_mtr.c                          |  41 ++++\n lib/ethdev/rte_mtr.h                          |  40 ++++\n lib/ethdev/rte_mtr_driver.h                   |  19 ++\n lib/ethdev/version.map                        |   2 +\n 13 files changed, 461 insertions(+), 1 deletion(-)",
    "diff": null,
    "prefixes": [
        "v3",
        "0/7"
    ]
}