update Intel copyright years to 2014
[dpdk.git] / lib / librte_eal / linuxapp / kni / kni_net.c
index f98a2ce..4616ac4 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * GPL LICENSE SUMMARY
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  * 
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of version 2 of the GNU General Public License as
@@ -379,6 +379,18 @@ kni_net_rx(struct kni_dev *kni)
 /*
  * Transmit a packet (called by the kernel)
  */
+#ifdef RTE_KNI_VHOST
+static int
+kni_net_tx(struct sk_buff *skb, struct net_device *dev)
+{
+       struct kni_dev *kni = netdev_priv(dev);
+       
+       dev_kfree_skb(skb);
+       kni->stats.tx_dropped++;
+       
+       return NETDEV_TX_OK;
+}
+#else
 static int
 kni_net_tx(struct sk_buff *skb, struct net_device *dev)
 {
@@ -451,6 +463,7 @@ drop:
 
        return NETDEV_TX_OK;
 }
+#endif
 
 /*
  * Deal with a transmit timeout.