get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64313,
    "url": "http://patches.dpdk.org/api/patches/64313/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200109031559.63194-5-huwei013@chinasoftinc.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": "<20200109031559.63194-5-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200109031559.63194-5-huwei013@chinasoftinc.com",
    "date": "2020-01-09T03:15:52",
    "name": "[04/11] net/hns3: remove io rmb call in Rx operation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "581808043f457f8e37bbd57444c36af125c52c41",
    "submitter": {
        "id": 1537,
        "url": "http://patches.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200109031559.63194-5-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 8023,
            "url": "http://patches.dpdk.org/api/series/8023/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8023",
            "date": "2020-01-09T03:15:48",
            "name": "misc updates and fixes for hns3 PMD driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8023/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64313/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64313/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EBD59A04F3;\n\tThu,  9 Jan 2020 04:23:44 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1DCC61DB39;\n\tThu,  9 Jan 2020 04:23:39 +0100 (CET)",
            "from incedge.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id B617A1D51A\n for <dev@dpdk.org>; Thu,  9 Jan 2020 04:23:35 +0100 (CET)",
            "from mail.chinasoftinc.com (inccas002.ito.icss [10.168.0.52]) by\n incedge.chinasoftinc.com with ESMTP id LA68yvpjVfpodKj0 (version=TLSv1\n cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO) for <dev@dpdk.org>;\n Thu, 09 Jan 2020 11:22:48 +0800 (CST)",
            "from localhost.localdomain (203.160.91.226) by INCCAS002.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.439.0; Thu, 9 Jan 2020\n 11:16:11 +0800"
        ],
        "X-ASG-Debug-ID": "1578540010-0a3dd116d004ca0011-TfluYd",
        "X-Barracuda-Envelope-From": "huwei013@chinasoftinc.com",
        "X-Barracuda-RBL-Trusted-Forwarder": [
            "10.168.0.52",
            "10.168.0.60"
        ],
        "X-ASG-Whitelist": "Client",
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Thu, 9 Jan 2020 11:15:52 +0800",
        "X-ASG-Orig-Subj": "[PATCH 04/11] net/hns3: remove io rmb call in Rx operation",
        "Message-ID": "<20200109031559.63194-5-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20200109031559.63194-1-huwei013@chinasoftinc.com>",
        "References": "<20200109031559.63194-1-huwei013@chinasoftinc.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[203.160.91.226]",
        "X-Barracuda-Connect": "inccas002.ito.icss[10.168.0.52]",
        "X-Barracuda-Start-Time": "1578540167",
        "X-Barracuda-Encrypted": "ECDHE-RSA-AES256-SHA",
        "X-Barracuda-URL": "https://spam.chinasoftinc.com:443/cgi-mod/mark.cgi",
        "X-Virus-Scanned": "by bsmtpd at chinasoftinc.com",
        "X-Barracuda-Scan-Msg-Size": "4479",
        "Subject": "[dpdk-dev] [PATCH 04/11] net/hns3: remove io rmb call in Rx\n\toperation",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: \"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>\n\nWhen receiving a packet, hns3 hardware network engine firstly writes the\npacket content to the memory pointed by the 'addr' field of the Rx Buffer\nDescriptor, secondly fills the result of parsing the packet include the\nvalid field into the Rx Buffer Decriptor in one write operation, and\nthirdly writes the number of the Buffer Descriptor not processed by the\ndriver to the HNS3_RING_RX_FBDNUM_REG register.\n\nThis patch optimizes the Rx performance by removing one rte_io_rmb call\nin the '.rx_pkt_burst' ops implementation function named hns3_recv_pkts.\nThe change as follows:\n1. Driver no longer read HNS3_RING_RX_FBDNUM_REG register, so remove one\n   rte_io_rmb call, and directly read the valid flag of Rx Buffer\n   Descriptor to check whether the BD is ready.\n2. Delete the non_vld_descs field from the statistic information of the\n   hns3 driver because now it has become a common case that the valid flag\n   of Rx Buffer Descriptor read by the driver is invalid.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_rxtx.c  | 12 +++---------\n drivers/net/hns3/hns3_rxtx.h  |  1 -\n drivers/net/hns3/hns3_stats.c |  3 ---\n 3 files changed, 3 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex 34919cd2c..a1655e246 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -1174,7 +1174,6 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,\n \trxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET +\n \t\t\t\tidx * HNS3_TQP_REG_SIZE);\n \trxq->rx_buf_len = hw->rx_buf_len;\n-\trxq->non_vld_descs = 0;\n \trxq->l2_errors = 0;\n \trxq->pkt_len_errors = 0;\n \trxq->l3_csum_erros = 0;\n@@ -1421,7 +1420,6 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \tuint16_t pkt_len;\n \tuint16_t nb_rx;\n \tuint16_t rx_id;\n-\tint num;                        /* num of desc in ring */\n \tint ret;\n \n \tnb_rx = 0;\n@@ -1435,15 +1433,11 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \tlast_seg = rxq->pkt_last_seg;\n \tsw_ring = rxq->sw_ring;\n \n-\t/* Get num of packets in descriptor ring */\n-\tnum = hns3_read_dev(rxq, HNS3_RING_RX_FBDNUM_REG);\n-\twhile (nb_rx_bd < num && nb_rx < nb_pkts) {\n+\twhile (nb_rx < nb_pkts) {\n \t\trxdp = &rx_ring[rx_id];\n \t\tbd_base_info = rte_le_to_cpu_32(rxdp->rx.bd_base_info);\n-\t\tif (unlikely(!hns3_get_bit(bd_base_info, HNS3_RXD_VLD_B))) {\n-\t\t\trxq->non_vld_descs++;\n+\t\tif (unlikely(!hns3_get_bit(bd_base_info, HNS3_RXD_VLD_B)))\n \t\t\tbreak;\n-\t\t}\n \n \t\tnmb = rte_mbuf_raw_alloc(rxq->mb_pool);\n \t\tif (unlikely(nmb == NULL)) {\n@@ -1454,7 +1448,7 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \t\tnb_rx_bd++;\n \t\trxe = &sw_ring[rx_id];\n \t\trx_id++;\n-\t\tif (rx_id == rxq->nb_rx_desc)\n+\t\tif (unlikely(rx_id == rxq->nb_rx_desc))\n \t\t\trx_id = 0;\n \n \t\trte_prefetch0(sw_ring[rx_id].mbuf);\ndiff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h\nindex a042c9902..943c6d8bb 100644\n--- a/drivers/net/hns3/hns3_rxtx.h\n+++ b/drivers/net/hns3/hns3_rxtx.h\n@@ -245,7 +245,6 @@ struct hns3_rx_queue {\n \tbool rx_deferred_start; /* don't start this queue in dev start */\n \tbool configured;        /* indicate if rx queue has been configured */\n \n-\tuint64_t non_vld_descs; /* num of non valid rx descriptors */\n \tuint64_t l2_errors;\n \tuint64_t pkt_len_errors;\n \tuint64_t l3_csum_erros;\ndiff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c\nindex 9948beb17..b3797ec53 100644\n--- a/drivers/net/hns3/hns3_stats.c\n+++ b/drivers/net/hns3/hns3_stats.c\n@@ -219,8 +219,6 @@ static const struct hns3_xstats_name_offset hns3_reset_stats_strings[] = {\n \n /* The statistic of errors in Rx BD */\n static const struct hns3_xstats_name_offset hns3_rx_bd_error_strings[] = {\n-\t{\"NONE_VALIDATED_DESCRIPTORS\",\n-\t\tHNS3_RX_BD_ERROR_STATS_FIELD_OFFSET(non_vld_descs)},\n \t{\"RX_PKT_LEN_ERRORS\",\n \t\tHNS3_RX_BD_ERROR_STATS_FIELD_OFFSET(pkt_len_errors)},\n \t{\"L2_RX_ERRORS\",\n@@ -510,7 +508,6 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)\n \t\trxq = eth_dev->data->rx_queues[i];\n \t\tif (rxq) {\n \t\t\trxq->pkt_len_errors = 0;\n-\t\t\trxq->non_vld_descs = 0;\n \t\t\trxq->l2_errors = 0;\n \t\t\trxq->l3_csum_erros = 0;\n \t\t\trxq->l4_csum_erros = 0;\n",
    "prefixes": [
        "04/11"
    ]
}