Commit 096361b1 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

ipv6: add ipv6_devconf_read_txrx cacheline_group

IPv6 TX and RX fast path use the following fields:

- disable_ipv6
- hop_limit
- mtu6
- forwarding
- disable_policy
- proxy_ndp

Place them in a group to increase data locality.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 65f5dd4f
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#define _IPV6_H #define _IPV6_H
#include <uapi/linux/ipv6.h> #include <uapi/linux/ipv6.h>
#include <linux/cache.h>
#define ipv6_optlen(p) (((p)->hdrlen+1) << 3) #define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
#define ipv6_authlen(p) (((p)->hdrlen+2) << 2) #define ipv6_authlen(p) (((p)->hdrlen+2) << 2)
...@@ -10,9 +11,16 @@ ...@@ -10,9 +11,16 @@
* This structure contains configuration options per IPv6 link. * This structure contains configuration options per IPv6 link.
*/ */
struct ipv6_devconf { struct ipv6_devconf {
__s32 forwarding; /* RX & TX fastpath fields. */
__cacheline_group_begin(ipv6_devconf_read_txrx);
__s32 disable_ipv6;
__s32 hop_limit; __s32 hop_limit;
__s32 mtu6; __s32 mtu6;
__s32 forwarding;
__s32 disable_policy;
__s32 proxy_ndp;
__cacheline_group_end(ipv6_devconf_read_txrx);
__s32 accept_ra; __s32 accept_ra;
__s32 accept_redirects; __s32 accept_redirects;
__s32 autoconf; __s32 autoconf;
...@@ -45,7 +53,6 @@ struct ipv6_devconf { ...@@ -45,7 +53,6 @@ struct ipv6_devconf {
__s32 accept_ra_rt_info_max_plen; __s32 accept_ra_rt_info_max_plen;
#endif #endif
#endif #endif
__s32 proxy_ndp;
__s32 accept_source_route; __s32 accept_source_route;
__s32 accept_ra_from_local; __s32 accept_ra_from_local;
#ifdef CONFIG_IPV6_OPTIMISTIC_DAD #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
...@@ -55,7 +62,6 @@ struct ipv6_devconf { ...@@ -55,7 +62,6 @@ struct ipv6_devconf {
#ifdef CONFIG_IPV6_MROUTE #ifdef CONFIG_IPV6_MROUTE
atomic_t mc_forwarding; atomic_t mc_forwarding;
#endif #endif
__s32 disable_ipv6;
__s32 drop_unicast_in_l2_multicast; __s32 drop_unicast_in_l2_multicast;
__s32 accept_dad; __s32 accept_dad;
__s32 force_tllao; __s32 force_tllao;
...@@ -76,7 +82,6 @@ struct ipv6_devconf { ...@@ -76,7 +82,6 @@ struct ipv6_devconf {
#endif #endif
__u32 enhanced_dad; __u32 enhanced_dad;
__u32 addr_gen_mode; __u32 addr_gen_mode;
__s32 disable_policy;
__s32 ndisc_tclass; __s32 ndisc_tclass;
__s32 rpl_seg_enabled; __s32 rpl_seg_enabled;
__u32 ioam6_id; __u32 ioam6_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment