get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44582,
    "url": "https://patches.dpdk.org/api/patches/44582/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1536675645-10105-15-git-send-email-reshma.pattan@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1536675645-10105-15-git-send-email-reshma.pattan@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1536675645-10105-15-git-send-email-reshma.pattan@intel.com",
    "date": "2018-09-11T14:20:44",
    "name": "[v2,14/15] net/softnic: add flow query API",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a2a0a6cd4bc590a56adf45a767b0742d97588ec6",
    "submitter": {
        "id": 70,
        "url": "https://patches.dpdk.org/api/people/70/?format=api",
        "name": "Pattan, Reshma",
        "email": "reshma.pattan@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "https://patches.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1536675645-10105-15-git-send-email-reshma.pattan@intel.com/mbox/",
    "series": [
        {
            "id": 1280,
            "url": "https://patches.dpdk.org/api/series/1280/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1280",
            "date": "2018-09-11T14:20:44",
            "name": null,
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/1280/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/44582/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/44582/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 23C625F35;\n\tTue, 11 Sep 2018 16:21:16 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 95AA74CC3\n\tfor <dev@dpdk.org>; Tue, 11 Sep 2018 16:21:04 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Sep 2018 07:21:04 -0700",
            "from sivswdev02.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.46])\n\tby fmsmga007.fm.intel.com with ESMTP; 11 Sep 2018 07:21:03 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,360,1531810800\"; d=\"scan'208\";a=\"69156925\"",
        "From": "Reshma Pattan <reshma.pattan@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>,\n\tReshma Pattan <reshma.pattan@intel.com>",
        "Date": "Tue, 11 Sep 2018 15:20:44 +0100",
        "Message-Id": "<1536675645-10105-15-git-send-email-reshma.pattan@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>",
        "References": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 14/15] net/softnic: add flow query 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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Added pmd_flow_query() API, for flow query\nsupport.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Reshma Pattan <reshma.pattan@intel.com>\n---\n drivers/net/softnic/rte_eth_softnic_flow.c | 55 ++++++++++++++++++++++++++++++\n 1 file changed, 55 insertions(+)",
    "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic_flow.c b/drivers/net/softnic/rte_eth_softnic_flow.c\nindex 90387b30b..bdf1d4091 100644\n--- a/drivers/net/softnic/rte_eth_softnic_flow.c\n+++ b/drivers/net/softnic/rte_eth_softnic_flow.c\n@@ -1654,8 +1654,63 @@ pmd_flow_destroy(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int\n+pmd_flow_query(struct rte_eth_dev *dev __rte_unused,\n+\tstruct rte_flow *flow,\n+\tconst struct rte_flow_action *action __rte_unused,\n+\tvoid *data,\n+\tstruct rte_flow_error *error)\n+{\n+\tstruct rte_table_action_stats_counters stats;\n+\tstruct softnic_table *table;\n+\tstruct rte_flow_query_count *flow_stats = data;\n+\tint status;\n+\n+\t/* Check input parameters. */\n+\tif (flow == NULL)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tEINVAL,\n+\t\t\tRTE_FLOW_ERROR_TYPE_HANDLE,\n+\t\t\tNULL,\n+\t\t\t\"Null flow\");\n+\n+\tif (data == NULL)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tEINVAL,\n+\t\t\tRTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n+\t\t\tNULL,\n+\t\t\t\"Null data\");\n+\n+\ttable = &flow->pipeline->table[flow->table_id];\n+\n+\t/* Rule stats read. */\n+\tstatus = rte_table_action_stats_read(table->a,\n+\t\tflow->data,\n+\t\t&stats,\n+\t\tflow_stats->reset);\n+\tif (status)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tEINVAL,\n+\t\t\tRTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n+\t\t\tNULL,\n+\t\t\t\"Pipeline table rule stats read failed\");\n+\n+\t/* Fill in flow stats. */\n+\tflow_stats->hits_set =\n+\t\t(table->ap->params.stats.n_packets_enabled) ? 1 : 0;\n+\tflow_stats->bytes_set =\n+\t\t(table->ap->params.stats.n_bytes_enabled) ? 1 : 0;\n+\tflow_stats->hits = stats.n_packets;\n+\tflow_stats->bytes = stats.n_bytes;\n+\n+\treturn 0;\n+}\n+\n const struct rte_flow_ops pmd_flow_ops = {\n \t.validate = pmd_flow_validate,\n \t.create = pmd_flow_create,\n \t.destroy = pmd_flow_destroy,\n+\t.flush = NULL,\n+\t.query = pmd_flow_query,\n+\t.isolate = NULL,\n };\n",
    "prefixes": [
        "v2",
        "14/15"
    ]
}