Lines Matching defs:trace
79 static bool ioam6_validate_trace_hdr(struct ioam6_trace_hdr *trace)
83 if (!trace->type_be32 || !trace->remlen ||
84 trace->remlen > IOAM6_TRACE_DATA_SIZE_MAX / 4 ||
85 trace->type.bit12 | trace->type.bit13 | trace->type.bit14 |
86 trace->type.bit15 | trace->type.bit16 | trace->type.bit17 |
87 trace->type.bit18 | trace->type.bit19 | trace->type.bit20 |
88 trace->type.bit21)
91 trace->nodelen = 0;
92 fields = be32_to_cpu(trace->type_be32);
94 trace->nodelen += hweight32(fields & IOAM6_MASK_SHORT_FIELDS)
96 trace->nodelen += hweight32(fields & IOAM6_MASK_WIDE_FIELDS)
109 struct ioam6_trace_hdr *trace;
152 NL_SET_ERR_MSG(extack, "missing trace");
156 trace = nla_data(tb[IOAM6_IPTUNNEL_TRACE]);
157 if (!ioam6_validate_trace_hdr(trace)) {
159 "invalid trace validation");
163 len_aligned = ALIGN(trace->remlen * 4, 8);
188 tuninfo->ioamh.opt_len = sizeof(tuninfo->ioamh) - 2 + sizeof(*trace)
189 + trace->remlen * 4;
191 memcpy(&tuninfo->traceh, trace, sizeof(*trace));
193 if (len_aligned - trace->remlen * 4) {
194 tuninfo->traceh.data[trace->remlen * 4] = IPV6_TLV_PADN;
195 tuninfo->traceh.data[trace->remlen * 4 + 1] = 2;
208 struct ioam6_trace_hdr *trace;
211 trace = (struct ioam6_trace_hdr *)(skb_transport_header(skb)
215 ns = ioam6_namespace(net, trace->namespace_id);
217 ioam6_fill_trace_data(skb, ns, trace, false);