Lines Matching refs:seq

14 	u32 seq, seq_hi, bottom;  in xfrm_replay_seqhi()  local
20 seq = ntohl(net_seq); in xfrm_replay_seqhi()
22 bottom = replay_esn->seq - replay_esn->replay_window + 1; in xfrm_replay_seqhi()
24 if (likely(replay_esn->seq >= replay_esn->replay_window - 1)) { in xfrm_replay_seqhi()
26 if (unlikely(seq < bottom)) in xfrm_replay_seqhi()
30 if (unlikely(seq >= bottom)) in xfrm_replay_seqhi()
68 ((x->replay.seq - x->preplay.seq < x->replay_maxdiff) && in xfrm_replay_notify()
104 XFRM_SKB_CB(skb)->seq.output.low = ++x->replay.oseq; in __xfrm_replay_overflow()
105 XFRM_SKB_CB(skb)->seq.output.hi = 0; in __xfrm_replay_overflow()
125 u32 seq = ntohl(net_seq); in xfrm_replay_check_legacy() local
130 if (unlikely(seq == 0)) in xfrm_replay_check_legacy()
133 if (likely(seq > x->replay.seq)) in xfrm_replay_check_legacy()
136 diff = x->replay.seq - seq; in xfrm_replay_check_legacy()
158 u32 diff, seq; in xfrm_replay_advance() local
172 seq = ntohl(net_seq); in xfrm_replay_advance()
173 if (seq > x->replay.seq) { in xfrm_replay_advance()
174 diff = seq - x->replay.seq; in xfrm_replay_advance()
179 x->replay.seq = seq; in xfrm_replay_advance()
181 diff = x->replay.seq - seq; in xfrm_replay_advance()
196 XFRM_SKB_CB(skb)->seq.output.low = ++replay_esn->oseq; in xfrm_replay_overflow_bmp()
197 XFRM_SKB_CB(skb)->seq.output.hi = 0; in xfrm_replay_overflow_bmp()
219 u32 seq = ntohl(net_seq); in xfrm_replay_check_bmp() local
220 u32 diff = replay_esn->seq - seq; in xfrm_replay_check_bmp()
225 if (unlikely(seq == 0)) in xfrm_replay_check_bmp()
228 if (likely(seq > replay_esn->seq)) in xfrm_replay_check_bmp()
236 pos = (replay_esn->seq - 1) % replay_esn->replay_window; in xfrm_replay_check_bmp()
262 u32 seq = ntohl(net_seq); in xfrm_replay_advance_bmp() local
268 pos = (replay_esn->seq - 1) % replay_esn->replay_window; in xfrm_replay_advance_bmp()
270 if (seq > replay_esn->seq) { in xfrm_replay_advance_bmp()
271 diff = seq - replay_esn->seq; in xfrm_replay_advance_bmp()
287 replay_esn->seq = seq; in xfrm_replay_advance_bmp()
289 diff = replay_esn->seq - seq; in xfrm_replay_advance_bmp()
324 ((replay_esn->seq - preplay_esn->seq < x->replay_maxdiff) && in xfrm_replay_notify_bmp()
377 seq_diff = replay_esn->seq - preplay_esn->seq; in xfrm_replay_notify_esn()
379 seq_diff = ~preplay_esn->seq + replay_esn->seq in xfrm_replay_notify_esn()
429 XFRM_SKB_CB(skb)->seq.output.low = ++replay_esn->oseq; in xfrm_replay_overflow_esn()
430 XFRM_SKB_CB(skb)->seq.output.hi = replay_esn->oseq_hi; in xfrm_replay_overflow_esn()
433 XFRM_SKB_CB(skb)->seq.output.hi = ++replay_esn->oseq_hi; in xfrm_replay_overflow_esn()
458 u32 seq = ntohl(net_seq); in xfrm_replay_check_esn() local
460 u32 top = replay_esn->seq; in xfrm_replay_check_esn()
466 if (unlikely(seq == 0 && replay_esn->seq_hi == 0 && in xfrm_replay_check_esn()
467 (replay_esn->seq < replay_esn->replay_window - 1))) in xfrm_replay_check_esn()
470 diff = top - seq; in xfrm_replay_check_esn()
474 if (likely(seq > top) || seq < bottom) in xfrm_replay_check_esn()
478 if (likely(seq > top && seq < bottom)) in xfrm_replay_check_esn()
480 if (seq >= bottom) in xfrm_replay_check_esn()
481 diff = ~seq + top + 1; in xfrm_replay_check_esn()
489 pos = (replay_esn->seq - 1) % replay_esn->replay_window; in xfrm_replay_check_esn()
528 if (unlikely(XFRM_SKB_CB(skb)->seq.input.hi != in xfrm_replay_recheck_esn()
557 u32 diff, pos, seq, seq_hi; in xfrm_replay_advance_esn() local
563 seq = ntohl(net_seq); in xfrm_replay_advance_esn()
564 pos = (replay_esn->seq - 1) % replay_esn->replay_window; in xfrm_replay_advance_esn()
568 if ((!wrap && seq > replay_esn->seq) || wrap > 0) { in xfrm_replay_advance_esn()
570 diff = seq - replay_esn->seq; in xfrm_replay_advance_esn()
572 diff = ~replay_esn->seq + seq + 1; in xfrm_replay_advance_esn()
588 replay_esn->seq = seq; in xfrm_replay_advance_esn()
593 diff = replay_esn->seq - seq; in xfrm_replay_advance_esn()
624 XFRM_SKB_CB(skb)->seq.output.low = ++oseq; in xfrm_replay_overflow_offload()
625 xo->seq.low = oseq; in xfrm_replay_overflow_offload()
627 XFRM_SKB_CB(skb)->seq.output.low = oseq + 1; in xfrm_replay_overflow_offload()
628 xo->seq.low = oseq + 1; in xfrm_replay_overflow_offload()
632 XFRM_SKB_CB(skb)->seq.output.hi = 0; in xfrm_replay_overflow_offload()
633 xo->seq.hi = 0; in xfrm_replay_overflow_offload()
664 XFRM_SKB_CB(skb)->seq.output.low = ++oseq; in xfrm_replay_overflow_offload_bmp()
665 xo->seq.low = oseq; in xfrm_replay_overflow_offload_bmp()
667 XFRM_SKB_CB(skb)->seq.output.low = oseq + 1; in xfrm_replay_overflow_offload_bmp()
668 xo->seq.low = oseq + 1; in xfrm_replay_overflow_offload_bmp()
672 XFRM_SKB_CB(skb)->seq.output.hi = 0; in xfrm_replay_overflow_offload_bmp()
673 xo->seq.hi = 0; in xfrm_replay_overflow_offload_bmp()
705 XFRM_SKB_CB(skb)->seq.output.low = ++oseq; in xfrm_replay_overflow_offload_esn()
706 XFRM_SKB_CB(skb)->seq.output.hi = oseq_hi; in xfrm_replay_overflow_offload_esn()
707 xo->seq.low = oseq; in xfrm_replay_overflow_offload_esn()
708 xo->seq.hi = oseq_hi; in xfrm_replay_overflow_offload_esn()
710 XFRM_SKB_CB(skb)->seq.output.low = oseq + 1; in xfrm_replay_overflow_offload_esn()
711 XFRM_SKB_CB(skb)->seq.output.hi = oseq_hi; in xfrm_replay_overflow_offload_esn()
712 xo->seq.low = oseq + 1; in xfrm_replay_overflow_offload_esn()
713 xo->seq.hi = oseq_hi; in xfrm_replay_overflow_offload_esn()
717 if (unlikely(xo->seq.low < replay_esn->oseq)) { in xfrm_replay_overflow_offload_esn()
718 XFRM_SKB_CB(skb)->seq.output.hi = ++oseq_hi; in xfrm_replay_overflow_offload_esn()
719 xo->seq.hi = oseq_hi; in xfrm_replay_overflow_offload_esn()