get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45471,
    "url": "http://patches.dpdk.org/api/patches/45471/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180927003256.6901-7-dg@adax.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": "<20180927003256.6901-7-dg@adax.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180927003256.6901-7-dg@adax.com",
    "date": "2018-09-27T00:32:56",
    "name": "[v3,6/6] examples/kni: improve zeroing statistics",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f596d91eadc0abfe1a32e599b20a2eacbf8f8ea1",
    "submitter": {
        "id": 1040,
        "url": "http://patches.dpdk.org/api/people/1040/?format=api",
        "name": "Dan Gora",
        "email": "dg@adax.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180927003256.6901-7-dg@adax.com/mbox/",
    "series": [
        {
            "id": 1530,
            "url": "http://patches.dpdk.org/api/series/1530/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1530",
            "date": "2018-09-27T00:32:50",
            "name": "kni: add API to set link status on kernel interface",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/1530/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45471/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45471/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 B1E431B3B0;\n\tThu, 27 Sep 2018 02:34:29 +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 961EF1B396\n\tfor <dev@dpdk.org>; Thu, 27 Sep 2018 02:34:18 +0200 (CEST)",
            "by mail-qt1-f194.google.com with SMTP id l16-v6so934783qtq.10\n\tfor <dev@dpdk.org>; Wed, 26 Sep 2018 17:34:18 -0700 (PDT)",
            "from snappy.local.lan (189-46-124-178.dsl.telesp.net.br.\n\t[189.46.124.178]) by smtp.gmail.com with ESMTPSA id\n\tx26-v6sm463053qth.15.2018.09.26.17.34.15\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 26 Sep 2018 17:34:16 -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=XajtgKiqjzZQSpraVqsSiDSw1ckFngYhJNl+DiOidKw=;\n\tb=dXg14jedQ2/tM4nWsxX9jhcRBPrv8s4a0zKVp+Y0MCqYVjKqT1fKpy4xsojPv8Ybz2\n\tx3VV+k9NUnOpYRcAucuLN/9kqQnVGS5dHt7Fe5ga5cEZ9/nbJ8akEvGY0RErUj5TcEJY\n\t+/Fv1d7fnBya1Cc2tUtgurJ9Ru3WOajrhV23yOHrJN5GquVpru8hZjCDplxA4YFFPFgk\n\tQigPLJ0EF3Z5+AmEQiGwsUkx5wjQdfRYL2rvTXCuAtibLc4XR02c29Yl8ugddGV8P95p\n\t3sdTHuetb8udvsCkKzDySE6qngWvWljMcXCNmQGKAsIHu6v1SwmgHTjQ3EG6PfWUtxpn\n\tHilQ==",
        "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=XajtgKiqjzZQSpraVqsSiDSw1ckFngYhJNl+DiOidKw=;\n\tb=h2Mvg3EYmZdHqbU48ouwRZJhkDG3iG4ytgTneOFClaecd12ZVT1QWKaQAmx1ouk8b+\n\thsCqw6Zz4mjqvNs3YRJQKj3qldNtiqKOELDWC/KJMP8uBVOCfHsJMPz7+5sb+iBUPQlD\n\tEzQjVKUXihjpDVrY2ARZOzmvsinIDjR7cQJVMuxktqF5SmvIgLXdbEApBQAedHaRKyhl\n\t7q7Cv8rg15gx8Ii1+FbnhspGk/1SgP9aoLb1jYzETHWpRVd5D6E4s5C2SGML5S/AhFTj\n\t76mosY1hawO5QFsaWSBYAonmlXxMigw5e0X3iieDV8AFwBcJWR8a+ORSaY/aKVibnjjn\n\t6FPw==",
        "X-Gm-Message-State": "ABuFfoiFP4y87X+IQcEo2KqopKoFgozqJvsYRRrG/6TFFMvBMdsqLLRA\n\tXzf+QsYBrxY4uryOD1xCD4adfpNd",
        "X-Google-Smtp-Source": "ACcGV63NfvTmfZUIyVUx2UgdJ6Vzg9ghcUUdETJkEVqjvjNhKFoqV/TQWeK5ZesG4w7f7tc0tz9+ig==",
        "X-Received": "by 2002:ac8:34bc:: with SMTP id\n\tw57-v6mr6507747qtb.239.1538008457662; \n\tWed, 26 Sep 2018 17:34:17 -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, 26 Sep 2018 21:32:56 -0300",
        "Message-Id": "<20180927003256.6901-7-dg@adax.com>",
        "X-Mailer": "git-send-email 2.19.0",
        "In-Reply-To": "<20180927003256.6901-1-dg@adax.com>",
        "References": "<20180911232906.18352-1-dg@adax.com>\n\t<20180927003256.6901-1-dg@adax.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 6/6] 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 357cfd6fc..cda23b028 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": [
        "v3",
        "6/6"
    ]
}