forked from openwrt/openwrt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: backport flow dissector batman-adv support
Improves performance on multicore systems handling batman-adv traffic Signed-off-by: Felix Fietkau <nbd@nbd.name>
- Loading branch information
Showing
5 changed files
with
2,267 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...inux/generic/backport-4.14/270-batman-adv-Let-packet.h-include-its-headers-directly.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From: Sven Eckelmann <sven.eckelmann@openmesh.com> | ||
Date: Thu, 21 Dec 2017 10:17:38 +0100 | ||
Subject: [PATCH] batman-adv: Let packet.h include its headers directly | ||
|
||
The headers used by packet.h should also be included by it directly. main.h | ||
is currently dealing with it in batman-adv, but this will no longer work | ||
when this header is moved to include/uapi/linux/. | ||
|
||
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com> | ||
Signed-off-by: David S. Miller <davem@davemloft.net> | ||
--- | ||
|
||
--- a/net/batman-adv/main.h | ||
+++ b/net/batman-adv/main.h | ||
@@ -184,10 +184,8 @@ enum batadv_uev_type { | ||
|
||
/* Kernel headers */ | ||
|
||
-#include <linux/bitops.h> /* for packet.h */ | ||
#include <linux/compiler.h> | ||
#include <linux/etherdevice.h> | ||
-#include <linux/if_ether.h> /* for packet.h */ | ||
#include <linux/if_vlan.h> | ||
#include <linux/jiffies.h> | ||
#include <linux/percpu.h> | ||
--- a/net/batman-adv/packet.h | ||
+++ b/net/batman-adv/packet.h | ||
@@ -19,6 +19,8 @@ | ||
#define _NET_BATMAN_ADV_PACKET_H_ | ||
|
||
#include <asm/byteorder.h> | ||
+#include <linux/bitops.h> | ||
+#include <linux/if_ether.h> | ||
#include <linux/types.h> | ||
|
||
#define batadv_tp_is_error(n) ((u8)(n) > 127 ? 1 : 0) |
72 changes: 72 additions & 0 deletions
72
target/linux/generic/backport-4.14/271-batman-adv-Remove-usage-of-BIT-x-in-packet.h.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
From: Sven Eckelmann <sven.eckelmann@openmesh.com> | ||
Date: Thu, 21 Dec 2017 10:17:39 +0100 | ||
Subject: [PATCH] batman-adv: Remove usage of BIT(x) in packet.h | ||
|
||
The BIT(x) macro is no longer available for uapi headers because it is | ||
defined outside of it (linux/bitops.h). The use of it must therefore be | ||
avoided and replaced by an appropriate other representation. | ||
|
||
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com> | ||
Signed-off-by: David S. Miller <davem@davemloft.net> | ||
--- | ||
|
||
--- a/net/batman-adv/packet.h | ||
+++ b/net/batman-adv/packet.h | ||
@@ -19,7 +19,6 @@ | ||
#define _NET_BATMAN_ADV_PACKET_H_ | ||
|
||
#include <asm/byteorder.h> | ||
-#include <linux/bitops.h> | ||
#include <linux/if_ether.h> | ||
#include <linux/types.h> | ||
|
||
@@ -85,9 +84,9 @@ enum batadv_subtype { | ||
* one hop neighbor on the interface where it was originally received. | ||
*/ | ||
enum batadv_iv_flags { | ||
- BATADV_NOT_BEST_NEXT_HOP = BIT(0), | ||
- BATADV_PRIMARIES_FIRST_HOP = BIT(1), | ||
- BATADV_DIRECTLINK = BIT(2), | ||
+ BATADV_NOT_BEST_NEXT_HOP = 1UL << 0, | ||
+ BATADV_PRIMARIES_FIRST_HOP = 1UL << 1, | ||
+ BATADV_DIRECTLINK = 1UL << 2, | ||
}; | ||
|
||
/* ICMP message types */ | ||
@@ -108,9 +107,9 @@ enum batadv_icmp_packettype { | ||
* @BATADV_MCAST_WANT_ALL_IPV6: we want all IPv6 multicast packets | ||
*/ | ||
enum batadv_mcast_flags { | ||
- BATADV_MCAST_WANT_ALL_UNSNOOPABLES = BIT(0), | ||
- BATADV_MCAST_WANT_ALL_IPV4 = BIT(1), | ||
- BATADV_MCAST_WANT_ALL_IPV6 = BIT(2), | ||
+ BATADV_MCAST_WANT_ALL_UNSNOOPABLES = 1UL << 0, | ||
+ BATADV_MCAST_WANT_ALL_IPV4 = 1UL << 1, | ||
+ BATADV_MCAST_WANT_ALL_IPV6 = 1UL << 2, | ||
}; | ||
|
||
/* tt data subtypes */ | ||
@@ -124,10 +123,10 @@ enum batadv_mcast_flags { | ||
* @BATADV_TT_FULL_TABLE: contains full table to replace existing table | ||
*/ | ||
enum batadv_tt_data_flags { | ||
- BATADV_TT_OGM_DIFF = BIT(0), | ||
- BATADV_TT_REQUEST = BIT(1), | ||
- BATADV_TT_RESPONSE = BIT(2), | ||
- BATADV_TT_FULL_TABLE = BIT(4), | ||
+ BATADV_TT_OGM_DIFF = 1UL << 0, | ||
+ BATADV_TT_REQUEST = 1UL << 1, | ||
+ BATADV_TT_RESPONSE = 1UL << 2, | ||
+ BATADV_TT_FULL_TABLE = 1UL << 4, | ||
}; | ||
|
||
/** | ||
@@ -135,7 +134,7 @@ enum batadv_tt_data_flags { | ||
* @BATADV_VLAN_HAS_TAG: whether the field contains a valid vlan tag or not | ||
*/ | ||
enum batadv_vlan_flags { | ||
- BATADV_VLAN_HAS_TAG = BIT(15), | ||
+ BATADV_VLAN_HAS_TAG = 1UL << 15, | ||
}; | ||
|
||
/* claim frame types for the bridge loop avoidance */ |
Oops, something went wrong.