Show a patch.

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

{
    "id": 43324,
    "url": "http://patches.dpdk.org/api/patches/43324/",
    "web_url": "http://patches.dpdk.org/patch/43324/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180724210853.22767-3-stephen@networkplumber.org>",
    "date": "2018-07-24T21:08:51",
    "name": "[2/4] netvsc: avoid over filling receive descriptor ring",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7e3e311c3de4077cc2aa443f0074643c1b9db0e9",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/43324/mbox/",
    "series": [
        {
            "id": 748,
            "url": "http://patches.dpdk.org/api/series/748/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=748",
            "date": "2018-07-24T21:08:49",
            "name": "netvsc PMD performance fixes",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/748/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43324/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43324/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "To": "dev@dpdk.org",
        "X-Google-Smtp-Source": "AAOMgpdp9CJgzgvgI2DHJoM8Bj+zoghpqYeFUQ0WK8seI73YPLKbfPPaZILIA8yxHkVrkMzsxERNpg==",
        "Message-Id": "<20180724210853.22767-3-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.18.0",
        "X-Gm-Message-State": "AOUpUlEVqqBsacl4TO1kIqFOLiTUjq87NCUANPIW5Hk0ixO7mZuYBlcY\n\tnyGvU39h/bh1wV6xAAQx13ZUhbp6E4Y=",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=yHt9YJuJcyEK2HJIGZV9Dkagkz2DrDkARcf3uX8fVI4=;\n\tb=c+SmaiQryf4Ih66TdbhElQMmRuzaCyDRitIRAy64pmDrkIF/T/nSKxWSqDg9qN5SsQ\n\tZqiX52Wa6R9gD4nGYWbsLqaHrtAAhtjU9bCAlXlFKegt9LD17zB7Un4CfhumtJRQGWhC\n\tBEWVTEMJL75LZpCEd0sR3WeMnJBGIAU4EttUL66cwuX03wtPfL96vS9iHAE6u3Z+wuEI\n\tMAaQN/vD+iLbLw1jtVDEyJaVPRn/z2JjPROrLlzT9VEJ4G2Vz7vTRriPC3PLtdKtpfvF\n\t4/M9yGqHaxiKa4FwhWiz3mFvgLHeej02PjfW81JbmY1HUFUn4yBy8VuLwSHp4HuiNvL2\n\tRtEA==",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-BeenThere": "dev@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D49793250;\n\tTue, 24 Jul 2018 23:09:10 +0200 (CEST)",
            "from mail-pg1-f196.google.com (mail-pg1-f196.google.com\n\t[209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 706162C15\n\tfor <dev@dpdk.org>; Tue, 24 Jul 2018 23:09:05 +0200 (CEST)",
            "by mail-pg1-f196.google.com with SMTP id z8-v6so3720454pgu.8\n\tfor <dev@dpdk.org>; Tue, 24 Jul 2018 14:09:05 -0700 (PDT)",
            "from xeon-e3.wavecable.com (204-195-22-127.wavecable.com.\n\t[204.195.22.127]) by smtp.gmail.com with ESMTPSA id\n\td11-v6sm16921161pfo.135.2018.07.24.14.09.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 24 Jul 2018 14:09:03 -0700 (PDT)"
        ],
        "Subject": "[dpdk-dev] [PATCH 2/4] netvsc: avoid over filling receive\n\tdescriptor ring",
        "In-Reply-To": "<20180724210853.22767-1-stephen@networkplumber.org>",
        "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-Post": "<mailto:dev@dpdk.org>",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n\tStephen Hemminger <sthemmin@microsoft.com>",
        "Precedence": "list",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "X-Received": "by 2002:a63:6c05:: with SMTP id\n\th5-v6mr18035154pgc.367.1532466544129; \n\tTue, 24 Jul 2018 14:09:04 -0700 (PDT)",
        "References": "<20180724210853.22767-1-stephen@networkplumber.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Delivered-To": "patchwork@dpdk.org",
        "Date": "Tue, 24 Jul 2018 14:08:51 -0700",
        "X-Mailman-Version": "2.1.15",
        "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;\n\tbh=yHt9YJuJcyEK2HJIGZV9Dkagkz2DrDkARcf3uX8fVI4=;\n\tb=Fs3PVOO5DL+d4KLcp9Bxj0MxPe0Z6xHP+AhtvP84AXpBLSMseAN8nILbHYVZgiKO22\n\tNqUuew1V2CrwDk9ifw/1aQYmgU+feg7053bxTuDsem1zP68wmaK436OcuVbF7SS3GjTO\n\tDu1OvT0pj+eaWNqrQLvUYyVENGXp85DFYl2cUqnkf/8h1kfFFLsq9hAf1s3ciLjmOgJY\n\tA6B9DQfmBrLV4y1o2bd0vDiJvPuDW7fy2FPAPGmx1fHI3lwEnN9yXOd9ZA9osSrrVPMN\n\t8ImfFjvkMnYrdSg2yfXZIU4UVUDqrpBk/ljHrlYiM4bwSWUj4dL64PXIipzOv4xud/cA\n\trevw=="
    },
    "content": "If the number of packets requested are already present in the\nrx_ring then skip reading the ring buffer from the host.\n\nIf the ring between the poll and receive side is full, then don't\npoll (let incoming packets stay on host).\n\nIf no more transmit descriptors are available, then still try and\nflush any outstanding data.\n\nSigned-off-by: Stephen Hemminger <sthemmin@microsoft.com>\n---\n drivers/net/netvsc/hn_rxtx.c | 15 ++++++++-------\n 1 file changed, 8 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c\nindex 9a2dd9cb1beb..1aff64ee3ae5 100644\n--- a/drivers/net/netvsc/hn_rxtx.c\n+++ b/drivers/net/netvsc/hn_rxtx.c\n@@ -878,11 +878,11 @@ void hn_process_events(struct hn_data *hv, uint16_t queue_id)\n \t\t\tPMD_DRV_LOG(ERR, \"unknown chan pkt %u\", pkt->type);\n \t\t\tbreak;\n \t\t}\n+\n+\t\tif (rxq->rx_ring && rte_ring_full(rxq->rx_ring))\n+\t\t\tbreak;\n \t}\n \trte_spinlock_unlock(&rxq->ring_lock);\n-\n-\tif (unlikely(ret != -EAGAIN))\n-\t\tPMD_DRV_LOG(ERR, \"channel receive failed: %d\", ret);\n }\n \n static void hn_append_to_chim(struct hn_tx_queue *txq,\n@@ -1248,7 +1248,7 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \n \t\t\tpkt = hn_try_txagg(hv, txq, pkt_size);\n \t\t\tif (unlikely(!pkt))\n-\t\t\t\tgoto fail;\n+\t\t\t\tbreak;\n \n \t\t\thn_encap(pkt, txq->queue_id, m);\n \t\t\thn_append_to_chim(txq, pkt, m);\n@@ -1269,7 +1269,7 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \t\t\t} else {\n \t\t\t\ttxd = hn_new_txd(hv, txq);\n \t\t\t\tif (unlikely(!txd))\n-\t\t\t\t\tgoto fail;\n+\t\t\t\t\tbreak;\n \t\t\t}\n \n \t\t\tpkt = txd->rndis_pkt;\n@@ -1310,8 +1310,9 @@ hn_recv_pkts(void *prxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \tif (unlikely(hv->closed))\n \t\treturn 0;\n \n-\t/* Get all outstanding receive completions */\n-\thn_process_events(hv, rxq->queue_id);\n+\t/* If ring is empty then process more */\n+\tif (rte_ring_count(rxq->rx_ring) < nb_pkts)\n+\t\thn_process_events(hv, rxq->queue_id);\n \n \t/* Get mbufs off staging ring */\n \treturn rte_ring_sc_dequeue_burst(rxq->rx_ring, (void **)rx_pkts,\n",
    "prefixes": [
        "2/4"
    ]
}