get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 118650,
    "url": "http://patches.dpdk.org/api/patches/118650/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221019184007.1032874-4-michaelsav@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": "<20221019184007.1032874-4-michaelsav@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221019184007.1032874-4-michaelsav@nvidia.com",
    "date": "2022-10-19T18:40:06",
    "name": "[v2,3/4] net/mlx5: add send to kernel action resource holder",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "069669a2b78b8457c1f23f997f98b2b1f5d4e013",
    "submitter": {
        "id": 2805,
        "url": "http://patches.dpdk.org/api/people/2805/?format=api",
        "name": "Michael Savisko",
        "email": "michaelsav@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20221019184007.1032874-4-michaelsav@nvidia.com/mbox/",
    "series": [
        {
            "id": 25318,
            "url": "http://patches.dpdk.org/api/series/25318/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25318",
            "date": "2022-10-19T18:40:03",
            "name": "net/mlx5: implement send to kernel action",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/25318/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/118650/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/118650/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 EEB3FA09EC;\n\tWed, 19 Oct 2022 20:41:44 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3320842C3A;\n\tWed, 19 Oct 2022 20:41:34 +0200 (CEST)",
            "from NAM12-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam12on2049.outbound.protection.outlook.com [40.107.244.49])\n by mails.dpdk.org (Postfix) with ESMTP id 6935F42C3A\n for <dev@dpdk.org>; Wed, 19 Oct 2022 20:41:33 +0200 (CEST)",
            "from DS7PR05CA0063.namprd05.prod.outlook.com (2603:10b6:8:57::19) by\n MN2PR12MB4255.namprd12.prod.outlook.com (2603:10b6:208:198::12) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Wed, 19 Oct\n 2022 18:41:31 +0000",
            "from DM6NAM11FT081.eop-nam11.prod.protection.outlook.com\n (2603:10b6:8:57:cafe::d3) by DS7PR05CA0063.outlook.office365.com\n (2603:10b6:8:57::19) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.11 via Frontend\n Transport; Wed, 19 Oct 2022 18:41:31 +0000",
            "from mail.nvidia.com (216.228.117.160) by\n DM6NAM11FT081.mail.protection.outlook.com (10.13.172.136) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.5746.16 via Frontend Transport; Wed, 19 Oct 2022 18:41:31 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 19 Oct\n 2022 11:41:17 -0700",
            "from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 19 Oct\n 2022 11:41:15 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=H1dnwD2HbVqbmw2DhlWa9bz/rXTZUjVLf1xR/agPPQSV1i6wmd3qwy3gOFGEMLAnIzqxTWT50nxW9sb5bl3MXkRCa7CEmi3ENUkCKUwSBQxRiUSGuvAzjId6wJKW+n0Lg2pwJK4HSI0OPIpJFM66E01R8fQ3/5TpH1AXLjM/LdadFC6nl+fRHAv4j/usL/xkMlIbEezRYqbqDuh+jxxHxc/o9+kqWpHPYiqTNz2KrvL9qbeHkrw25CFYT+L2AzeiiVpudkGJVuR/EXHkLVGQFQHivN0v8XqSI8+D0v6MFv+5hq3n7/c3yWwSpsf475FQ0BIJzaCwAcIi2TMRG5BtYQ==",
        "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=dHiSJIS/L79E5hP4ukOV4HNRll7oSsUSn874RISD3Es=;\n b=nDm4b9F7xWlYUJNhhAIJmAaEs+PVv+T3sgwVeLyj5r59v/xP9K+mXdn/WVqB1xDWfx/p71baN+ViWKzJ6euQcP4PggmGDfL0Zb/tKJwcQZYJQIcIU3i/3GB8PSDqFinvjD1KKLj9Tqm4EwJtFoMQUZPBut/Ep+moZfxeIyTgC7/GBZxqyL7Qudh/MNQi0id4AX294mJ5IVeP/cqK/eOrSNodiXSwYLDmjmLxO8daSmeSyxiAmk2cMj4z4Z6yUlb9GrpSKSyQVK+5rV6ppOFUBEEYC1m8l0uJ/JFVmUm6LvtAobyS+IM5omIzPJGWDRuCGBWwP5zWqXXnQUfjVG8EXw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=none (sender ip is\n 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=fail (p=reject sp=reject pct=100) action=oreject\n header.from=nvidia.com; dkim=none (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=dHiSJIS/L79E5hP4ukOV4HNRll7oSsUSn874RISD3Es=;\n b=qyx4s4VpKQCdI3qqLfFIz6l98N7W9C46dXoD818frOfRBP3IVjr9PF9St4eYX2IE98xwGyUJhHV5fzpAYZfeRO9NJ1KRh6mchvil58KiPpFKaU+WdVwqDTCaUfiwwhI6FPZLGsp0sMLEQIr/ed9m3ATupY25PqcPAGSSvxlo0mD1ZQ6cScRAgNsisqflzZ41XgGQi2BTpqhI8gCbtEZirSRTUpQRMy/ntzvtKQha9gyGYoKAp8D7l9Za+PMvDcGjLU+ZKoD3VxZ3SCKmQI6lKpeC0R/6l3COZd/p0IcBsPrXDAx3X9qctnYoN2LRI8pw4YX7suY4krCDy+h9T6L5DA==",
        "X-MS-Exchange-Authentication-Results": "spf=none (sender IP is 216.228.117.160)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=fail action=oreject header.from=nvidia.com;",
        "Received-SPF": "None (protection.outlook.com: nvidia.com does not designate\n permitted sender hosts)",
        "From": "Michael Savisko <michaelsav@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<michaelsav@nvidia.com>, <orika@nvidia.com>, <viacheslavo@nvidia.com>,\n <asafp@nvidia.com>, Matan Azrad <matan@nvidia.com>",
        "Subject": "[PATCH v2 3/4] net/mlx5: add send to kernel action resource holder",
        "Date": "Wed, 19 Oct 2022 21:40:06 +0300",
        "Message-ID": "<20221019184007.1032874-4-michaelsav@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20221019184007.1032874-1-michaelsav@nvidia.com>",
        "References": "<20221019184007.1032874-1-michaelsav@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.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-TrafficTypeDiagnostic": "DM6NAM11FT081:EE_|MN2PR12MB4255:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "a290c0c0-0eee-4d8d-25fc-08dab2018a7a",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n sHco2ZMGBa6+DXuvb060fj01pVoLjkC/KR9RINN8r/b4yd4PckDeLtDpQW5Hgw6d0Hwm+ZfrHFppHOS6HymWzDTGuNT6Wgwctw/ck+NHcTTFBXYs8xNc5butE0293ab4/GLVn/E2RgguTSNreRunGiGB0TcznYM0OKGKuBYAbeSCStT8Xerd8zhfRWo/Nhm1LKDdloTc16SsbpAOMAH/87p9XArDhhzQbb1iCbhAq5ISLhFgSDhvYK/nvNgwLPReb4i79UE93FqN0YN3oSNwE9BPFtb+z9V/DqlOx8RlOmhtMfEQKCtTgeHC4zp7Rad+sB1BGzeYrxruUEZ15+MI/fvCdpa6uhdsjTnIz1FGKh6CX+Ttro0W1RPydkpqfEU1KVjRvV3GJXXn8V/AI9CmwllmFFu3G/ZVrgFeUNP879lKK5U29U/G6tsf7bfG6FyymFztqbt9Tk84QagU4TJJ4hS+YgaYTUSBr3Xh28B8EHlQIQkfzwgBeRc3jq2gpnNGlbpwuBYc+59N+/MGSJ7nlKldF34rJB+kQUOadK38JfYnrAiZI/kNcIf3V4I7Eac8eWL384QfK0rNNRkToCIiuXpafQVNolSXKKBAizoEa67dc9dAZGLplP5QRCVAq2wapQCJd+S3mXSRRpl7O8jbvFos2PNLHMI+h3v8UyOIZOukSdqo34JJMoR5Z9zz/OplP7MYrrwPOr2cs0NM8Az/mwA812GjLxiZXo2oxmXixJujMTruhOvlAbBopElHZSjZbdb0WFdW29FfU+kkrGbmAQ==",
        "X-Forefront-Antispam-Report": "CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE;\n SFS:(13230022)(4636009)(346002)(396003)(376002)(39860400002)(136003)(451199015)(40470700004)(46966006)(36840700001)(1076003)(16526019)(186003)(83380400001)(47076005)(7636003)(356005)(426003)(36860700001)(86362001)(336012)(2616005)(82740400003)(5660300002)(2906002)(478600001)(8936002)(82310400005)(8676002)(4326008)(55016003)(40480700001)(107886003)(40460700003)(6286002)(26005)(70586007)(6916009)(7696005)(316002)(41300700001)(70206006)(6666004)(54906003)(36756003);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "19 Oct 2022 18:41:31.2912 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n a290c0c0-0eee-4d8d-25fc-08dab2018a7a",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n DM6NAM11FT081.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MN2PR12MB4255",
        "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": "Add new structure mlx5_send_to_kernel_action which will hold\ntogether allocated action resource and a reference to used table.\nA new structure member of this type added to struct mlx5_dev_ctx_shared.\nThe member will be initialized upon first created send_to_kernel\naction and will be reused for all future actions of this type.\nRelease of these resources will be done when all shared DR\nresources are being released in mlx5_os_free_shared_dr().\n\nChange function flow_dv_tbl_resource_release() from\nstatic to external.\n\nSigned-off-by: Michael Savisko <michaelsav@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/net/mlx5/linux/mlx5_os.c | 13 +++++++++++++\n drivers/net/mlx5/mlx5.h          |  6 ++++++\n drivers/net/mlx5/mlx5_flow.h     |  2 ++\n drivers/net/mlx5/mlx5_flow_dv.c  |  6 +-----\n 4 files changed, 22 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex 60677eb8d7..3e505d8f4c 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -700,6 +700,19 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)\n \t\tmlx5_glue->destroy_flow_action(sh->pop_vlan_action);\n \t\tsh->pop_vlan_action = NULL;\n \t}\n+\tif (sh->send_to_kernel_action.action) {\n+\t\tvoid *action = sh->send_to_kernel_action.action;\n+\n+\t\tmlx5_glue->destroy_flow_action(action);\n+\t\tsh->send_to_kernel_action.action = NULL;\n+\t}\n+\tif (sh->send_to_kernel_action.tbl) {\n+\t\tstruct mlx5_flow_tbl_resource *tbl =\n+\t\t\t\tsh->send_to_kernel_action.tbl;\n+\n+\t\tflow_dv_tbl_resource_release(sh, tbl);\n+\t\tsh->send_to_kernel_action.tbl = NULL;\n+\t}\n #endif /* HAVE_MLX5DV_DR */\n \tif (sh->default_miss_action)\n \t\tmlx5_glue->destroy_flow_action\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 3c9e6bad53..c2c3ed81fa 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -1180,6 +1180,11 @@ struct mlx5_flex_item {\n \tstruct mlx5_flex_pattern_field map[MLX5_FLEX_ITEM_MAPPING_NUM];\n };\n \n+struct mlx5_send_to_kernel_action {\n+\tvoid *action;\n+\tvoid *tbl;\n+};\n+\n /*\n  * Shared Infiniband device context for Master/Representors\n  * which belong to same IB device with multiple IB ports.\n@@ -1231,6 +1236,7 @@ struct mlx5_dev_ctx_shared {\n \t/* Direct Rules tables for FDB, NIC TX+RX */\n \tvoid *dr_drop_action; /* Pointer to DR drop action, any domain. */\n \tvoid *pop_vlan_action; /* Pointer to DR pop VLAN action. */\n+\tstruct mlx5_send_to_kernel_action send_to_kernel_action;\n \tstruct mlx5_hlist *encaps_decaps; /* Encap/decap action hash list. */\n \tstruct mlx5_hlist *modify_cmds;\n \tstruct mlx5_hlist *tag_table;\ndiff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h\nindex 18a77ec619..525db05969 100644\n--- a/drivers/net/mlx5/mlx5_flow.h\n+++ b/drivers/net/mlx5/mlx5_flow.h\n@@ -1918,6 +1918,8 @@ struct mlx5_flow_tbl_resource *flow_dv_tbl_resource_get(struct rte_eth_dev *dev,\n \t\tbool external, const struct mlx5_flow_tunnel *tunnel,\n \t\tuint32_t group_id, uint8_t dummy,\n \t\tuint32_t table_id, struct rte_flow_error *error);\n+int flow_dv_tbl_resource_release(struct mlx5_dev_ctx_shared *sh,\n+\t\t\t\t struct mlx5_flow_tbl_resource *tbl);\n \n struct mlx5_list_entry *flow_dv_tag_create_cb(void *tool_ctx, void *cb_ctx);\n int flow_dv_tag_match_cb(void *tool_ctx, struct mlx5_list_entry *entry,\ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex 6c355efed7..bcd9926b81 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -75,10 +75,6 @@ union flow_dv_attr {\n \tuint32_t attr;\n };\n \n-static int\n-flow_dv_tbl_resource_release(struct mlx5_dev_ctx_shared *sh,\n-\t\t\t     struct mlx5_flow_tbl_resource *tbl);\n-\n static int\n flow_dv_encap_decap_resource_release(struct rte_eth_dev *dev,\n \t\t\t\t     uint32_t encap_decap_idx);\n@@ -10928,7 +10924,7 @@ flow_dv_tbl_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)\n  * @return\n  *   Returns 0 if table was released, else return 1;\n  */\n-static int\n+int\n flow_dv_tbl_resource_release(struct mlx5_dev_ctx_shared *sh,\n \t\t\t     struct mlx5_flow_tbl_resource *tbl)\n {\n",
    "prefixes": [
        "v2",
        "3/4"
    ]
}