From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m15-45.126.com (m15-45.126.com [220.181.15.45]) by dpdk.org (Postfix) with ESMTP id 467EF2E8E for ; Tue, 19 Apr 2016 06:58:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=u8nGQ PV6T5ITJltz0uDwaakc5vkOjZ9PSKqV+Nd7r0s=; b=ZWSg6caKPocw8A4njrg8p 0QGvSVsOPzvg4pjWnmWBLBxGM6n7cE6TAK1aKlT9tdIn4kyLdnmXR5ZVbDdsG/wR qzMN26dIlvLMJmsYZaMDlaOIsY+7qDrNhQihH4TMTJFc7Zbu0TS/Fuc/F17EdVfJ 2UEzzXCV0VqhC8nspkS+eY= Received: from zhangwqh$126.com ( [69.138.24.88, 54.215.2.217, 10.144.1.72] ) by ajax-webmail-wmsvr45 (Coremail) ; Tue, 19 Apr 2016 12:58:00 +0800 (CST) X-Originating-IP: [69.138.24.88, 54.215.2.217, 10.144.1.72] Date: Tue, 19 Apr 2016 12:58:00 +0800 (CST) From: =?GBK?B?1cXOsA==?= To: "De Lara Guarch, Pablo" Cc: "Thomas Monjalon" , "Gonzalez Monroy, Sergio" , "dev@dpdk.org" , "Dhana Eadala" , "Richardson, Bruce" , "Qiu, Michael" X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20160223(81157.8522) Copyright (c) 2002-2016 www.mailtech.cn 126com In-Reply-To: References: <1457921808-14261-1-git-send-email-edreddy@gmail.com> <76801321.W6WWktetkp@xps13> X-CM-CTRLDATA: UHe8HGZvb3Rlcl9odG09NzcyNjo1Ng== MIME-Version: 1.0 Message-ID: X-Coremail-Locale: zh_CN X-CM-TRANSID: LcqowACnQGHZuhVXHj9+AA--.31584W X-CM-SenderInfo: x2kd0wxztkqiyswou0bp/1tbi7ghQ6VWni+yrngACs9 X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] rte_hash_del_key crash in multi-process environment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 04:58:08 -0000 SGkgYWxsLCAKCgpJbiB0aGUgbXVsdGktcHJvY2VzcyBlbnZpcm9ubWVudCwgYmVmb3JlIEkgbWV0 IGEgYnVnIHdoZW4gY2FsbGluZyBydGVfaGFzaF9sb29rdXBfd2l0aF9oYXNoLiBVc2luZyBEaGFu YSdzIHBhdGNoIGZpeGVkIG15IHByb2JsZW0uIE5vdyBJIG5lZWQgdG8gcmVtb3ZlIHRoZSBmbG93 IGluIHRoZSBtdWx0aS1wcm9jZXNzIGVudmlyb25tZW50LCB0aGUgc3lzdGVtIGdldHMgY3Jhc2hl ZCB3aGVuIGNhbGxpbmcgcnRlX2hhc2hfZGVsX2tleSBmdW5jdGlvbi4gVGhlIGZvbGxvd2luZyBp cyB0aGUgZ2RiIHRyYWNlLiBEb2VzIGFueWJvZHkgbWVldCB0aGlzIHByb2JsZW0gb3Iga25vdyBo b3cgdG8gZml4IGl0PwoKCgoKUHJvZ3JhbSByZWNlaXZlZCBzaWduYWwgU0lHSUxMLCBJbGxlZ2Fs IGluc3RydWN0aW9uLgoKMHgwMDAwMDAwMDAwNDhhMGRkIGluIHJ0ZV9wb3J0X3JpbmdfcmVhZGVy X2ZyYWdfZnJlZSAocG9ydD0weDdmZmUxMTNkNDEwMCkgYXQgL2hvbWUvemhhbmd3ZWkxOTg0L3Rp bW9wZW5OZXRWTS9kcGRrLTIuMi4wL2xpYi9saWJydGVfcG9ydC9ydGVfcG9ydF9mcmFnLmM6MjY2 CgoyNjYgICAgICAgICAgICByZXR1cm4gLTE7CgooZ2RiKSBid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KPj4gPiBXZSBmaXhlZCBpdCB3aXRo IHRoZSBmb2xsb3dpbmcgcGF0Y2ggYW5kIHdvdWxkIGxpa2UgdG8KPj4gPiBzdWJtaXQgdGhlIHBh dGNoIHRvIGRwZGsub3JnLgo+PiA+IFBhdGNoIGlzIGNyZWF0ZWQgc3VjaCB0aGF0LCBpZiBhbnlv bmUgd2FudGVkIHRvIHVzZSBkcGRrIGluCj4+ID4gbXVsdGktcHJvY2VzcyBlbnZpcm9ubWVudCB3 aXRoIGZ1bmN0aW9uIHBvaW50ZXJzIG5vdCBzaGFyZWQsIHRoZXkgbmVlZCB0bwo+PiA+IGRlZmlu ZSBSVEVfTElCX01QX05PX0ZVTkNfUFRSIGluIHRoZWlyIE1ha2VmaWxlLgo+PiA+IFdpdGhvdXQg ZGVmaW5pbmcgdGhpcyBmbGFnIGluIE1ha2VmaWxlLCBpdCB3b3JrcyBhcyBpdCBpcyBub3cuCj4+ IAo+PiBJbnRyb2R1Y2luZyAjaWZkZWYgUlRFX0xJQl9NUF9OT19GVU5DX1BUUiBpcyBub3QgcmVj b21tZW5kZWQuCj4K >From jianfeng.tan@intel.com Tue Apr 19 07:22:39 2016 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 345DA2BE4 for ; Tue, 19 Apr 2016 07:22:39 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 18 Apr 2016 22:22:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,505,1455004800"; d="scan'208";a="688546647" Received: from dpdk06.sh.intel.com ([10.239.128.225]) by FMSMGA003.fm.intel.com with ESMTP; 18 Apr 2016 22:22:36 -0700 From: Jianfeng Tan To: dev@dpdk.org Cc: huawei.xie@intel.com, yuanhan.liu@linux.intel.com, Jianfeng Tan Date: Tue, 19 Apr 2016 05:22:37 +0000 Message-Id: <1461043357-19162-1-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] virtio: fix newline under debug mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 05:22:39 -0000 Issue: output of appliations and debug info of DPDK may be mixed up in same line when enabling below debug options of virtio: CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DRIVER This patch adds "\n" in the tail of definitions like PMD_RX_LOG, PMD_TX_LOG, and PMD_DRV_LOG, and removes some "\n" when using these macros. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 2 +- drivers/net/virtio/virtio_logs.h | 6 +++--- drivers/net/virtio/virtio_rxtx.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 63a368a..a0ef0a1 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -827,7 +827,7 @@ virtio_mac_table_set(struct virtio_hw *hw, int err, len[2]; if (!vtpci_with_feature(hw, VIRTIO_NET_F_CTRL_MAC_ADDR)) { - PMD_DRV_LOG(INFO, "host does not support mac table\n"); + PMD_DRV_LOG(INFO, "host does not support mac table"); return; } diff --git a/drivers/net/virtio/virtio_logs.h b/drivers/net/virtio/virtio_logs.h index d6c33f7..90a79ea 100644 --- a/drivers/net/virtio/virtio_logs.h +++ b/drivers/net/virtio/virtio_logs.h @@ -47,14 +47,14 @@ #ifdef RTE_LIBRTE_VIRTIO_DEBUG_RX #define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s() rx: " fmt , __func__, ## args) + RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## args) #else #define PMD_RX_LOG(level, fmt, args...) do { } while(0) #endif #ifdef RTE_LIBRTE_VIRTIO_DEBUG_TX #define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s() tx: " fmt , __func__, ## args) + RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## args) #else #define PMD_TX_LOG(level, fmt, args...) do { } while(0) #endif @@ -62,7 +62,7 @@ #ifdef RTE_LIBRTE_VIRTIO_DEBUG_DRIVER #define PMD_DRV_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt , __func__, ## args) + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) #else #define PMD_DRV_LOG(level, fmt, args...) do { } while(0) #endif diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index ef21d8e..2dafebd 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -680,7 +680,7 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) if (unlikely(virtqueue_kick_prepare(rxvq))) { virtqueue_notify(rxvq); - PMD_RX_LOG(DEBUG, "Notified\n"); + PMD_RX_LOG(DEBUG, "Notified"); } } @@ -710,7 +710,7 @@ virtio_recv_mergeable_pkts(void *rx_queue, virtio_rmb(); - PMD_RX_LOG(DEBUG, "used:%d\n", nb_used); + PMD_RX_LOG(DEBUG, "used:%d", nb_used); hw = rxvq->hw; nb_rx = 0; @@ -733,13 +733,13 @@ virtio_recv_mergeable_pkts(void *rx_queue, i++; - PMD_RX_LOG(DEBUG, "dequeue:%d\n", num); - PMD_RX_LOG(DEBUG, "packet len:%d\n", len[0]); + PMD_RX_LOG(DEBUG, "dequeue:%d", num); + PMD_RX_LOG(DEBUG, "packet len:%d", len[0]); rxm = rcv_pkts[0]; if (unlikely(len[0] < hdr_size + ETHER_HDR_LEN)) { - PMD_RX_LOG(ERR, "Packet drop\n"); + PMD_RX_LOG(ERR, "Packet drop"); nb_enqueued++; virtio_discard_rxbuf(rxvq, rxm); rxvq->errors++; @@ -781,7 +781,7 @@ virtio_recv_mergeable_pkts(void *rx_queue, rcv_cnt = rx_num; } else { PMD_RX_LOG(ERR, - "No enough segments for packet.\n"); + "No enough segments for packet."); nb_enqueued++; virtio_discard_rxbuf(rxvq, rxm); rxvq->errors++; -- 2.1.4