get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 47387,
    "url": "http://patchwork.dpdk.org/api/patches/47387/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20181024222631.30461-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": "<20181024222631.30461-6-dg@adax.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20181024222631.30461-6-dg@adax.com",
    "date": "2018-10-24T22:26:31",
    "name": "[v7,5/5] examples/kni: improve zeroing statistics",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/20181024222631.30461-6-dg@adax.com/mbox/",
    "series": [
        {
            "id": 2077,
            "url": "http://patchwork.dpdk.org/api/series/2077/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2077",
            "date": "2018-10-24T22:26:26",
            "name": "kni: add API to set link status on kernel interface",
            "version": 7,
            "mbox": "http://patchwork.dpdk.org/series/2077/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/47387/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/47387/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 A697C58C4;\n\tThu, 25 Oct 2018 00:27:00 +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 126BA4C99\n\tfor <dev@dpdk.org>; Thu, 25 Oct 2018 00:26:58 +0200 (CEST)",
            "by mail-qt1-f194.google.com with SMTP id p24-v6so1661234qtq.0\n\tfor <dev@dpdk.org>; Wed, 24 Oct 2018 15:26:58 -0700 (PDT)",
            "from snappy.local.lan ([179.228.213.114])\n\tby smtp.gmail.com with ESMTPSA id\n\ts52-v6sm5506026qts.5.2018.10.24.15.26.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 24 Oct 2018 15:26:56 -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=JwmDWRL5/7RwjznFzzkNPP/qS13MQTZLJsGZzBQSHNsU7zo9FIJOiolBlyQwIxSIU0\n\t6rrTtXSbrUcSN4aIJxtRqEbDzp0AYk97Cd21DiD7B+k4uDhjd4LNWHaXTS3FQupfMOvT\n\tXDJJkya23EcXrfZE9z1DdmQVlDzZdjGKGZycShXAu/RXJFHtXMzl1RC+dqciCDOKQes7\n\tbUtrlCl7FszDez+GTBQRsna1fPiKD4UnYuTKXcKfO9yugCjQauQNCQsmU7M8oFxf6hWh\n\tADcoi0morfGtDWC1mQBr5XOa5Fvbqzqy7UdvHrcInXllBGbS5uoQmqvP3DtkRqMWGPHH\n\tQoyw==",
        "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=fVjPvQq7fTiEEjgEVMOu3k3lnCvIli5j6pbjnJO2lornHkSkM7h3aI/yJu99Mf5xAc\n\t7zBZ0ygKG0vXxXxCKyPkM96flWC2t2LkCyokSBBEvDthDmUTEdxRa9HhD5QehevuG4/M\n\t8Q/hdvk8dsgsAgaRmGP4y1f0JvbbadPd589WlR2tBW3Zp6S97WlrR9rJPvcESxOXehej\n\tlXg43+J0HAhx+H1mO60YcTHNzcp+wkZWRRlH4aj2W2Kz5RXc3ITPBVZMYJroJEv0fAfY\n\tTcn/1rLGClvOrB6IOfQL/q9WGf1pN4WN34dsW2Dkbuty/S5/WxGMRW8WIA9G1QshV2/x\n\tveRQ==",
        "X-Gm-Message-State": "AGRZ1gJxojSzl+RL778l1gFZJqXNBnnTedGEcJMD13aKdcKcJu+1EXQw\n\t+dpk0MFhxyWSuv6IeNex3Iy1Xpam",
        "X-Google-Smtp-Source": "AJdET5eeTOocmNu0AT7ep2j4ZYbkR6CysO1OMWfb0WLOpPpgS0KiPLDTsjzBkpxViDuNxlQRQ57SVQ==",
        "X-Received": "by 2002:a0c:f3c1:: with SMTP id f1mr4256887qvm.167.1540420017084;\n\tWed, 24 Oct 2018 15:26:57 -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 19:26:31 -0300",
        "Message-Id": "<20181024222631.30461-6-dg@adax.com>",
        "X-Mailer": "git-send-email 2.19.0",
        "In-Reply-To": "<20181024222631.30461-1-dg@adax.com>",
        "References": "<20180911232906.18352-1-dg@adax.com>\n\t<20181024222631.30461-1-dg@adax.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v7 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": [
        "v7",
        "5/5"
    ]
}