.. | .. |
---|
98 | 98 | u8 nh_via_table; |
---|
99 | 99 | u8 nh_reserved1; |
---|
100 | 100 | |
---|
101 | | - u32 nh_label[0]; |
---|
| 101 | + u32 nh_label[]; |
---|
102 | 102 | }; |
---|
103 | 103 | |
---|
104 | 104 | /* offset of via from beginning of mpls_nh */ |
---|
.. | .. |
---|
154 | 154 | u8 rt_nh_size; |
---|
155 | 155 | u8 rt_via_offset; |
---|
156 | 156 | u8 rt_reserved1; |
---|
157 | | - struct mpls_nh rt_nh[0]; |
---|
| 157 | + struct mpls_nh rt_nh[]; |
---|
158 | 158 | }; |
---|
159 | 159 | |
---|
160 | 160 | #define for_nexthops(rt) { \ |
---|
.. | .. |
---|
171 | 171 | __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++) |
---|
172 | 172 | |
---|
173 | 173 | #define endfor_nexthops(rt) } |
---|
174 | | - |
---|
175 | | -static inline struct mpls_shim_hdr mpls_entry_encode(u32 label, unsigned ttl, unsigned tc, bool bos) |
---|
176 | | -{ |
---|
177 | | - struct mpls_shim_hdr result; |
---|
178 | | - result.label_stack_entry = |
---|
179 | | - cpu_to_be32((label << MPLS_LS_LABEL_SHIFT) | |
---|
180 | | - (tc << MPLS_LS_TC_SHIFT) | |
---|
181 | | - (bos ? (1 << MPLS_LS_S_SHIFT) : 0) | |
---|
182 | | - (ttl << MPLS_LS_TTL_SHIFT)); |
---|
183 | | - return result; |
---|
184 | | -} |
---|
185 | 174 | |
---|
186 | 175 | static inline struct mpls_entry_decoded mpls_entry_decode(struct mpls_shim_hdr *hdr) |
---|
187 | 176 | { |
---|