Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/35097/?format=api
http://patches.dpdk.org/api/patches/35097/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180209172408.14976-1-tomaszx.kulasek@intel.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": "<20180209172408.14976-1-tomaszx.kulasek@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180209172408.14976-1-tomaszx.kulasek@intel.com", "date": "2018-02-09T17:24:08", "name": "[dpdk-dev] vhost: fix remove macro name conflict", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "bc812fe7fa8db5f24d5fb28977cbaac18e587544", "submitter": { "id": 155, "url": "http://patches.dpdk.org/api/people/155/?format=api", "name": "Tomasz Kulasek", "email": "tomaszx.kulasek@intel.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/20180209172408.14976-1-tomaszx.kulasek@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/35097/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/35097/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 4914C1B866;\n\tFri, 9 Feb 2018 18:25:26 +0100 (CET)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id CB6861B855;\n\tFri, 9 Feb 2018 18:25:24 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 Feb 2018 09:25:23 -0800", "from unknown (HELO Sent) ([10.103.103.74])\n\tby fmsmga001.fm.intel.com with SMTP; 09 Feb 2018 09:25:20 -0800", "by Sent (sSMTP sendmail emulation); Fri, 09 Feb 2018 18:24:16 +0100" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.46,483,1511856000\"; d=\"scan'208\";a=\"29529162\"", "From": "Tomasz Kulasek <tomaszx.kulasek@intel.com>", "To": "yliu@fridaylinux.org", "Cc": "dev@dpdk.org, huawei.xie@intel.com, stable@dpdk.org,\n\tBen Walker <benjamin.walker@intel.com>", "Date": "Fri, 9 Feb 2018 18:24:08 +0100", "Message-Id": "<20180209172408.14976-1-tomaszx.kulasek@intel.com>", "X-Mailer": "git-send-email 2.12.3", "Subject": "[dpdk-dev] [PATCH] vhost: fix remove macro name conflict", "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://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": "<https://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": "LOG_DEBUG is a symbol defined by POSIX, so if sys/log.h is\nincluded the symbols conflict.\n\nThis patch changes LOG_DEBUG to VHOST_LOG_DEBUG.\n\nFixes: 1c01d52392d5 (\"vhost: add debug print\")\nCc: huawei.xie@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Ben Walker <benjamin.walker@intel.com>\nSigned-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>\n---\n lib/librte_vhost/vhost.h | 13 +++++++------\n lib/librte_vhost/vhost_user.c | 10 +++++-----\n lib/librte_vhost/virtio_net.c | 16 ++++++++--------\n 3 files changed, 20 insertions(+), 19 deletions(-)", "diff": "diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h\nindex d947bc9e3..319cc6620 100644\n--- a/lib/librte_vhost/vhost.h\n+++ b/lib/librte_vhost/vhost.h\n@@ -296,8 +296,9 @@ vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \n #ifdef RTE_LIBRTE_VHOST_DEBUG\n #define VHOST_MAX_PRINT_BUFF 6072\n-#define LOG_LEVEL RTE_LOG_DEBUG\n-#define LOG_DEBUG(log_type, fmt, args...) RTE_LOG(DEBUG, log_type, fmt, ##args)\n+#define VHOST_LOG_LEVEL RTE_LOG_DEBUG\n+#define VHOST_LOG_DEBUG(log_type, fmt, args...) \\\n+\tRTE_LOG(DEBUG, log_type, fmt, ##args)\n #define PRINT_PACKET(device, addr, size, header) do { \\\n \tchar *pkt_addr = (char *)(addr); \\\n \tunsigned int index; \\\n@@ -313,11 +314,11 @@ vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t} \\\n \tsnprintf(packet + strnlen(packet, VHOST_MAX_PRINT_BUFF), VHOST_MAX_PRINT_BUFF - strnlen(packet, VHOST_MAX_PRINT_BUFF), \"\\n\"); \\\n \t\\\n-\tLOG_DEBUG(VHOST_DATA, \"%s\", packet); \\\n+\tVHOST_LOG_DEBUG(VHOST_DATA, \"%s\", packet); \\\n } while (0)\n #else\n-#define LOG_LEVEL RTE_LOG_INFO\n-#define LOG_DEBUG(log_type, fmt, args...) do {} while (0)\n+#define VHOST_LOG_LEVEL RTE_LOG_INFO\n+#define VHOST_LOG_DEBUG(log_type, fmt, args...) do {} while (0)\n #define PRINT_PACKET(device, addr, size, header) do {} while (0)\n #endif\n \n@@ -411,7 +412,7 @@ vhost_vring_call(struct virtio_net *dev, struct vhost_virtqueue *vq)\n \t\tuint16_t old = vq->signalled_used;\n \t\tuint16_t new = vq->last_used_idx;\n \n-\t\tLOG_DEBUG(VHOST_DATA, \"%s: used_event_idx=%d, old=%d, new=%d\\n\",\n+\t\tVHOST_LOG_DEBUG(VHOST_DATA, \"%s: used_event_idx=%d, old=%d, new=%d\\n\",\n \t\t\t__func__,\n \t\t\tvhost_used_event(vq),\n \t\t\told, new);\ndiff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 65ee33919..dc38cdeb2 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -181,7 +181,7 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features)\n \t} else {\n \t\tdev->vhost_hlen = sizeof(struct virtio_net_hdr);\n \t}\n-\tLOG_DEBUG(VHOST_CONFIG,\n+\tVHOST_LOG_DEBUG(VHOST_CONFIG,\n \t\t\"(%d) mergeable RX buffers %s, virtio 1 %s\\n\",\n \t\tdev->vid,\n \t\t(dev->features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ? \"on\" : \"off\",\n@@ -461,13 +461,13 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)\n \n \tvq->log_guest_addr = addr->log_guest_addr;\n \n-\tLOG_DEBUG(VHOST_CONFIG, \"(%d) mapped address desc: %p\\n\",\n+\tVHOST_LOG_DEBUG(VHOST_CONFIG, \"(%d) mapped address desc: %p\\n\",\n \t\t\tdev->vid, vq->desc);\n-\tLOG_DEBUG(VHOST_CONFIG, \"(%d) mapped address avail: %p\\n\",\n+\tVHOST_LOG_DEBUG(VHOST_CONFIG, \"(%d) mapped address avail: %p\\n\",\n \t\t\tdev->vid, vq->avail);\n-\tLOG_DEBUG(VHOST_CONFIG, \"(%d) mapped address used: %p\\n\",\n+\tVHOST_LOG_DEBUG(VHOST_CONFIG, \"(%d) mapped address used: %p\\n\",\n \t\t\tdev->vid, vq->used);\n-\tLOG_DEBUG(VHOST_CONFIG, \"(%d) log_guest_addr: %\" PRIx64 \"\\n\",\n+\tVHOST_LOG_DEBUG(VHOST_CONFIG, \"(%d) log_guest_addr: %\" PRIx64 \"\\n\",\n \t\t\tdev->vid, vq->log_guest_addr);\n \n \treturn dev;\ndiff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 700aca7ce..ed7198dbb 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -295,7 +295,7 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,\n \tuint16_t used_idx;\n \tuint32_t i, sz;\n \n-\tLOG_DEBUG(VHOST_DATA, \"(%d) %s\\n\", dev->vid, __func__);\n+\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) %s\\n\", dev->vid, __func__);\n \tif (unlikely(!is_valid_virt_queue_idx(queue_id, 0, dev->nr_vring))) {\n \t\tRTE_LOG(ERR, VHOST_DATA, \"(%d) %s: invalid virtqueue idx %d.\\n\",\n \t\t\tdev->vid, __func__, queue_id);\n@@ -327,7 +327,7 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,\n \tif (count == 0)\n \t\tgoto out;\n \n-\tLOG_DEBUG(VHOST_DATA, \"(%d) start_idx %d | end_idx %d\\n\",\n+\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) start_idx %d | end_idx %d\\n\",\n \t\tdev->vid, start_idx, start_idx + count);\n \n \tvq->batch_copy_nb_elems = 0;\n@@ -524,7 +524,7 @@ copy_mbuf_to_desc_mergeable(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \thdr_phys_addr = buf_vec[vec_idx].buf_addr;\n \trte_prefetch0((void *)(uintptr_t)hdr_addr);\n \n-\tLOG_DEBUG(VHOST_DATA, \"(%d) RX: num merge buffers %d\\n\",\n+\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) RX: num merge buffers %d\\n\",\n \t\tdev->vid, num_buffers);\n \n \tdesc_avail = buf_vec[vec_idx].buf_len - dev->vhost_hlen;\n@@ -620,7 +620,7 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,\n \tstruct buf_vector buf_vec[BUF_VECTOR_MAX];\n \tuint16_t avail_head;\n \n-\tLOG_DEBUG(VHOST_DATA, \"(%d) %s\\n\", dev->vid, __func__);\n+\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) %s\\n\", dev->vid, __func__);\n \tif (unlikely(!is_valid_virt_queue_idx(queue_id, 0, dev->nr_vring))) {\n \t\tRTE_LOG(ERR, VHOST_DATA, \"(%d) %s: invalid virtqueue idx %d.\\n\",\n \t\t\tdev->vid, __func__, queue_id);\n@@ -657,14 +657,14 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,\n \t\tif (unlikely(reserve_avail_buf_mergeable(dev, vq,\n \t\t\t\t\t\tpkt_len, buf_vec, &num_buffers,\n \t\t\t\t\t\tavail_head) < 0)) {\n-\t\t\tLOG_DEBUG(VHOST_DATA,\n+\t\t\tVHOST_LOG_DEBUG(VHOST_DATA,\n \t\t\t\t\"(%d) failed to get enough desc from vring\\n\",\n \t\t\t\tdev->vid);\n \t\t\tvq->shadow_used_idx -= num_buffers;\n \t\t\tbreak;\n \t\t}\n \n-\t\tLOG_DEBUG(VHOST_DATA, \"(%d) current index %d | end index %d\\n\",\n+\t\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) current index %d | end index %d\\n\",\n \t\t\tdev->vid, vq->last_avail_idx,\n \t\t\tvq->last_avail_idx + num_buffers);\n \n@@ -1224,7 +1224,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,\n \tif (free_entries == 0)\n \t\tgoto out;\n \n-\tLOG_DEBUG(VHOST_DATA, \"(%d) %s\\n\", dev->vid, __func__);\n+\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) %s\\n\", dev->vid, __func__);\n \n \t/* Prefetch available and used ring */\n \tavail_idx = vq->last_avail_idx & (vq->size - 1);\n@@ -1234,7 +1234,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,\n \n \tcount = RTE_MIN(count, MAX_PKT_BURST);\n \tcount = RTE_MIN(count, free_entries);\n-\tLOG_DEBUG(VHOST_DATA, \"(%d) about to dequeue %u buffers\\n\",\n+\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) about to dequeue %u buffers\\n\",\n \t\t\tdev->vid, count);\n \n \t/* Retrieve all of the head indexes first to avoid caching issues. */\n", "prefixes": [ "dpdk-dev" ] }{ "id": 35097, "url": "