Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/90883/?format=api
http://patches.dpdk.org/api/patches/90883/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/5ef3d4c29927ed241c7128819fe35ac1d95d8f24.1617892982.git.bnemeth@redhat.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": "<5ef3d4c29927ed241c7128819fe35ac1d95d8f24.1617892982.git.bnemeth@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/5ef3d4c29927ed241c7128819fe35ac1d95d8f24.1617892982.git.bnemeth@redhat.com", "date": "2021-04-08T14:44:55", "name": "vhost: don't track remaining packets separately", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "21e3eb8051144657baae24aab7b9b74f32d1b4de", "submitter": { "id": 2072, "url": "http://patches.dpdk.org/api/people/2072/?format=api", "name": "Balazs Nemeth", "email": "bnemeth@redhat.com" }, "delegate": { "id": 2642, "url": "http://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/5ef3d4c29927ed241c7128819fe35ac1d95d8f24.1617892982.git.bnemeth@redhat.com/mbox/", "series": [ { "id": 16211, "url": "http://patches.dpdk.org/api/series/16211/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16211", "date": "2021-04-08T14:44:55", "name": "vhost: don't track remaining packets separately", "version": 1, "mbox": "http://patches.dpdk.org/series/16211/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/90883/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/90883/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 101A7A0579;\n\tThu, 8 Apr 2021 16:45:27 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C31511410C2;\n\tThu, 8 Apr 2021 16:45:26 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [216.205.24.124])\n by mails.dpdk.org (Postfix) with ESMTP id EAE254068B\n for <dev@dpdk.org>; Thu, 8 Apr 2021 16:45:25 +0200 (CEST)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-165-cOnXzZCuNmWRahHBNk5ltw-1; Thu, 08 Apr 2021 10:45:23 -0400", "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com\n [10.5.11.11])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 955BB108C309\n for <dev@dpdk.org>; Thu, 8 Apr 2021 14:45:22 +0000 (UTC)", "from bnemeth.users.ipa.redhat.com (ovpn-114-185.ams2.redhat.com\n [10.36.114.185])\n by smtp.corp.redhat.com (Postfix) with ESMTP id E356160636;\n Thu, 8 Apr 2021 14:45:21 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1617893125;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=dr6UtrUXQEmaxQHy9vr6LLhrtbH/ESzXQnYRlU9QMx0=;\n b=IL7fO5lkV3r2kkvvulMEHaZirc1IJQCSCZAcuQwYIeJmlDH33m4KGWY5e+sfsy0uKUlsKt\n eCcEkl7FfzF1bAau4uQK1V4ZXHoqLWjjK/yUUHxS8rVzkjVbM+xfeoeyu4bJpjZ4YQHkn/\n c0QiX/aBU5zjao1STzgOrYjbpDkovQg=", "X-MC-Unique": "cOnXzZCuNmWRahHBNk5ltw-1", "From": "Balazs Nemeth <bnemeth@redhat.com>", "To": "bnemeth@redhat.com,\n\tdev@dpdk.org", "Date": "Thu, 8 Apr 2021 16:44:55 +0200", "Message-Id": "\n <5ef3d4c29927ed241c7128819fe35ac1d95d8f24.1617892982.git.bnemeth@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=bnemeth@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"", "Subject": "[dpdk-dev] [PATCH] vhost: don't track remaining packets separately", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "The remained variable stores the same information as the difference\nbetween count and pkt_idx. Remove the remained variable to simplify.\n\nSigned-off-by: Balazs Nemeth <bnemeth@redhat.com>\n---\n lib/librte_vhost/virtio_net.c | 12 +++---------\n 1 file changed, 3 insertions(+), 9 deletions(-)", "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex e8cc5f659..cfd52360d 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -1353,16 +1353,14 @@ virtio_dev_rx_packed(struct virtio_net *dev,\n \t\t uint32_t count)\n {\n \tuint32_t pkt_idx = 0;\n-\tuint32_t remained = count;\n \n \tdo {\n \t\trte_prefetch0(&vq->desc_packed[vq->last_avail_idx]);\n \n-\t\tif (remained >= PACKED_BATCH_SIZE) {\n+\t\tif (count - pkt_idx >= PACKED_BATCH_SIZE) {\n \t\t\tif (!virtio_dev_rx_batch_packed(dev, vq,\n \t\t\t\t\t\t\t&pkts[pkt_idx])) {\n \t\t\t\tpkt_idx += PACKED_BATCH_SIZE;\n-\t\t\t\tremained -= PACKED_BATCH_SIZE;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t}\n@@ -1370,7 +1368,6 @@ virtio_dev_rx_packed(struct virtio_net *dev,\n \t\tif (virtio_dev_rx_single_packed(dev, vq, pkts[pkt_idx]))\n \t\t\tbreak;\n \t\tpkt_idx++;\n-\t\tremained--;\n \n \t} while (pkt_idx < count);\n \n@@ -2480,12 +2477,11 @@ virtio_dev_tx_packed(struct virtio_net *dev,\n \tdo {\n \t\trte_prefetch0(&vq->desc_packed[vq->last_avail_idx]);\n \n-\t\tif (remained >= PACKED_BATCH_SIZE) {\n+\t\tif (count - pkt_idx >= PACKED_BATCH_SIZE) {\n \n \t\t\tif (!virtio_dev_tx_batch_packed(dev, vq,\n \t\t\t\t\t\t\t&pkts[pkt_idx])) {\n \t\t\t\tpkt_idx += PACKED_BATCH_SIZE;\n-\t\t\t\tremained -= PACKED_BATCH_SIZE;\n \n \t\t\t\tcontinue;\n \t\t\t}\n@@ -2496,9 +2492,7 @@ virtio_dev_tx_packed(struct virtio_net *dev,\n \t\t\tbreak;\n \t\t}\n \t\tpkt_idx++;\n-\t\tremained--;\n-\n-\t} while (remained);\n+\t} while (pkt_idx < count);\n \n \tif (pkt_idx != count) {\n \t\trte_pktmbuf_free_bulk(&pkts[pkt_idx], count - pkt_idx);\n", "prefixes": [] }{ "id": 90883, "url": "