~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/ipv6/ila/ila.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /net/ipv6/ila/ila.h (Version linux-6.12-rc7) and /net/ipv6/ila/ila.h (Version linux-5.18.19)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*                                                  2 /*
  3  * Copyright (c) 2015 Tom Herbert <tom@herbert      3  * Copyright (c) 2015 Tom Herbert <tom@herbertland.com>
  4  */                                                 4  */
  5                                                     5 
  6 #ifndef __ILA_H                                     6 #ifndef __ILA_H
  7 #define __ILA_H                                     7 #define __ILA_H
  8                                                     8 
  9 #include <linux/errno.h>                            9 #include <linux/errno.h>
 10 #include <linux/ip.h>                              10 #include <linux/ip.h>
 11 #include <linux/kernel.h>                          11 #include <linux/kernel.h>
 12 #include <linux/module.h>                          12 #include <linux/module.h>
 13 #include <linux/socket.h>                          13 #include <linux/socket.h>
 14 #include <linux/skbuff.h>                          14 #include <linux/skbuff.h>
 15 #include <linux/types.h>                           15 #include <linux/types.h>
 16 #include <net/checksum.h>                          16 #include <net/checksum.h>
 17 #include <net/genetlink.h>                         17 #include <net/genetlink.h>
 18 #include <net/ip.h>                                18 #include <net/ip.h>
 19 #include <net/protocol.h>                          19 #include <net/protocol.h>
 20 #include <uapi/linux/ila.h>                        20 #include <uapi/linux/ila.h>
 21                                                    21 
 22 struct ila_locator {                               22 struct ila_locator {
 23         union {                                    23         union {
 24                 __u8            v8[8];             24                 __u8            v8[8];
 25                 __be16          v16[4];            25                 __be16          v16[4];
 26                 __be32          v32[2];            26                 __be32          v32[2];
 27                 __be64          v64;               27                 __be64          v64;
 28         };                                         28         };
 29 };                                                 29 };
 30                                                    30 
 31 struct ila_identifier {                            31 struct ila_identifier {
 32         union {                                    32         union {
 33                 struct {                           33                 struct {
 34 #if defined(__LITTLE_ENDIAN_BITFIELD)              34 #if defined(__LITTLE_ENDIAN_BITFIELD)
 35                         u8 __space:4;              35                         u8 __space:4;
 36                         u8 csum_neutral:1;         36                         u8 csum_neutral:1;
 37                         u8 type:3;                 37                         u8 type:3;
 38 #elif defined(__BIG_ENDIAN_BITFIELD)               38 #elif defined(__BIG_ENDIAN_BITFIELD)
 39                         u8 type:3;                 39                         u8 type:3;
 40                         u8 csum_neutral:1;         40                         u8 csum_neutral:1;
 41                         u8 __space:4;              41                         u8 __space:4;
 42 #else                                              42 #else
 43 #error  "Adjust your <asm/byteorder.h> defines     43 #error  "Adjust your <asm/byteorder.h> defines"
 44 #endif                                             44 #endif
 45                         u8 __space2[7];            45                         u8 __space2[7];
 46                 };                                 46                 };
 47                 __u8            v8[8];             47                 __u8            v8[8];
 48                 __be16          v16[4];            48                 __be16          v16[4];
 49                 __be32          v32[2];            49                 __be32          v32[2];
 50                 __be64          v64;               50                 __be64          v64;
 51         };                                         51         };
 52 };                                                 52 };
 53                                                    53 
 54 #define CSUM_NEUTRAL_FLAG       htonl(0x100000     54 #define CSUM_NEUTRAL_FLAG       htonl(0x10000000)
 55                                                    55 
 56 struct ila_addr {                                  56 struct ila_addr {
 57         union {                                    57         union {
 58                 struct in6_addr addr;              58                 struct in6_addr addr;
 59                 struct {                           59                 struct {
 60                         struct ila_locator loc     60                         struct ila_locator loc;
 61                         struct ila_identifier      61                         struct ila_identifier ident;
 62                 };                                 62                 };
 63         };                                         63         };
 64 };                                                 64 };
 65                                                    65 
 66 static inline struct ila_addr *ila_a2i(struct      66 static inline struct ila_addr *ila_a2i(struct in6_addr *addr)
 67 {                                                  67 {
 68         return (struct ila_addr *)addr;            68         return (struct ila_addr *)addr;
 69 }                                                  69 }
 70                                                    70 
 71 struct ila_params {                                71 struct ila_params {
 72         struct ila_locator locator;                72         struct ila_locator locator;
 73         struct ila_locator locator_match;          73         struct ila_locator locator_match;
 74         __wsum csum_diff;                          74         __wsum csum_diff;
 75         u8 csum_mode;                              75         u8 csum_mode;
 76         u8 ident_type;                             76         u8 ident_type;
 77 };                                                 77 };
 78                                                    78 
 79 static inline __wsum compute_csum_diff8(const      79 static inline __wsum compute_csum_diff8(const __be32 *from, const __be32 *to)
 80 {                                                  80 {
 81         __be32 diff[] = {                          81         __be32 diff[] = {
 82                 ~from[0], ~from[1], to[0], to[     82                 ~from[0], ~from[1], to[0], to[1],
 83         };                                         83         };
 84                                                    84 
 85         return csum_partial(diff, sizeof(diff)     85         return csum_partial(diff, sizeof(diff), 0);
 86 }                                                  86 }
 87                                                    87 
 88 static inline bool ila_csum_neutral_set(struct     88 static inline bool ila_csum_neutral_set(struct ila_identifier ident)
 89 {                                                  89 {
 90         return !!(ident.csum_neutral);             90         return !!(ident.csum_neutral);
 91 }                                                  91 }
 92                                                    92 
 93 void ila_update_ipv6_locator(struct sk_buff *s     93 void ila_update_ipv6_locator(struct sk_buff *skb, struct ila_params *p,
 94                              bool set_csum_neu     94                              bool set_csum_neutral);
 95                                                    95 
 96 void ila_init_saved_csum(struct ila_params *p)     96 void ila_init_saved_csum(struct ila_params *p);
 97                                                    97 
 98 struct ila_net {                                   98 struct ila_net {
 99         struct {                                   99         struct {
100                 struct rhashtable rhash_table;    100                 struct rhashtable rhash_table;
101                 spinlock_t *locks; /* Bucket l    101                 spinlock_t *locks; /* Bucket locks for entry manipulation */
102                 unsigned int locks_mask;          102                 unsigned int locks_mask;
103                 bool hooks_registered;            103                 bool hooks_registered;
104         } xlat;                                   104         } xlat;
105 };                                                105 };
106                                                   106 
107 int ila_lwt_init(void);                           107 int ila_lwt_init(void);
108 void ila_lwt_fini(void);                          108 void ila_lwt_fini(void);
109                                                   109 
110 int ila_xlat_init_net(struct net *net);           110 int ila_xlat_init_net(struct net *net);
111 void ila_xlat_pre_exit_net(struct net *net);   << 
112 void ila_xlat_exit_net(struct net *net);          111 void ila_xlat_exit_net(struct net *net);
113                                                   112 
114 int ila_xlat_nl_cmd_add_mapping(struct sk_buff    113 int ila_xlat_nl_cmd_add_mapping(struct sk_buff *skb, struct genl_info *info);
115 int ila_xlat_nl_cmd_del_mapping(struct sk_buff    114 int ila_xlat_nl_cmd_del_mapping(struct sk_buff *skb, struct genl_info *info);
116 int ila_xlat_nl_cmd_get_mapping(struct sk_buff    115 int ila_xlat_nl_cmd_get_mapping(struct sk_buff *skb, struct genl_info *info);
117 int ila_xlat_nl_cmd_flush(struct sk_buff *skb,    116 int ila_xlat_nl_cmd_flush(struct sk_buff *skb, struct genl_info *info);
118 int ila_xlat_nl_dump_start(struct netlink_call    117 int ila_xlat_nl_dump_start(struct netlink_callback *cb);
119 int ila_xlat_nl_dump_done(struct netlink_callb    118 int ila_xlat_nl_dump_done(struct netlink_callback *cb);
120 int ila_xlat_nl_dump(struct sk_buff *skb, stru    119 int ila_xlat_nl_dump(struct sk_buff *skb, struct netlink_callback *cb);
121                                                   120 
122 extern unsigned int ila_net_id;                   121 extern unsigned int ila_net_id;
123                                                   122 
124 extern struct genl_family ila_nl_family;          123 extern struct genl_family ila_nl_family;
125                                                   124 
126 #endif /* __ILA_H */                              125 #endif /* __ILA_H */
127                                                   126 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php