get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105358,
    "url": "https://patches.dpdk.org/api/patches/105358/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211223083659.245766-2-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": "<20211223083659.245766-2-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211223083659.245766-2-maxime.coquelin@redhat.com",
    "date": "2021-12-23T08:36:53",
    "name": "[1/7] vhost: improve IOTLB logs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ed89932b8b5aac39cc3ed7a792667ff9abbf84a6",
    "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/20211223083659.245766-2-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 21013,
            "url": "https://patches.dpdk.org/api/series/21013/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=21013",
            "date": "2021-12-23T08:36:52",
            "name": "vhost: improve logging",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/21013/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/105358/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/105358/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 11199A0350;\n\tThu, 23 Dec 2021 09:37:40 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D124A4114D;\n\tThu, 23 Dec 2021 09:37:36 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 7A400410F1\n for <dev@dpdk.org>; Thu, 23 Dec 2021 09:37:34 +0100 (CET)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) 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-435-MPVheFg8PASUwf04KzVtBg-1; Thu, 23 Dec 2021 03:37:30 -0500",
            "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 91E28100C623;\n Thu, 23 Dec 2021 08:37:29 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.14])\n by smtp.corp.redhat.com (Postfix) with ESMTP id CC5ED5BD14;\n Thu, 23 Dec 2021 08:37:19 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1640248654;\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 in-reply-to:in-reply-to:references:references;\n bh=fplIkD8anLTw8NFD4lK3SKZi3NSH189BmPk7Zq/mF00=;\n b=P+W7reITW1XALR1GDRPLr0v6a9pAbjn96EDtHgC7V4hvWc57Rzzbrb0jz0btD5p9ZYcOyb\n 1oTg9GNSIxQZXNhVFkEpXh9rHNZkt7FrJxrqPl67eT6lJx7MXNvPT1zYCfmSggvhZzeuFv\n 8sNunLzYT/AGoec+pIPb5R/zfrZ6Yoo=",
        "X-MC-Unique": "MPVheFg8PASUwf04KzVtBg-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 1/7] vhost: improve IOTLB logs",
        "Date": "Thu, 23 Dec 2021 09:36:53 +0100",
        "Message-Id": "<20211223083659.245766-2-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20211223083659.245766-1-maxime.coquelin@redhat.com>",
        "References": "<20211223083659.245766-1-maxime.coquelin@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=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-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 patch adds IOTLB mempool name when logging debug\nor error messages, and also prepends the socket path.\nto all the logs.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/iotlb.c      | 26 +++++++++++++++-----------\n lib/vhost/iotlb.h      | 10 +++++-----\n lib/vhost/vhost.c      |  2 +-\n lib/vhost/vhost_user.c |  2 +-\n 4 files changed, 22 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/lib/vhost/iotlb.c b/lib/vhost/iotlb.c\nindex 82bdb84526..e9e1ede7a4 100644\n--- a/lib/vhost/iotlb.c\n+++ b/lib/vhost/iotlb.c\n@@ -62,7 +62,7 @@ vhost_user_iotlb_pending_miss(struct vhost_virtqueue *vq, uint64_t iova,\n }\n \n void\n-vhost_user_iotlb_pending_insert(struct vhost_virtqueue *vq,\n+vhost_user_iotlb_pending_insert(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\t\tuint64_t iova, uint8_t perm)\n {\n \tstruct vhost_iotlb_entry *node;\n@@ -70,14 +70,16 @@ vhost_user_iotlb_pending_insert(struct vhost_virtqueue *vq,\n \n \tret = rte_mempool_get(vq->iotlb_pool, (void **)&node);\n \tif (ret) {\n-\t\tVHOST_LOG_CONFIG(DEBUG, \"IOTLB pool empty, clear entries\\n\");\n+\t\tVHOST_LOG_CONFIG(DEBUG, \"(%s) IOTLB pool %s empty, clear entries\\n\",\n+\t\t\t\tdev->ifname, vq->iotlb_pool->name);\n \t\tif (!TAILQ_EMPTY(&vq->iotlb_pending_list))\n \t\t\tvhost_user_iotlb_pending_remove_all(vq);\n \t\telse\n \t\t\tvhost_user_iotlb_cache_random_evict(vq);\n \t\tret = rte_mempool_get(vq->iotlb_pool, (void **)&node);\n \t\tif (ret) {\n-\t\t\tVHOST_LOG_CONFIG(ERR, \"IOTLB pool still empty, failure\\n\");\n+\t\t\tVHOST_LOG_CONFIG(ERR, \"(%s) IOTLB pool %s still empty, failure\\n\",\n+\t\t\t\t\tdev->ifname, vq->iotlb_pool->name);\n \t\t\treturn;\n \t\t}\n \t}\n@@ -156,22 +158,25 @@ vhost_user_iotlb_cache_random_evict(struct vhost_virtqueue *vq)\n }\n \n void\n-vhost_user_iotlb_cache_insert(struct vhost_virtqueue *vq, uint64_t iova,\n-\t\t\t\tuint64_t uaddr, uint64_t size, uint8_t perm)\n+vhost_user_iotlb_cache_insert(struct virtio_net *dev, struct vhost_virtqueue *vq,\n+\t\t\t\tuint64_t iova, uint64_t uaddr,\n+\t\t\t\tuint64_t size, uint8_t perm)\n {\n \tstruct vhost_iotlb_entry *node, *new_node;\n \tint ret;\n \n \tret = rte_mempool_get(vq->iotlb_pool, (void **)&new_node);\n \tif (ret) {\n-\t\tVHOST_LOG_CONFIG(DEBUG, \"IOTLB pool empty, clear entries\\n\");\n+\t\tVHOST_LOG_CONFIG(DEBUG, \"(%s) IOTLB pool %s empty, clear entries\\n\",\n+\t\t\t\tdev->ifname, vq->iotlb_pool->name);\n \t\tif (!TAILQ_EMPTY(&vq->iotlb_list))\n \t\t\tvhost_user_iotlb_cache_random_evict(vq);\n \t\telse\n \t\t\tvhost_user_iotlb_pending_remove_all(vq);\n \t\tret = rte_mempool_get(vq->iotlb_pool, (void **)&new_node);\n \t\tif (ret) {\n-\t\t\tVHOST_LOG_CONFIG(ERR, \"IOTLB pool still empty, failure\\n\");\n+\t\t\tVHOST_LOG_CONFIG(ERR, \"(%s) IOTLB pool %s still empty, failure\\n\",\n+\t\t\t\t\tdev->ifname, vq->iotlb_pool->name);\n \t\t\treturn;\n \t\t}\n \t}\n@@ -311,7 +316,7 @@ vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)\n \n \tsnprintf(pool_name, sizeof(pool_name), \"iotlb_%u_%d_%d\",\n \t\t\tgetpid(), dev->vid, vq_index);\n-\tVHOST_LOG_CONFIG(DEBUG, \"IOTLB cache name: %s\\n\", pool_name);\n+\tVHOST_LOG_CONFIG(DEBUG, \"(%s) IOTLB cache name: %s\\n\", dev->ifname, pool_name);\n \n \t/* If already created, free it and recreate */\n \tvq->iotlb_pool = rte_mempool_lookup(pool_name);\n@@ -324,9 +329,8 @@ vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)\n \t\t\tRTE_MEMPOOL_F_NO_CACHE_ALIGN |\n \t\t\tRTE_MEMPOOL_F_SP_PUT);\n \tif (!vq->iotlb_pool) {\n-\t\tVHOST_LOG_CONFIG(ERR,\n-\t\t\t\t\"Failed to create IOTLB cache pool (%s)\\n\",\n-\t\t\t\tpool_name);\n+\t\tVHOST_LOG_CONFIG(ERR, \"(%s) Failed to create IOTLB cache pool (%s)\\n\",\n+\t\t\t\tdev->ifname, pool_name);\n \t\treturn -1;\n \t}\n \ndiff --git a/lib/vhost/iotlb.h b/lib/vhost/iotlb.h\nindex b6e0757ad6..8d0ff7473b 100644\n--- a/lib/vhost/iotlb.h\n+++ b/lib/vhost/iotlb.h\n@@ -33,17 +33,17 @@ vhost_user_iotlb_wr_unlock(struct vhost_virtqueue *vq)\n \trte_rwlock_write_unlock(&vq->iotlb_lock);\n }\n \n-void vhost_user_iotlb_cache_insert(struct vhost_virtqueue *vq, uint64_t iova,\n-\t\t\t\t\tuint64_t uaddr, uint64_t size,\n-\t\t\t\t\tuint8_t perm);\n+void vhost_user_iotlb_cache_insert(struct virtio_net *dev, struct vhost_virtqueue *vq,\n+\t\t\t\t\tuint64_t iova, uint64_t uaddr,\n+\t\t\t\t\tuint64_t size, uint8_t perm);\n void vhost_user_iotlb_cache_remove(struct vhost_virtqueue *vq,\n \t\t\t\t\tuint64_t iova, uint64_t size);\n uint64_t vhost_user_iotlb_cache_find(struct vhost_virtqueue *vq, uint64_t iova,\n \t\t\t\t\tuint64_t *size, uint8_t perm);\n bool vhost_user_iotlb_pending_miss(struct vhost_virtqueue *vq, uint64_t iova,\n \t\t\t\t\t\tuint8_t perm);\n-void vhost_user_iotlb_pending_insert(struct vhost_virtqueue *vq, uint64_t iova,\n-\t\t\t\t\t\tuint8_t perm);\n+void vhost_user_iotlb_pending_insert(struct virtio_net *dev, struct vhost_virtqueue *vq,\n+\t\t\t\t\t\tuint64_t iova, uint8_t perm);\n void vhost_user_iotlb_pending_remove(struct vhost_virtqueue *vq, uint64_t iova,\n \t\t\t\t\t\tuint64_t size, uint8_t perm);\n void vhost_user_iotlb_flush_all(struct vhost_virtqueue *vq);\ndiff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c\nindex 13a9bb9dd1..e52d7f7bb6 100644\n--- a/lib/vhost/vhost.c\n+++ b/lib/vhost/vhost.c\n@@ -56,7 +56,7 @@ __vhost_iova_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t */\n \t\tvhost_user_iotlb_rd_unlock(vq);\n \n-\t\tvhost_user_iotlb_pending_insert(vq, iova, perm);\n+\t\tvhost_user_iotlb_pending_insert(dev, vq, iova, perm);\n \t\tif (vhost_user_iotlb_miss(dev, iova, perm)) {\n \t\t\tVHOST_LOG_CONFIG(ERR,\n \t\t\t\t\"IOTLB miss req failed for IOVA 0x%\" PRIx64 \"\\n\",\ndiff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c\nindex a781346c4d..67934be12c 100644\n--- a/lib/vhost/vhost_user.c\n+++ b/lib/vhost/vhost_user.c\n@@ -2563,7 +2563,7 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,\n \t\t\tif (!vq)\n \t\t\t\tcontinue;\n \n-\t\t\tvhost_user_iotlb_cache_insert(vq, imsg->iova, vva,\n+\t\t\tvhost_user_iotlb_cache_insert(dev, vq, imsg->iova, vva,\n \t\t\t\t\tlen, imsg->perm);\n \n \t\t\tif (is_vring_iotlb(dev, vq, imsg))\n",
    "prefixes": [
        "1/7"
    ]
}