From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [memnic PATCH] linux: fix build with kernel >= 3.3
Date: Fri, 24 Jan 2014 16:59:35 +0100 [thread overview]
Message-ID: <1390579175-23942-1-git-send-email-olivier.matz@6wind.com> (raw)
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
next reply other threads:[~2014-01-24 15:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 15:59 Olivier Matz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390579175-23942-1-git-send-email-olivier.matz@6wind.com \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).