mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 09:58:01 +00:00
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 <vladbu@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
31 lines
782 B
C
31 lines
782 B
C
#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 */
|