DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [memnic PATCH] linux: fix build with kernel >= 3.3
@ 2014-01-24 15:59 Olivier Matz
  2014-01-30 11:46 ` Hiroshi Shimamoto
  0 siblings, 1 reply; 5+ messages in thread
From: Olivier Matz @ 2014-01-24 15:59 UTC (permalink / raw)
  To: dev

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 linux/memnic_net.c | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/linux/memnic_net.c b/linux/memnic_net.c
index 747ae51..b6018fb 100644
--- a/linux/memnic_net.c
+++ b/linux/memnic_net.c
@@ -2,6 +2,7 @@
  *   BSD LICENSE
  *
  *   Copyright(c) 2013-2014 NEC All rights reserved.
+ *   Copyright(c) 2014 6WIND S.A.
  *
  *   Redistribution and use in source and binary forms, with or without
  *   modification, are permitted provided that the following conditions
@@ -29,6 +30,7 @@
  */
 /* Dual BSD/GPL */
 
+#include <linux/version.h>
 #include <linux/etherdevice.h>
 #include <linux/kthread.h>
 
@@ -259,13 +261,35 @@ static void memnic_tx_timeout(struct net_device *netdev)
 {
 }
 
-static void memnic_vlan_rx_add_vid(struct net_device *netdev, unsigned short vid)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+static int memnic_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
+{
+	return 0;
+}
+
+static int memnic_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid)
+{
+	return 0;
+}
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
+static int memnic_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid)
+{
+	return 0;
+}
+
+static int memnic_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid)
+{
+	return 0;
+}
+#else
+static void memnic_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid)
 {
 }
 
-static void memnic_vlan_rx_kill_vid(struct net_device *netdev, unsigned short vid)
+static void memnic_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid)
 {
 }
+#endif
 
 static int memnic_ioctl(struct net_device *netdev, struct ifreq *req, int cmd)
 {
-- 
1.8.4.rc3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-21 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-24 15:59 [dpdk-dev] [memnic PATCH] linux: fix build with kernel >= 3.3 Olivier Matz
2014-01-30 11:46 ` Hiroshi Shimamoto
2014-02-07 13:04   ` [dpdk-dev] [memnic PATCH v2] linux: fix build with kernel 3.3 Olivier Matz
2014-03-18 23:04     ` Hiroshi Shimamoto
2014-03-21 14:59       ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).