Lines Matching refs:tlv_off
130 uint32_t *tlv_off, uint32_t *pad_size, in is_valid_tlv_boundary() argument
149 if (cur_off == *tlv_off) in is_valid_tlv_boundary()
163 if (*tlv_off == srh_off) { in is_valid_tlv_boundary()
164 *tlv_off = cur_off; in is_valid_tlv_boundary()
179 if (*tlv_off == -1) in is_valid_tlv_boundary()
180 *tlv_off = cur_off; in is_valid_tlv_boundary()
188 int add_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off, in add_tlv() argument
198 if (tlv_off != -1) in add_tlv()
199 tlv_off += srh_off; in add_tlv()
204 err = is_valid_tlv_boundary(skb, srh, &tlv_off, &pad_size, &pad_off); in add_tlv()
208 err = bpf_lwt_seg6_adjust_srh(skb, tlv_off, sizeof(*itlv) + itlv->len); in add_tlv()
212 err = bpf_lwt_seg6_store_bytes(skb, tlv_off, (void *)itlv, tlv_size); in add_tlv()
233 uint32_t tlv_off) in delete_tlv() argument
243 tlv_off += srh_off; in delete_tlv()
245 err = is_valid_tlv_boundary(skb, srh, &tlv_off, &pad_size, &pad_off); in delete_tlv()
249 err = bpf_skb_load_bytes(skb, tlv_off, &tlv, sizeof(tlv)); in delete_tlv()
253 err = bpf_lwt_seg6_adjust_srh(skb, tlv_off, -(sizeof(tlv) + tlv.len)); in delete_tlv()