Lines Matching full:tsn

10  * These functions manipulate sctp tsn mapping array.
63 /* Test the tracking state of this TSN.
65 * 0 if the TSN has not yet been seen
66 * >0 if the TSN has been seen (duplicate)
67 * <0 if the TSN is invalid (too large to track)
69 int sctp_tsnmap_check(const struct sctp_tsnmap *map, __u32 tsn) in sctp_tsnmap_check() argument
73 /* Check to see if this is an old TSN */ in sctp_tsnmap_check()
74 if (TSN_lte(tsn, map->cumulative_tsn_ack_point)) in sctp_tsnmap_check()
77 /* Verify that we can hold this TSN and that it will not in sctp_tsnmap_check()
80 if (!TSN_lt(tsn, map->base_tsn + SCTP_TSN_MAP_SIZE)) in sctp_tsnmap_check()
84 gap = tsn - map->base_tsn; in sctp_tsnmap_check()
86 /* Check to see if TSN has already been recorded. */ in sctp_tsnmap_check()
94 /* Mark this TSN as seen. */
95 int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn, in sctp_tsnmap_mark() argument
100 if (TSN_lt(tsn, map->base_tsn)) in sctp_tsnmap_mark()
103 gap = tsn - map->base_tsn; in sctp_tsnmap_mark()
109 /* In this case the map has no gaps and the tsn we are in sctp_tsnmap_mark()
110 * recording is the next expected tsn. We don't touch in sctp_tsnmap_mark()
125 if (TSN_lt(map->max_tsn_seen, tsn)) in sctp_tsnmap_mark()
126 map->max_tsn_seen = tsn; in sctp_tsnmap_mark()
128 /* Mark the TSN as received. */ in sctp_tsnmap_mark()
131 /* Go fixup any internal TSN mapping variables including in sctp_tsnmap_mark()
145 /* Only start looking one past the Cumulative TSN Ack Point. */ in sctp_tsnmap_iter_init()
176 * Cumulative TSN Ack which is always 1 behind base. in sctp_tsnmap_next_gap_ack()
189 /* Mark this and any lower TSN as seen. */
190 void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn) in sctp_tsnmap_skip() argument
194 if (TSN_lt(tsn, map->base_tsn)) in sctp_tsnmap_skip()
196 if (!TSN_lt(tsn, map->base_tsn + SCTP_TSN_MAP_SIZE)) in sctp_tsnmap_skip()
200 if (TSN_lt(map->max_tsn_seen, tsn)) in sctp_tsnmap_skip()
201 map->max_tsn_seen = tsn; in sctp_tsnmap_skip()
203 gap = tsn - map->base_tsn + 1; in sctp_tsnmap_skip()
226 * the Cumulative TSN Ack Point.
281 /* Also, stop looking past the maximum TSN seen. */ in sctp_tsnmap_find_gap_ack()
299 /* Renege that we have seen a TSN. */
300 void sctp_tsnmap_renege(struct sctp_tsnmap *map, __u32 tsn) in sctp_tsnmap_renege() argument
304 if (TSN_lt(tsn, map->base_tsn)) in sctp_tsnmap_renege()
306 /* Assert: TSN is in range. */ in sctp_tsnmap_renege()
307 if (!TSN_lt(tsn, map->base_tsn + map->len)) in sctp_tsnmap_renege()
310 gap = tsn - map->base_tsn; in sctp_tsnmap_renege()
312 /* Pretend we never saw the TSN. */ in sctp_tsnmap_renege()