Commit fb079b1
committed
Create parse_ethhdr_vlan() in parsing_helpers.h
This is based on same function from packet-solutions/xdp_vlan02_kern.c
that also extracts VLANs.
It needs to be removed from packet-solutions/xdp_vlan02_kern.c, but
for now its just ifdef defined out-of-code. Need to run some tests
and look at BPF byte-code to make sure it does the right thing.
The original parse_ethhdr() is implemented by calling parse_ethhdr_vlan()
with NULL argument for stucture to collect IDs into. The compiler
should remove the parts that are not needed.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>1 parent ffba649 commit fb079b1
2 files changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| |||
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
73 | | - | |
74 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
| |||
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
112 | 131 | | |
113 | 132 | | |
114 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
78 | | - | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
0 commit comments