From patchwork Mon Mar 27 16:29:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allain Legacy X-Patchwork-Id: 22447 X-Patchwork-Delegate: yuanhan.liu@linux.intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8900C101B; Mon, 27 Mar 2017 18:29:58 +0200 (CEST) Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by dpdk.org (Postfix) with ESMTP id A7A0C3B5 for ; Mon, 27 Mar 2017 18:29:56 +0200 (CEST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id v2RGTs1G016307 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Mon, 27 Mar 2017 09:29:54 -0700 Received: from yow-cgts4-lx.wrs.com (128.224.145.137) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.294.0; Mon, 27 Mar 2017 09:29:53 -0700 From: Allain Legacy To: , , CC: , Date: Mon, 27 Mar 2017 12:29:30 -0400 Message-ID: <20170327162930.54281-1-allain.legacy@windriver.com> X-Mailer: git-send-email 2.12.1 MIME-Version: 1.0 X-Originating-IP: [128.224.145.137] Subject: [dpdk-dev] [PATCH] vhost: change mbuf allocation logs to debug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Matt Peters The current packet buffer alloc failures of the vhost dequeue operations can flood the log system with error logs due to logging a runtime error condition within the data path. In order to prevent this condition, but still enable debugging, the logs are being changed to debug logs to ensure they are not emitted unless the CONFIG_RTE_LIBRTE_VHOST_DEBUG option is enabled. Signed-off-by: Matt Peters Signed-off-by: Allain Legacy --- lib/librte_vhost/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 337470d64..850b56082 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -901,7 +901,7 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vring_desc *descs, if (mbuf_avail == 0) { cur = rte_pktmbuf_alloc(mbuf_pool); if (unlikely(cur == NULL)) { - RTE_LOG(ERR, VHOST_DATA, "Failed to " + LOG_DEBUG(VHOST_DATA, "Failed to " "allocate memory for mbuf.\n"); return -1; } @@ -1129,7 +1129,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, pkts[i] = rte_pktmbuf_alloc(mbuf_pool); if (unlikely(pkts[i] == NULL)) { - RTE_LOG(ERR, VHOST_DATA, + LOG_DEBUG(VHOST_DATA, "Failed to allocate memory for mbuf.\n"); break; }