diff options
| author | David S. Miller <davem@davemloft.net> | 2024-03-01 11:42:33 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2024-03-01 11:42:33 +0300 |
| commit | 9f780efa6eaa3870bd2ad487ee97872fe25f3e1d (patch) | |
| tree | b790be03802a14ad4f106ce7c1f221990b468dd6 /include/linux | |
| parent | 65f5dd4f02a89df429b8212b4c2f3ada6c4f3fc1 (diff) | |
| parent | 2a02f8379bde89472cddb49dc8e55a17e0b68eed (diff) | |
| download | linux-9f780efa6eaa3870bd2ad487ee97872fe25f3e1d.tar.xz | |
Merge branch 'ipv6-devconf-lockless'
Eric Dumazet says:
====================
ipv6: lockless accesses to devconf
- First patch puts in a cacheline_group the fields used in fast paths.
- Annotate all data races around idev->cnf fields.
- Last patch in this series removes RTNL use for RTM_GETNETCONF dumps.
v3: addressed Jakub Kicinski feedback in addrconf_disable_ipv6()
Added tags from Jiri and Florian.
v2: addressed Jiri Pirko feedback
- Added "ipv6: addrconf_disable_ipv6() optimizations"
and "ipv6: addrconf_disable_policy() optimization"
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ipv6.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index ef3aa060a289..383a0ea2ab91 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -3,6 +3,7 @@ #define _IPV6_H #include <uapi/linux/ipv6.h> +#include <linux/cache.h> #define ipv6_optlen(p) (((p)->hdrlen+1) << 3) #define ipv6_authlen(p) (((p)->hdrlen+2) << 2) @@ -10,9 +11,16 @@ * This structure contains configuration options per IPv6 link. */ struct ipv6_devconf { - __s32 forwarding; + /* RX & TX fastpath fields. */ + __cacheline_group_begin(ipv6_devconf_read_txrx); + __s32 disable_ipv6; __s32 hop_limit; __s32 mtu6; + __s32 forwarding; + __s32 disable_policy; + __s32 proxy_ndp; + __cacheline_group_end(ipv6_devconf_read_txrx); + __s32 accept_ra; __s32 accept_redirects; __s32 autoconf; @@ -45,7 +53,6 @@ struct ipv6_devconf { __s32 accept_ra_rt_info_max_plen; #endif #endif - __s32 proxy_ndp; __s32 accept_source_route; __s32 accept_ra_from_local; #ifdef CONFIG_IPV6_OPTIMISTIC_DAD @@ -55,7 +62,6 @@ struct ipv6_devconf { #ifdef CONFIG_IPV6_MROUTE atomic_t mc_forwarding; #endif - __s32 disable_ipv6; __s32 drop_unicast_in_l2_multicast; __s32 accept_dad; __s32 force_tllao; @@ -76,7 +82,6 @@ struct ipv6_devconf { #endif __u32 enhanced_dad; __u32 addr_gen_mode; - __s32 disable_policy; __s32 ndisc_tclass; __s32 rpl_seg_enabled; __u32 ioam6_id; |
