get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 81190,
    "url": "http://patchwork.dpdk.org/api/patches/81190/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1602916089-18576-9-git-send-email-venkatkumar.duvvuru@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1602916089-18576-9-git-send-email-venkatkumar.duvvuru@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1602916089-18576-9-git-send-email-venkatkumar.duvvuru@broadcom.com",
    "date": "2020-10-17T06:28:03",
    "name": "[08/14] net/bnxt: fix infinite loop in flow query count API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dca201ee42372785e184656f700aca3ffdecfb3d",
    "submitter": {
        "id": 1635,
        "url": "http://patchwork.dpdk.org/api/people/1635/?format=api",
        "name": "Venkat Duvvuru",
        "email": "venkatkumar.duvvuru@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patchwork.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1602916089-18576-9-git-send-email-venkatkumar.duvvuru@broadcom.com/mbox/",
    "series": [
        {
            "id": 13073,
            "url": "http://patchwork.dpdk.org/api/series/13073/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=13073",
            "date": "2020-10-17T06:27:55",
            "name": "bnxt patches",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/13073/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/81190/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/81190/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id BF178A04DB;\n\tSat, 17 Oct 2020 08:31:15 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 83616E36C;\n\tSat, 17 Oct 2020 08:28:30 +0200 (CEST)",
            "from relay.smtp-ext.broadcom.com (unknown [192.19.221.30])\n by dpdk.org (Postfix) with ESMTP id 77B63E2C5\n for <dev@dpdk.org>; Sat, 17 Oct 2020 08:28:15 +0200 (CEST)",
            "from S60.dhcp.broadcom.net (unknown [10.123.66.170])\n (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits))\n (No client certificate requested)\n by relay.smtp-ext.broadcom.com (Postfix) with ESMTPS id B500F82CEB;\n Fri, 16 Oct 2020 23:28:13 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com B500F82CEB",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1602916093;\n bh=t5EAZgSuSE8UXR0tCpcRfBcoK+q2DW7OXKUFI7SEEEE=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=meLDZx3jWhMfHAKgQM6rzeClxytD4To0howIet16hyjngOP5RroHWTTAvxnpEa4/A\n IbySjHY7yayG30QsYFzq/ko3uEjIAP5WCHmf5FLj4P/MgITPtvhZ3hGP19JcozKa4G\n ByOXNAxVvyQwL13RhKu641jh5Cf54XvZitWile4U=",
        "From": "Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "Somnath Kotur <somnath.kotur@broadcom.com>",
        "Date": "Sat, 17 Oct 2020 11:58:03 +0530",
        "Message-Id": "\n <1602916089-18576-9-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "\n <1602916089-18576-1-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "References": "\n <1602916089-18576-1-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH 08/14] net/bnxt: fix infinite loop in flow query\n\tcount API",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Somnath Kotur <somnath.kotur@broadcom.com>\n\n`nxt_resource_idx` could be zero in some cases which is invalid and\nshould be part of the while loop condition. Also synchronize access to\nthe flow db using the fdb_lock\n\nFixes: 306c2d28e247 (\"net/bnxt: support count action in flow query\")\n\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\nReviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>\nReviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 51 +++++++++++++++++++-----------------\n 1 file changed, 27 insertions(+), 24 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c\nindex 051ebac..41736a8 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c\n+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c\n@@ -559,6 +559,9 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,\n \tif (!ulp_fc_info)\n \t\treturn -ENODEV;\n \n+\tif (bnxt_ulp_cntxt_acquire_fdb_lock(ctxt))\n+\t\treturn -EIO;\n+\n \tdo {\n \t\trc = ulp_flow_db_resource_get(ctxt,\n \t\t\t\t\t      BNXT_ULP_FDB_TYPE_REGULAR,\n@@ -575,35 +578,35 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,\n \t\t\tbreak;\n \t\t}\n \n-\t} while (!rc);\n+\t} while (!rc && nxt_resource_index);\n+\n+\tbnxt_ulp_cntxt_release_fdb_lock(ctxt);\n \n-\tif (rc)\n+\tif (rc || !found_cntr_resource)\n \t\treturn rc;\n \n-\tif (found_cntr_resource) {\n-\t\tdir = params.direction;\n-\t\thw_cntr_id = params.resource_hndl;\n-\t\tsw_cntr_idx = hw_cntr_id -\n-\t\t\t\tulp_fc_info->shadow_hw_tbl[dir].start_idx;\n-\t\tsw_acc_tbl_entry = &ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx];\n-\t\tif (params.resource_sub_type ==\n+\tdir = params.direction;\n+\thw_cntr_id = params.resource_hndl;\n+\tsw_cntr_idx = hw_cntr_id -\n+\t\tulp_fc_info->shadow_hw_tbl[dir].start_idx;\n+\tsw_acc_tbl_entry = &ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx];\n+\tif (params.resource_sub_type ==\n \t\t\tBNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_INT_COUNT) {\n-\t\t\tpthread_mutex_lock(&ulp_fc_info->fc_lock);\n-\t\t\tif (sw_acc_tbl_entry->pkt_count) {\n-\t\t\t\tcount->hits_set = 1;\n-\t\t\t\tcount->bytes_set = 1;\n-\t\t\t\tcount->hits = sw_acc_tbl_entry->pkt_count;\n-\t\t\t\tcount->bytes = sw_acc_tbl_entry->byte_count;\n-\t\t\t}\n-\t\t\tif (count->reset) {\n-\t\t\t\tsw_acc_tbl_entry->pkt_count = 0;\n-\t\t\t\tsw_acc_tbl_entry->byte_count = 0;\n-\t\t\t}\n-\t\t\tpthread_mutex_unlock(&ulp_fc_info->fc_lock);\n-\t\t} else {\n-\t\t\t/* TBD: Handle External counters */\n-\t\t\trc = -EINVAL;\n+\t\tpthread_mutex_lock(&ulp_fc_info->fc_lock);\n+\t\tif (sw_acc_tbl_entry->pkt_count) {\n+\t\t\tcount->hits_set = 1;\n+\t\t\tcount->bytes_set = 1;\n+\t\t\tcount->hits = sw_acc_tbl_entry->pkt_count;\n+\t\t\tcount->bytes = sw_acc_tbl_entry->byte_count;\n \t\t}\n+\t\tif (count->reset) {\n+\t\t\tsw_acc_tbl_entry->pkt_count = 0;\n+\t\t\tsw_acc_tbl_entry->byte_count = 0;\n+\t\t}\n+\t\tpthread_mutex_unlock(&ulp_fc_info->fc_lock);\n+\t} else {\n+\t\t/* TBD: Handle External counters */\n+\t\trc = -EINVAL;\n \t}\n \n \treturn rc;\n",
    "prefixes": [
        "08/14"
    ]
}