Commit 00618cd 1 parent 9f877e1 commit 00618cd Copy full SHA for 00618cd
File tree 4 files changed +11
-5
lines changed
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ BasedOnStyle: LLVM
4
4
AlignAfterOpenBracket : DontAlign
5
5
AlignConsecutiveAssignments : true
6
6
AlignEscapedNewlines : DontAlign
7
+ # mkdocs annotations in source code are written as trailing comments
8
+ # and alignment pushes these really far away from the content.
9
+ AlignTrailingComments : false
7
10
AlwaysBreakBeforeMultilineStrings : true
8
11
AlwaysBreakTemplateDeclarations : false
9
12
AllowAllParametersOfDeclarationOnNextLine : false
@@ -16,4 +19,7 @@ UseTab: ForContinuationAndIndentation
16
19
ColumnLimit : 1000
17
20
# Go compiler comments need to stay unindented.
18
21
CommentPragmas : ' ^go:.*'
22
+ # linux/bpf.h needs to be included before bpf/bpf_helpers.h for types like __u64
23
+ # and sorting makes this impossible.
24
+ SortIncludes : false
19
25
...
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ typedef unsigned long u64;
20
20
struct bits {
21
21
/*int x;*/
22
22
u8 b : 2 , a : 4 ; /* a was before b */
23
- my_u32 d : 2 ; /* was 'unsigned int' */
24
- u16 c : 1 ; /* was before d */
23
+ my_u32 d : 2 ; /* was 'unsigned int' */
24
+ u16 c : 1 ; /* was before d */
25
25
enum { ZERO = 0 , ONE = 1 } e : 1 ;
26
- u16 f ; /* was: u64 f:16 */
26
+ u16 f ; /* was: u64 f:16 */
27
27
u32 g : 30 ; /* was: u64 g:30 */
28
28
};
29
29
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ char __license[] SEC("license") = "Dual MIT/GPL";
11
11
struct {
12
12
__uint (type , BPF_MAP_TYPE_LRU_HASH );
13
13
__uint (max_entries , MAX_MAP_ENTRIES );
14
- __type (key , __u32 ); // source IPv4 address
14
+ __type (key , __u32 ); // source IPv4 address
15
15
__type (value , __u32 ); // packet count
16
16
} xdp_stats_map SEC (".maps" );
17
17
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ int __attribute__((noinline)) global_fn(uint32_t arg) {
112
112
static volatile unsigned int key1 = 0 ; // .bss
113
113
static volatile unsigned int key2 = 1 ; // .data
114
114
volatile const unsigned int key3 = 2 ; // .rodata
115
- static volatile const uint32_t arg ; // .rodata, populated by loader
115
+ static volatile const uint32_t arg ; // .rodata, populated by loader
116
116
// custom .rodata section, populated by loader
117
117
static volatile const uint32_t arg2 __section (".rodata.test" );
118
118
#endif
You can’t perform that action at this time.
0 commit comments