get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57563,
    "url": "https://patches.dpdk.org/api/patches/57563/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/29a5fde9fc18b74c9893d003e652dd14b31369d0.1565252336.git.thierry.herbelot@6wind.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": "<29a5fde9fc18b74c9893d003e652dd14b31369d0.1565252336.git.thierry.herbelot@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/29a5fde9fc18b74c9893d003e652dd14b31369d0.1565252336.git.thierry.herbelot@6wind.com",
    "date": "2019-08-08T08:22:13",
    "name": "[19.11,V3,08/12] virtio: fix rx stats with vectorized functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "63f6a63dae6295f1cfca16db35f8c12773df458c",
    "submitter": {
        "id": 897,
        "url": "https://patches.dpdk.org/api/people/897/?format=api",
        "name": "Thierry Herbelot",
        "email": "thierry.herbelot@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/29a5fde9fc18b74c9893d003e652dd14b31369d0.1565252336.git.thierry.herbelot@6wind.com/mbox/",
    "series": [
        {
            "id": 5981,
            "url": "https://patches.dpdk.org/api/series/5981/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5981",
            "date": "2019-08-08T08:22:05",
            "name": "Miscellaneous fixes",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/5981/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/57563/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/57563/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 696F84CA9;\n\tThu,  8 Aug 2019 10:23:12 +0200 (CEST)",
            "from mail-wm1-f65.google.com (mail-wm1-f65.google.com\n\t[209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 63F872082\n\tfor <dev@dpdk.org>; Thu,  8 Aug 2019 10:22:59 +0200 (CEST)",
            "by mail-wm1-f65.google.com with SMTP id p74so1472533wme.4\n\tfor <dev@dpdk.org>; Thu, 08 Aug 2019 01:22:59 -0700 (PDT)",
            "from ascain.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\tt13sm111437018wrr.0.2019.08.08.01.22.57\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 08 Aug 2019 01:22:58 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:in-reply-to:references;\n\tbh=/wwyBWtHvE0iti6aeLOKXJyfmprdVMD/mYawrC3wwNg=;\n\tb=Yeukic7Pu3vN0/cjWS2WwWNutu7at0UWTMfcdIN0vARF2vG6kcweLx1uQxQOM1APWm\n\tV+whRfO/SZ/SLgNFEsSW6G8QrG+kq3vmoqwO05dBnaHYVwm9cCGh6GA5m5DGdlFHUF8I\n\tTPddNwq41AUMoyB7uUibKkhH6neHDzjcZYgOxrNub7K1t2NXb1qPevRc+rsxoLmr7zN9\n\tnk0SJGVzkWjVUsn9YwQnBXtxHC9Egj1eeZkeAS/tu2oomxQqOQov2IwN4StCTXOGtca3\n\tdLDVrALOTMo5dRh2M7oDUY4meGQ9JmqzULbMuj80z2/pNXTL8Zi0vG+6Dc7imMpKZ7s2\n\tMOxQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:in-reply-to:references;\n\tbh=/wwyBWtHvE0iti6aeLOKXJyfmprdVMD/mYawrC3wwNg=;\n\tb=L8yd3EBOhTzojVRB5BlmIkFcp6/C/rY0UmuQQdKvR+WdvH1XRsQfBzPJDW4jKsrbgc\n\tSx4NcQvRDqrS3NTTP+yFqKmTUkmKMAL0Xcxj8/GcADpbYQNP28ipVya6FJfofScvSoji\n\t/r0wwJIEO8mdrnF34HnfkZ44KP+GdXWgChFSdK8UhALSa+/Jg/Y+iqcO45kRZyAcHoST\n\tlAdXb8Sccu/pPHpI8bajU20L1pIuCxMII+TfxaukUjr80am8PLn+H3UwoN1wDFc8GHzK\n\tSR7l9UayXHO1jmS/x0sej8XqO9I2qWlLtwOiuQzFd7Pcx4WF8BieVIIDRYRc2h1X1TQY\n\tgq/Q==",
        "X-Gm-Message-State": "APjAAAXCWDMdfchNfnGcnn6Wy03jX7thMHVXO79G/JlOEVwy9dCDr2GC\n\taMhy7OrYM3Guiv4gXmbSmTJzcfl+qA==",
        "X-Google-Smtp-Source": "APXvYqz1xLgw6xGINocMEvV1m502E2Ri8dT5FHjVcBhm79GhIhHPYTPsqhR1iRYCtv357/9GEP9HZg==",
        "X-Received": "by 2002:a1c:cb43:: with SMTP id b64mr2964363wmg.86.1565252578794;\n\tThu, 08 Aug 2019 01:22:58 -0700 (PDT)",
        "From": "Thierry Herbelot <thierry.herbelot@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Thibaut Collet <thibaut.collet@6wind.com>, stable@dpdk.org,\n\tThomas Monjalon <thomas@monjalon.net>",
        "Date": "Thu,  8 Aug 2019 10:22:13 +0200",
        "Message-Id": "<29a5fde9fc18b74c9893d003e652dd14b31369d0.1565252336.git.thierry.herbelot@6wind.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": [
            "<cover.1565252336.git.thierry.herbelot@6wind.com>",
            "<cover.1565252336.git.thierry.herbelot@6wind.com>"
        ],
        "References": [
            "<cover.1565252336.git.thierry.herbelot@6wind.com>",
            "<cover.1565190405.git.thierry.herbelot@6wind.com>\n\t<cover.1565252336.git.thierry.herbelot@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH 19.11 V3 08/12] virtio: fix rx stats with\n\tvectorized functions",
        "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": "From: Thibaut Collet <thibaut.collet@6wind.com>\n\nWith vectorized functions, only the rx stats for number of packets is\nincremented.\nUpdate also the other statistics.\nPerformance impact is about 2%\n\nFixes: fc3d66212fed (\"virtio: add vector Rx\")\nCc: stable@dpdk.org\n\nSigned-off-by: Thibaut Collet <thibaut.collet@6wind.com>\n---\n drivers/net/virtio/virtio_rxtx.c             | 2 +-\n drivers/net/virtio/virtio_rxtx.h             | 2 ++\n drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +++++\n drivers/net/virtio/virtio_rxtx_simple_sse.c  | 5 +++++\n 4 files changed, 13 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c\nindex 27ead19fbe81..6dd62bf51863 100644\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -1083,7 +1083,7 @@ virtio_discard_rxbuf_inorder(struct virtqueue *vq, struct rte_mbuf *m)\n \t}\n }\n \n-static inline void\n+void\n virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)\n {\n \tuint32_t s = mbuf->pkt_len;\ndiff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h\nindex 685cc4f8104c..1eb8dae227ee 100644\n--- a/drivers/net/virtio/virtio_rxtx.h\n+++ b/drivers/net/virtio/virtio_rxtx.h\n@@ -59,5 +59,7 @@ struct virtnet_ctl {\n };\n \n int virtio_rxq_vec_setup(struct virtnet_rx *rxvq);\n+void virtio_update_packet_stats(struct virtnet_stats *stats,\n+\t\t\t\tstruct rte_mbuf *mbuf);\n \n #endif /* _VIRTIO_RXTX_H_ */\ndiff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c\nindex cdc2a4d28ed5..70e89fc428e0 100644\n--- a/drivers/net/virtio/virtio_rxtx_simple_neon.c\n+++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c\n@@ -47,6 +47,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,\n \tstruct vring_used_elem *rused;\n \tstruct rte_mbuf **sw_ring;\n \tstruct rte_mbuf **sw_ring_end;\n+\tstruct rte_mbuf **ref_rx_pkts;\n \tuint16_t nb_pkts_received = 0;\n \n \tuint8x16_t shuf_msk1 = {\n@@ -105,6 +106,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t\tvirtqueue_notify(vq);\n \t}\n \n+\tref_rx_pkts = rx_pkts;\n \tfor (nb_pkts_received = 0;\n \t\tnb_pkts_received < nb_used;) {\n \t\tuint64x2_t desc[RTE_VIRTIO_DESC_PER_LOOP / 2];\n@@ -204,5 +206,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,\n \tvq->vq_used_cons_idx += nb_pkts_received;\n \tvq->vq_free_cnt += nb_pkts_received;\n \trxvq->stats.packets += nb_pkts_received;\n+\tfor (nb_used = 0; nb_used < nb_pkts_received; nb_used++)\n+\t\tvirtio_update_packet_stats(&rxvq->stats, ref_rx_pkts[nb_used]);\n+\n \treturn nb_pkts_received;\n }\ndiff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c\nindex af76708d66ae..cb1610e71563 100644\n--- a/drivers/net/virtio/virtio_rxtx_simple_sse.c\n+++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c\n@@ -48,6 +48,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,\n \tstruct vring_used_elem *rused;\n \tstruct rte_mbuf **sw_ring;\n \tstruct rte_mbuf **sw_ring_end;\n+\tstruct rte_mbuf **ref_rx_pkts;\n \tuint16_t nb_pkts_received = 0;\n \t__m128i shuf_msk1, shuf_msk2, len_adjust;\n \n@@ -107,6 +108,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\t\tvirtqueue_notify(vq);\n \t}\n \n+\tref_rx_pkts = rx_pkts;\n \tfor (nb_pkts_received = 0;\n \t\tnb_pkts_received < nb_used;) {\n \t\t__m128i desc[RTE_VIRTIO_DESC_PER_LOOP / 2];\n@@ -190,5 +192,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,\n \tvq->vq_used_cons_idx += nb_pkts_received;\n \tvq->vq_free_cnt += nb_pkts_received;\n \trxvq->stats.packets += nb_pkts_received;\n+\tfor (nb_used = 0; nb_used < nb_pkts_received; nb_used++)\n+\t\tvirtio_update_packet_stats(&rxvq->stats, ref_rx_pkts[nb_used]);\n+\n \treturn nb_pkts_received;\n }\n",
    "prefixes": [
        "19.11",
        "V3",
        "08/12"
    ]
}