forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tc: Set 'no_percpu' flag for compatible actions
Recent changes in Linux kernel TC action subsystem introduced new TCA_ACT_FLAGS_NO_PERCPU_STATS flag. The purpose of the flag is to request action implementation to skip allocating action stats with expensive percpu allocator and use regular built-in action stats instead. Such approach significantly improves rule insertion rate and reduce memory usage for hardware-offloaded rules that don't need benefits provided by percpu allocated stats (improved software TC fast-path performance). Set the flag for all compatible actions. Modify acinclude.m4 to use OVS-internal pkt_cls.h implementation when TCA_ACT_FLAGS is not defined by kernel headers and to manually define struct nla_bitfield32 in netlink.h (new file) when it is not defined by kernel headers. Signed-off-by: Vlad Buslov <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Simon Horman <[email protected]>
- Loading branch information
1 parent
c0a1df2
commit 292d5bd
Showing
6 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
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,30 @@ | ||
#ifndef __UAPI_LINUX_NETLINK_WRAPPER_H | ||
#define __UAPI_LINUX_NETLINK_WRAPPER_H 1 | ||
|
||
#if !defined(__KERNEL__) && !defined(HAVE_NLA_BITFIELD32) | ||
|
||
#include <linux/types.h> | ||
|
||
/* Generic 32 bitflags attribute content sent to the kernel. | ||
* | ||
* The value is a bitmap that defines the values being set | ||
* The selector is a bitmask that defines which value is legit | ||
* | ||
* Examples: | ||
* value = 0x0, and selector = 0x1 | ||
* implies we are selecting bit 1 and we want to set its value to 0. | ||
* | ||
* value = 0x2, and selector = 0x2 | ||
* implies we are selecting bit 2 and we want to set its value to 1. | ||
* | ||
*/ | ||
struct nla_bitfield32 { | ||
__u32 value; | ||
__u32 selector; | ||
}; | ||
|
||
#endif /* !__KERNEL__ && !HAVE_NLA_BITFIELD32 */ | ||
|
||
#include_next <linux/netlink.h> | ||
|
||
#endif /* __UAPI_LINUX_NETLINK_WRAPPER_H */ |
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
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