forked from medvedv/purifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dpdk1.7.patch
77 lines (71 loc) · 2.72 KB
/
dpdk1.7.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
diff -ru lib/librte_eal/linuxapp/igb_uio/compat.h lib/librte_eal/linuxapp/igb_uio/compat.h
--- lib/librte_eal/linuxapp/igb_uio/compat.h 2014-09-03 11:28:26.000000000 +0000
+++ lib/librte_eal/linuxapp/igb_uio/compat.h 2015-09-17 23:26:43.338596045 +0000
@@ -11,6 +11,10 @@
#define pci_cfg_access_unlock pci_unblock_user_cfg_access
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
+#define HAVE_PTE_MASK_PAGE_IOMAP
+#endif
+
#ifndef PCI_MSIX_ENTRY_SIZE
#define PCI_MSIX_ENTRY_SIZE 16
#define PCI_MSIX_ENTRY_LOWER_ADDR 0
diff -ru lib/librte_eal/linuxapp/igb_uio/igb_uio.c lib/librte_eal/linuxapp/igb_uio/igb_uio.c
--- lib/librte_eal/linuxapp/igb_uio/igb_uio.c 2014-09-03 11:28:26.000000000 +0000
+++ lib/librte_eal/linuxapp/igb_uio/igb_uio.c 2015-09-17 23:32:47.218612877 +0000
@@ -83,7 +83,11 @@
unsigned long max_vfs;
struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
if (0 != strict_strtoul(buf, 0, &max_vfs))
+#else
+ if (0 != kstrtoul(buf, 0, &max_vfs))
+#endif
return -EINVAL;
if (0 == max_vfs)
@@ -287,7 +291,9 @@
idx = (int)vma->vm_pgoff;
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+#if defined(HAVE_PTE_MASK_PAGE_IOMAP)
vma->vm_page_prot.pgprot |= _PAGE_IOMAP;
+#endif
return remap_pfn_range(vma,
vma->vm_start,
diff -ru lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
--- lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c 2014-09-03 11:28:26.000000000 +0000
+++ lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c 2015-09-17 23:40:27.586634173 +0000
@@ -2103,6 +2103,9 @@
static int igb_ndo_fdb_add(struct ndmsg ndm, struct nlattr tb[],
struct net_device *dev,
const unsigned char *addr,
+#ifdef HAVE_NDO_FDB_ADD_VID
+ u16 vid,
+#endif
u16 flags)
#else
static int igb_ndo_fdb_add(struct ndmsg *ndm,
@@ -2258,8 +2261,11 @@
mode = BRIDGE_MODE_VEB;
else
mode = BRIDGE_MODE_VEPA;
-
+#ifdef HAVE_NDO_FDB_ADD_VID
+ return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
+#else
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
+#endif /* HAVE_NDO_FDB_ADD_VID */
}
#endif /* HAVE_BRIDGE_ATTRIBS */
#endif /* NTF_SELF */
diff -ru lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
--- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h 2014-09-03 11:28:26.000000000 +0000
+++ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h 2015-09-17 23:41:15.706636399 +0000
@@ -3879,4 +3879,8 @@
#define HAVE_VF_MIN_MAX_TXRATE 1
#endif /* >= 3.16.0 */
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) )
+#define HAVE_NDO_FDB_ADD_VID
+#endif /* >= 3.19.0 */
+
#endif /* _KCOMPAT_H_ */