From d2d7d6fc5fad0ea9266b9d4b979164cad2d1b24d Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Mon, 26 Sep 2016 16:39:33 +0100 Subject: [PATCH] kni: remove unnecessary messages for out of memory Signed-off-by: Ferruh Yigit --- lib/librte_eal/linuxapp/kni/kni_net.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c b/lib/librte_eal/linuxapp/kni/kni_net.c index 6328e1ec40..5182b2fd14 100644 --- a/lib/librte_eal/linuxapp/kni/kni_net.c +++ b/lib/librte_eal/linuxapp/kni/kni_net.c @@ -189,7 +189,6 @@ kni_net_rx_normal(struct kni_dev *kni) skb = dev_alloc_skb(len + 2); if (!skb) { - pr_err("Out of mem, dropping pkts\n"); /* Update statistics */ kni->stats.rx_dropped++; continue; @@ -361,9 +360,7 @@ kni_net_rx_lo_fifo_skb(struct kni_dev *kni) kni->va[i] = pa2va(kni->pa[i], kva); skb = dev_alloc_skb(len + 2); - if (skb == NULL) - pr_err("Out of mem, dropping pkts\n"); - else { + if (skb) { /* Align IP on 16B boundary */ skb_reserve(skb, 2); memcpy(skb_put(skb, len), data_kva, len); @@ -375,7 +372,6 @@ kni_net_rx_lo_fifo_skb(struct kni_dev *kni) /* Simulate real usage, allocate/copy skb twice */ skb = dev_alloc_skb(len + 2); if (skb == NULL) { - pr_err("Out of mem, dropping pkts\n"); kni->stats.rx_dropped++; continue; } -- 2.20.1