Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7730/?format=api
https://patches.dpdk.org/api/patches/7730/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445231772-17467-3-git-send-email-stephen@networkplumber.org/", "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": "<1445231772-17467-3-git-send-email-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/1445231772-17467-3-git-send-email-stephen@networkplumber.org", "date": "2015-10-19T05:16:09", "name": "[dpdk-dev,2/5] virtio: don't use unlikely for normal tx stuff", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "d567edb809abc2da2fddb973d24779995d07809c", "submitter": { "id": 27, "url": "https://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445231772-17467-3-git-send-email-stephen@networkplumber.org/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7730/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7730/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 488788E8B;\n\tMon, 19 Oct 2015 07:16:11 +0200 (CEST)", "from mail-pa0-f52.google.com (mail-pa0-f52.google.com\n\t[209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 375648E80\n\tfor <dev@dpdk.org>; Mon, 19 Oct 2015 07:16:07 +0200 (CEST)", "by pabrc13 with SMTP id rc13so179467234pab.0\n\tfor <dev@dpdk.org>; Sun, 18 Oct 2015 22:16:06 -0700 (PDT)", "from xeon-e3.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net.\n\t[50.53.82.155]) by smtp.gmail.com with ESMTPSA id\n\tk10sm33681035pbq.78.2015.10.18.22.16.05\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSun, 18 Oct 2015 22:16:05 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=9c0/EuTi9mwqsGDu/+HEUvAQGDLxij1VN6ykfdQTLXI=;\n\tb=TFcDm7VyPRYb2SsAqDLojg7O206BES51KJw8nuK/hN37fLN3I4PVZptSJR5z36xjzb\n\tIsXSpvXFy3eCkGwSQkJOa5mkdtlp7OkpdlHHtr8saFP76YD09mD6OVWpQSDba5QnrNO+\n\tavnprhbVAMMevW1JFkWAGjX63xynd1DK1Z3ED0eQpgs7as3h5eXA85+bnKsfLtqrfjqp\n\t7bIlCU3ei6vgnxLlw4cQXz47tjhsMIL1Z5ZAK4D5nD4W3zMldAWRrX6PsvNN4nmZTz7h\n\tju5/O6WuIUTIq2kO0GMThFUv0UbmzVpHu4PG9I3Eo+O9VePLEV0NucjeUFhQ8+aDBNZB\n\tgi+A==", "X-Gm-Message-State": "ALoCoQlCAIMfC4iDTg/JsXTVUaRJzmKGB0dUKGVHkH6YPkTvtrp3euboKmPGFLsRs9pvL2tqrs/7", "X-Received": "by 10.66.163.228 with SMTP id yl4mr32361290pab.112.1445231766602;\n\tSun, 18 Oct 2015 22:16:06 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "huawei.xie@intel.com,\n\tchangchun.ouyang@intel.com", "Date": "Sun, 18 Oct 2015 22:16:09 -0700", "Message-Id": "<1445231772-17467-3-git-send-email-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1445231772-17467-1-git-send-email-stephen@networkplumber.org>", "References": "<1445231772-17467-1-git-send-email-stephen@networkplumber.org>", "Cc": "dev@dpdk.org", "Subject": "[dpdk-dev] [PATCH 2/5] virtio: don't use unlikely for normal tx\n\tstuff", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Don't use unlikely() for VLAN or ring getting full.\nGCC will not optimize code in unlikely paths and since these can\nhappen with normal code that can hurt performance.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n drivers/net/virtio/virtio_rxtx.c | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c\nindex 5b50ed0..dbe6665 100644\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -763,7 +763,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \t\tint need = txm->nb_segs - txvq->vq_free_cnt + 1;\n \n \t\t/* Positive value indicates it need free vring descriptors */\n-\t\tif (unlikely(need > 0)) {\n+\t\tif (need > 0) {\n \t\t\tnb_used = VIRTQUEUE_NUSED(txvq);\n \t\t\tvirtio_rmb();\n \t\t\tneed = RTE_MIN(need, (int)nb_used);\n@@ -778,7 +778,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \t\t}\n \n \t\t/* Do VLAN tag insertion */\n-\t\tif (unlikely(txm->ol_flags & PKT_TX_VLAN_PKT)) {\n+\t\tif (txm->ol_flags & PKT_TX_VLAN_PKT) {\n \t\t\terror = rte_vlan_insert(&txm);\n \t\t\tif (unlikely(error)) {\n \t\t\t\trte_pktmbuf_free(txm);\n@@ -798,10 +798,9 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \t\t\tbreak;\n \t\t}\n \t\ttxvq->bytes += txm->pkt_len;\n+\t\t++txvq->packets;\n \t}\n \n-\ttxvq->packets += nb_tx;\n-\n \tif (likely(nb_tx)) {\n \t\tvq_update_avail_idx(txvq);\n \n", "prefixes": [ "dpdk-dev", "2/5" ] }{ "id": 7730, "url": "