get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 47381,
    "url": "http://patchwork.dpdk.org/api/patches/47381/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20181024202719.24902-6-dg@adax.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": "<20181024202719.24902-6-dg@adax.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20181024202719.24902-6-dg@adax.com",
    "date": "2018-10-24T20:27:19",
    "name": "[v6,5/5] examples/kni: improve zeroing statistics",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f596d91eadc0abfe1a32e599b20a2eacbf8f8ea1",
    "submitter": {
        "id": 1040,
        "url": "http://patchwork.dpdk.org/api/people/1040/?format=api",
        "name": "Dan Gora",
        "email": "dg@adax.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20181024202719.24902-6-dg@adax.com/mbox/",
    "series": [
        {
            "id": 2076,
            "url": "http://patchwork.dpdk.org/api/series/2076/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2076",
            "date": "2018-10-24T20:27:14",
            "name": "kni: add API to set link status on kernel interface",
            "version": 6,
            "mbox": "http://patchwork.dpdk.org/series/2076/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/47381/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/47381/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 729F25B26;\n\tWed, 24 Oct 2018 22:27:52 +0200 (CEST)",
            "from mail-qt1-f194.google.com (mail-qt1-f194.google.com\n\t[209.85.160.194]) by dpdk.org (Postfix) with ESMTP id 39F01548B\n\tfor <dev@dpdk.org>; Wed, 24 Oct 2018 22:27:51 +0200 (CEST)",
            "by mail-qt1-f194.google.com with SMTP id p24-v6so1284563qtq.0\n\tfor <dev@dpdk.org>; Wed, 24 Oct 2018 13:27:51 -0700 (PDT)",
            "from snappy.local.lan ([179.228.213.114])\n\tby smtp.gmail.com with ESMTPSA id\n\tp64-v6sm3509117qkc.96.2018.10.24.13.27.47\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 24 Oct 2018 13:27:49 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=+6LWhTYsYoXPIT940Q4sXLq6n9xxmxPAOZVAMSdxNcE=;\n\tb=BnUUfLR+z+hViiCO3UlFHuAmmuG8fxpIyvbsXxgvagPCh5wNt1jGX30nAf3W9yT5L0\n\tzyLJ/p7Reca2sQx+N+j7wnLrTDMKajBNJQOIVUg6VgycRLO5jNQ/TebIBVq9YbFyJ7pN\n\ttVNpuf+GaKfHX+U/x+CJTLg4bL7btAx1BLu+DBdoWxM//Lus+U/Fs/1nhU0z8xYR8lM4\n\t0PIDulxQTOXkwGCA2SGqMu3gpK89qaBkSomajazSCqpuTGqhbV3OnZu2TIQMyQ2jFLqs\n\tKPPjsR7+1sw2dhu4WOGyFAtaVnb47mG9KPQ0NJjD86UtAxewOFnYVoxwSxlqHCgmkPAU\n\tSh3w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references:mime-version:content-transfer-encoding;\n\tbh=+6LWhTYsYoXPIT940Q4sXLq6n9xxmxPAOZVAMSdxNcE=;\n\tb=FIK4x+s0aLEf4Tb4KMVC2zxpxn8O3MIJysQR36iv1JJRf7n0bNPKd25La2eA5fennc\n\tue3bFjOaKopg1E//VduQHqh48lSocd2AZKi65mMG/k+TlEbdl/ngezoeZf5ZJRzuLskd\n\tSs4RjnfSMCPVhsnwO7RGUMPgxV6L1+XKiB59VsKzgY28JVJLj/4j1peo/YTu8HuHA2ar\n\tZeaQnwpGp6Eo2KOVd7fn71A45KyfCRY/6TvgY4cVsdcRcAm2IX5dQ75d8f5XQ8GStqBB\n\tYlaqM+BOiovNrHH4IOHWmv9oSdwoTIFABHLmcz+QOWtWWmzntlP3qEUW0cWsF5X55/7x\n\taZaA==",
        "X-Gm-Message-State": "AGRZ1gLD3l+I8RtJvmIZ9X/gmgvb5VDcxgNqWRbrOMaKlIdEbnV4aGhb\n\tM+ZnNfItETIZigJxBjOIWYF3FwQS",
        "X-Google-Smtp-Source": "AJdET5cR6ThDTeQm5FKCSVlmhtfuzvfSxrEf/DzuBHGrpPido7o7JDJJaThJZPmWZUptrH3rs1iFsg==",
        "X-Received": "by 2002:ac8:23ad:: with SMTP id\n\tq42-v6mr4022826qtq.322.1540412870237; \n\tWed, 24 Oct 2018 13:27:50 -0700 (PDT)",
        "From": "Dan Gora <dg@adax.com>",
        "To": "dev@dpdk.org",
        "Cc": "Igor Ryzhov <iryzhov@nfware.com>,\n\tStephen Hemminger <stephen@networkplumber.org>,\n\tFerruh Yigit <ferruh.yigit@intel.com>, Dan Gora <dg@adax.com>",
        "Date": "Wed, 24 Oct 2018 17:27:19 -0300",
        "Message-Id": "<20181024202719.24902-6-dg@adax.com>",
        "X-Mailer": "git-send-email 2.19.0",
        "In-Reply-To": "<20181024202719.24902-1-dg@adax.com>",
        "References": "<20180911232906.18352-1-dg@adax.com>\n\t<20181024202719.24902-1-dg@adax.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 5/5] examples/kni: improve zeroing statistics",
        "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": "The worker threads incrementing the rx/tx_packets race with the signal\nhandler from the main thread zeroing the entire statistics structure.\nThis can cause the statistics to fail to be zeroed, even when there\nis no traffic on those interfaces.\n\nImprove zeroing the statistics by only incrementing rx/tx_packets\nin worker threads by a non-zero amount.  This limits the race to the\nperiods in which traffic is actually being received or transmitted.\n\nSigned-off-by: Dan Gora <dg@adax.com>\n---\n examples/kni/main.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/examples/kni/main.c b/examples/kni/main.c\nindex 0e3b2a2f7..e37b1ad36 100644\n--- a/examples/kni/main.c\n+++ b/examples/kni/main.c\n@@ -223,7 +223,8 @@ kni_ingress(struct kni_port_params *p)\n \t\t}\n \t\t/* Burst tx to kni */\n \t\tnum = rte_kni_tx_burst(p->kni[i], pkts_burst, nb_rx);\n-\t\tkni_stats[port_id].rx_packets += num;\n+\t\tif (num)\n+\t\t\tkni_stats[port_id].rx_packets += num;\n \n \t\trte_kni_handle_request(p->kni[i]);\n \t\tif (unlikely(num < nb_rx)) {\n@@ -260,7 +261,8 @@ kni_egress(struct kni_port_params *p)\n \t\t}\n \t\t/* Burst tx to eth */\n \t\tnb_tx = rte_eth_tx_burst(port_id, 0, pkts_burst, (uint16_t)num);\n-\t\tkni_stats[port_id].tx_packets += nb_tx;\n+\t\tif (nb_tx)\n+\t\t\tkni_stats[port_id].tx_packets += nb_tx;\n \t\tif (unlikely(nb_tx < num)) {\n \t\t\t/* Free mbufs not tx to NIC */\n \t\t\tkni_burst_free_mbufs(&pkts_burst[nb_tx], num - nb_tx);\n",
    "prefixes": [
        "v6",
        "5/5"
    ]
}