Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41473/?format=api
http://patchwork.dpdk.org/api/patches/41473/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180625151710.29437-5-yong.liu@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20180625151710.29437-5-yong.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180625151710.29437-5-yong.liu@intel.com", "date": "2018-06-25T15:17:06", "name": "[v2,4/8] net/virtio: free IN_ORDER descriptors before device start", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1836f1121ee1b43d83506565f0b4762b66132619", "submitter": { "id": 17, "url": "http://patchwork.dpdk.org/api/people/17/?format=api", "name": "Marvin Liu", "email": "yong.liu@intel.com" }, "delegate": { "id": 2642, "url": "http://patchwork.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180625151710.29437-5-yong.liu@intel.com/mbox/", "series": [ { "id": 223, "url": "http://patchwork.dpdk.org/api/series/223/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=223", "date": "2018-06-25T15:17:02", "name": "support VIRTIO_F_IN_ORDER feature", "version": 2, "mbox": "http://patchwork.dpdk.org/series/223/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/41473/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/41473/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AEBDA1B059;\n\tMon, 25 Jun 2018 09:31:33 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 184535F32\n\tfor <dev@dpdk.org>; Mon, 25 Jun 2018 09:31:28 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jun 2018 00:31:27 -0700", "from dpdk-test32.sh.intel.com ([10.67.119.193])\n\tby fmsmga006.fm.intel.com with ESMTP; 25 Jun 2018 00:31:14 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,269,1526367600\"; d=\"scan'208\";a=\"240338571\"", "From": "Marvin Liu <yong.liu@intel.com>", "To": "maxime.coquelin@redhat.com,\n\ttiwei.bie@intel.com", "Cc": "zhihong.wang@intel.com,\n\tdev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>", "Date": "Mon, 25 Jun 2018 23:17:06 +0800", "Message-Id": "<20180625151710.29437-5-yong.liu@intel.com>", "X-Mailer": "git-send-email 2.17.0", "In-Reply-To": "<20180625151710.29437-1-yong.liu@intel.com>", "References": "<20180625151710.29437-1-yong.liu@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 4/8] net/virtio: free IN_ORDER descriptors\n\tbefore device start", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add new function for freeing IN_ORDER descriptors. As descriptors will\nbe allocated and freed sequentially when IN_ORDER feature was\nnegotiated. There will be no need to utilize chain for freed descriptors\nmanagement, only index update is enough.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>", "diff": "diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c\nindex 92fab2174..0bca29855 100644\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -47,6 +47,13 @@ virtio_dev_rx_queue_done(void *rxq, uint16_t offset)\n \treturn VIRTQUEUE_NUSED(vq) >= offset;\n }\n \n+void\n+vq_ring_free_inorder(struct virtqueue *vq, uint16_t desc_idx, uint16_t num)\n+{\n+\tvq->vq_free_cnt += num;\n+\tvq->vq_desc_tail_idx = desc_idx & (vq->vq_nentries - 1);\n+}\n+\n void\n vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx)\n {\ndiff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c\nindex a7d0a9cbe..56a77cc71 100644\n--- a/drivers/net/virtio/virtqueue.c\n+++ b/drivers/net/virtio/virtqueue.c\n@@ -74,6 +74,14 @@ virtqueue_rxvq_flush(struct virtqueue *vq)\n \t\t\tdesc_idx = used_idx;\n \t\t\trte_pktmbuf_free(vq->sw_ring[desc_idx]);\n \t\t\tvq->vq_free_cnt++;\n+\t\t} else if (hw->use_inorder_rx) {\n+\t\t\tdesc_idx = (uint16_t)uep->id;\n+\t\t\tdxp = &vq->vq_descx[desc_idx];\n+\t\t\tif (dxp->cookie != NULL) {\n+\t\t\t\trte_pktmbuf_free(dxp->cookie);\n+\t\t\t\tdxp->cookie = NULL;\n+\t\t\t}\n+\t\t\tvq_ring_free_inorder(vq, desc_idx, 1);\n \t\t} else {\n \t\t\tdesc_idx = (uint16_t)uep->id;\n \t\t\tdxp = &vq->vq_descx[desc_idx];\ndiff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h\nindex 14364f356..26518ed98 100644\n--- a/drivers/net/virtio/virtqueue.h\n+++ b/drivers/net/virtio/virtqueue.h\n@@ -306,6 +306,8 @@ virtio_get_queue_type(struct virtio_hw *hw, uint16_t vtpci_queue_idx)\n #define VIRTQUEUE_NUSED(vq) ((uint16_t)((vq)->vq_ring.used->idx - (vq)->vq_used_cons_idx))\n \n void vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx);\n+void vq_ring_free_inorder(struct virtqueue *vq, uint16_t desc_idx,\n+\t\t\t uint16_t num);\n \n static inline void\n vq_update_avail_idx(struct virtqueue *vq)\n", "prefixes": [ "v2", "4/8" ] }{ "id": 41473, "url": "