kni: fix packet loss in loopback mode
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 12 Feb 2014 16:23:00 +0000 (16:23 +0000)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 09:22:12 +0000 (10:22 +0100)
kni_net fixed to prevent losing packet bytes when doing loopback.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reported-by: Daniel Kaminsky <daniel.kaminsky@infinitelocality.com>
lib/librte_eal/linuxapp/kni/kni_net.c

index 4616ac4..fb4b3a8 100644 (file)
@@ -331,7 +331,6 @@ kni_net_rx_lo_fifo_skb(struct kni_dev *kni)
                        skb_reserve(skb, 2);
                        memcpy(skb_put(skb, len), data_kva, len);
                        skb->dev = dev;
-                       skb->protocol = eth_type_trans(skb, dev);
                        skb->ip_summed = CHECKSUM_UNNECESSARY;
                        dev_kfree_skb(skb);
                }
@@ -347,7 +346,6 @@ kni_net_rx_lo_fifo_skb(struct kni_dev *kni)
                        skb_reserve(skb, 2);
                        memcpy(skb_put(skb, len), data_kva, len);
                        skb->dev = dev;
-                       skb->protocol = eth_type_trans(skb, dev);
                        skb->ip_summed = CHECKSUM_UNNECESSARY;
 
                        kni->stats.rx_bytes += len;