Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/112851/?format=api
https://patches.dpdk.org/api/patches/112851/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220616082031.5005-1-maxime.coquelin@redhat.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": "<20220616082031.5005-1-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220616082031.5005-1-maxime.coquelin@redhat.com", "date": "2022-06-16T08:20:31", "name": "vhost: rename number of available entries", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "3bb31daa4532176774e4d0b82ceea7c92fff494f", "submitter": { "id": 512, "url": "https://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220616082031.5005-1-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 23557, "url": "https://patches.dpdk.org/api/series/23557/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23557", "date": "2022-06-16T08:20:31", "name": "vhost: rename number of available entries", "version": 1, "mbox": "https://patches.dpdk.org/series/23557/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/112851/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/112851/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 55604A0093;\n\tThu, 16 Jun 2022 10:20:47 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4A32E4281E;\n\tThu, 16 Jun 2022 10:20:47 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 1D4754114F\n for <dev@dpdk.org>; Thu, 16 Jun 2022 10:20:46 +0200 (CEST)", "from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com\n [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-408-mr30ISvfNlKrDLw5gjz0nA-1; Thu, 16 Jun 2022 04:20:35 -0400", "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com\n [10.11.54.1])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B35D81C01E81;\n Thu, 16 Jun 2022 08:20:34 +0000 (UTC)", "from max-t490s.redhat.com (unknown [10.39.208.34])\n by smtp.corp.redhat.com (Postfix) with ESMTP id D6B9040CF8E4;\n Thu, 16 Jun 2022 08:20:33 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1655367645;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=ovEmsDA8kmtCP9RsoYkgxa/InbRn+2VtCQWRrKVR3Mo=;\n b=ZDxyWCh77DwYzWgUch7lZwATmnNKs1HYF+WmVybD3w1DFasOorArYwKSyQZ+T3Ef4LoLYs\n rpmzYnTcUn3Ng9TgVMyDasA8ALc5sNRanF2DXNeEdMD1ELZG1nzP6mv7mzcDo7EEy4p4fV\n mSUr5GB/Xp2vTstrQEdfnM01YWripBc=", "X-MC-Unique": "mr30ISvfNlKrDLw5gjz0nA-1", "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "dev@dpdk.org,\n\tchenbo.xia@intel.com,\n\tdavid.marchand@redhat.com", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>", "Subject": "[PATCH] vhost: rename number of available entries", "Date": "Thu, 16 Jun 2022 10:20:31 +0200", "Message-Id": "<20220616082031.5005-1-maxime.coquelin@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.84 on 10.11.54.1", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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" }, "content": "This patchs renames the local variables free_entries to\navail_entries in the dequeue path.\n\nIndeed, this variable represents the number of new packets\navailable in the Virtio transmit queue, so these entries\nare actually used, not free.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/virtio_net.c | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)", "diff": "diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c\nindex 68a26eb17d..84cdf7e3b1 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -2774,7 +2774,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tbool legacy_ol_flags)\n {\n \tuint16_t i;\n-\tuint16_t free_entries;\n+\tuint16_t avail_entries;\n \tuint16_t dropped = 0;\n \tstatic bool allocerr_warned;\n \n@@ -2782,9 +2782,9 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t * The ordering between avail index and\n \t * desc reads needs to be enforced.\n \t */\n-\tfree_entries = __atomic_load_n(&vq->avail->idx, __ATOMIC_ACQUIRE) -\n+\tavail_entries = __atomic_load_n(&vq->avail->idx, __ATOMIC_ACQUIRE) -\n \t\t\tvq->last_avail_idx;\n-\tif (free_entries == 0)\n+\tif (avail_entries == 0)\n \t\treturn 0;\n \n \trte_prefetch0(&vq->avail->ring[vq->last_avail_idx & (vq->size - 1)]);\n@@ -2792,7 +2792,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tVHOST_LOG_DATA(DEBUG, \"(%s) %s\\n\", dev->ifname, __func__);\n \n \tcount = RTE_MIN(count, MAX_PKT_BURST);\n-\tcount = RTE_MIN(count, free_entries);\n+\tcount = RTE_MIN(count, avail_entries);\n \tVHOST_LOG_DATA(DEBUG, \"(%s) about to dequeue %u buffers\\n\",\n \t\t\tdev->ifname, count);\n \n@@ -3288,7 +3288,7 @@ virtio_dev_tx_async_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n {\n \tstatic bool allocerr_warned;\n \tbool dropped = false;\n-\tuint16_t free_entries;\n+\tuint16_t avail_entries;\n \tuint16_t pkt_idx, slot_idx = 0;\n \tuint16_t nr_done_pkts = 0;\n \tuint16_t pkt_err = 0;\n@@ -3302,9 +3302,9 @@ virtio_dev_tx_async_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t * The ordering between avail index and\n \t * desc reads needs to be enforced.\n \t */\n-\tfree_entries = __atomic_load_n(&vq->avail->idx, __ATOMIC_ACQUIRE) -\n+\tavail_entries = __atomic_load_n(&vq->avail->idx, __ATOMIC_ACQUIRE) -\n \t\t\tvq->last_avail_idx;\n-\tif (free_entries == 0)\n+\tif (avail_entries == 0)\n \t\tgoto out;\n \n \trte_prefetch0(&vq->avail->ring[vq->last_avail_idx & (vq->size - 1)]);\n@@ -3312,7 +3312,7 @@ virtio_dev_tx_async_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tasync_iter_reset(async);\n \n \tcount = RTE_MIN(count, MAX_PKT_BURST);\n-\tcount = RTE_MIN(count, free_entries);\n+\tcount = RTE_MIN(count, avail_entries);\n \tVHOST_LOG_DATA(DEBUG, \"(%s) about to dequeue %u buffers\\n\",\n \t\t\tdev->ifname, count);\n \n", "prefixes": [] }{ "id": 112851, "url": "