Lines Matching +full:- +full:eproto
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson AB 2010
19 cfpkt_priv(pkt)->erronous = true; \
20 skb_reset_tail_pointer(&pkt->skb); \
40 return (struct cfpkt_priv_data *) pkt->skb.cb; in cfpkt_priv()
45 return cfpkt_priv(pkt)->erronous; in is_erronous()
50 return &pkt->skb; in pkt_to_skb()
61 cfpkt_priv(pkt)->erronous = false; in cfpkt_fromnative()
98 return skb->len > 0; in cfpkt_more()
105 memcpy(data, skb->data, len); in cfpkt_peek_head()
117 return -EPROTO; in cfpkt_extr_head()
119 if (unlikely(len > skb->len)) { in cfpkt_extr_head()
121 return -EPROTO; in cfpkt_extr_head()
127 return -EPROTO; in cfpkt_extr_head()
131 from -= len; in cfpkt_extr_head()
144 return -EPROTO; in cfpkt_extr_trail()
148 return -EPROTO; in cfpkt_extr_trail()
150 if (unlikely(skb->data + len > skb_tail_pointer(skb))) { in cfpkt_extr_trail()
152 return -EPROTO; in cfpkt_extr_trail()
154 from = skb_tail_pointer(skb) - len; in cfpkt_extr_trail()
155 skb_trim(skb, skb->len - len); in cfpkt_extr_trail()
174 return -EPROTO; in cfpkt_add_body()
192 return -EPROTO; in cfpkt_add_body()
216 return -EPROTO; in cfpkt_add_head()
219 return -EPROTO; in cfpkt_add_head()
243 return skb->len; in cfpkt_getlen()
252 * Checksum should not be used on high-speed interfaces anyway. in cfpkt_iterate()
255 return -EPROTO; in cfpkt_iterate()
256 if (unlikely(skb_linearize(&pkt->skb) != 0)) { in cfpkt_iterate()
258 return -EPROTO; in cfpkt_iterate()
260 return iter_func(data, pkt->skb.data, cfpkt_getlen(pkt)); in cfpkt_iterate()
269 return -EPROTO; in cfpkt_setlen()
271 if (likely(len <= skb->len)) { in cfpkt_setlen()
272 if (unlikely(skb->data_len)) in cfpkt_setlen()
281 if (unlikely(!cfpkt_pad_trail(pkt, len - skb->len))) in cfpkt_setlen()
304 if (dst->tail + neededtailspace > dst->end) { in cfpkt_append()
313 skb_put_data(tmp, dst->data, dstlen); in cfpkt_append()
317 skb_put_data(dst, add->data, skb_headlen(add)); in cfpkt_append()
327 u8 *split = skb->data + pos; in cfpkt_split()
328 u16 len2nd = skb_tail_pointer(skb) - split; in cfpkt_split()
333 if (skb->data + pos > skb_tail_pointer(skb)) { in cfpkt_split()
354 skb2->priority = skb->priority; in cfpkt_split()
360 return cfpkt_priv(pkt)->erronous; in cfpkt_erroneous()
365 return (struct caif_payload_info *)&pkt_to_skb(pkt)->cb; in cfpkt_info()
371 pkt_to_skb(pkt)->priority = prio; in cfpkt_set_prio()