replay_esn 117 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c struct xfrm_replay_state_esn *replay_esn; replay_esn 127 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c replay_esn = sa_entry->x->replay_esn; replay_esn 128 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c seq_bottom = replay_esn->seq - replay_esn->replay_window + 1; replay_esn 171 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 172 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c __u32 oseq = replay_esn->oseq; replay_esn 208 include/net/xfrm.h struct xfrm_replay_state_esn *replay_esn; replay_esn 1763 include/net/xfrm.h static inline unsigned int xfrm_replay_state_esn_len(struct xfrm_replay_state_esn *replay_esn) replay_esn 1765 include/net/xfrm.h return sizeof(*replay_esn) + replay_esn->bmp_len * sizeof(__u32); replay_esn 1772 include/net/xfrm.h x->replay_esn = kzalloc(xfrm_replay_state_esn_len(orig->replay_esn), replay_esn 1774 include/net/xfrm.h if (!x->replay_esn) replay_esn 1777 include/net/xfrm.h x->replay_esn->bmp_len = orig->replay_esn->bmp_len; replay_esn 1778 include/net/xfrm.h x->replay_esn->replay_window = orig->replay_esn->replay_window; replay_esn 1780 include/net/xfrm.h x->preplay_esn = kmemdup(x->replay_esn, replay_esn 1781 include/net/xfrm.h xfrm_replay_state_esn_len(x->replay_esn), replay_esn 1784 include/net/xfrm.h kfree(x->replay_esn); replay_esn 15 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 21 net/xfrm/xfrm_replay.c seq_hi = replay_esn->seq_hi; replay_esn 22 net/xfrm/xfrm_replay.c bottom = replay_esn->seq - replay_esn->replay_window + 1; replay_esn 24 net/xfrm/xfrm_replay.c if (likely(replay_esn->seq >= replay_esn->replay_window - 1)) { replay_esn 165 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 169 net/xfrm/xfrm_replay.c XFRM_SKB_CB(skb)->seq.output.low = ++replay_esn->oseq; replay_esn 171 net/xfrm/xfrm_replay.c if (unlikely(replay_esn->oseq == 0)) { replay_esn 172 net/xfrm/xfrm_replay.c replay_esn->oseq--; replay_esn 189 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 192 net/xfrm/xfrm_replay.c u32 diff = replay_esn->seq - seq; replay_esn 194 net/xfrm/xfrm_replay.c if (!replay_esn->replay_window) replay_esn 200 net/xfrm/xfrm_replay.c if (likely(seq > replay_esn->seq)) replay_esn 203 net/xfrm/xfrm_replay.c if (diff >= replay_esn->replay_window) { replay_esn 208 net/xfrm/xfrm_replay.c pos = (replay_esn->seq - 1) % replay_esn->replay_window; replay_esn 211 net/xfrm/xfrm_replay.c bitnr = (pos - diff) % replay_esn->replay_window; replay_esn 213 net/xfrm/xfrm_replay.c bitnr = replay_esn->replay_window - (diff - pos); replay_esn 217 net/xfrm/xfrm_replay.c if (replay_esn->bmp[nr] & (1U << bitnr)) replay_esn 233 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 237 net/xfrm/xfrm_replay.c if (!replay_esn->replay_window) replay_esn 240 net/xfrm/xfrm_replay.c pos = (replay_esn->seq - 1) % replay_esn->replay_window; replay_esn 242 net/xfrm/xfrm_replay.c if (seq > replay_esn->seq) { replay_esn 243 net/xfrm/xfrm_replay.c diff = seq - replay_esn->seq; replay_esn 245 net/xfrm/xfrm_replay.c if (diff < replay_esn->replay_window) { replay_esn 247 net/xfrm/xfrm_replay.c bitnr = (pos + i) % replay_esn->replay_window; replay_esn 250 net/xfrm/xfrm_replay.c replay_esn->bmp[nr] &= ~(1U << bitnr); replay_esn 253 net/xfrm/xfrm_replay.c nr = (replay_esn->replay_window - 1) >> 5; replay_esn 255 net/xfrm/xfrm_replay.c replay_esn->bmp[i] = 0; replay_esn 258 net/xfrm/xfrm_replay.c bitnr = (pos + diff) % replay_esn->replay_window; replay_esn 259 net/xfrm/xfrm_replay.c replay_esn->seq = seq; replay_esn 261 net/xfrm/xfrm_replay.c diff = replay_esn->seq - seq; replay_esn 264 net/xfrm/xfrm_replay.c bitnr = (pos - diff) % replay_esn->replay_window; replay_esn 266 net/xfrm/xfrm_replay.c bitnr = replay_esn->replay_window - (diff - pos); replay_esn 271 net/xfrm/xfrm_replay.c replay_esn->bmp[nr] |= (1U << bitnr); replay_esn 280 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 296 net/xfrm/xfrm_replay.c ((replay_esn->seq - preplay_esn->seq < x->replay_maxdiff) && replay_esn 297 net/xfrm/xfrm_replay.c (replay_esn->oseq - preplay_esn->oseq replay_esn 308 net/xfrm/xfrm_replay.c if (memcmp(x->replay_esn, x->preplay_esn, replay_esn 309 net/xfrm/xfrm_replay.c xfrm_replay_state_esn_len(replay_esn)) == 0) { replay_esn 317 net/xfrm/xfrm_replay.c memcpy(x->preplay_esn, x->replay_esn, replay_esn 318 net/xfrm/xfrm_replay.c xfrm_replay_state_esn_len(replay_esn)); replay_esn 332 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 348 net/xfrm/xfrm_replay.c if (replay_esn->seq_hi == preplay_esn->seq_hi) replay_esn 349 net/xfrm/xfrm_replay.c seq_diff = replay_esn->seq - preplay_esn->seq; replay_esn 351 net/xfrm/xfrm_replay.c seq_diff = ~preplay_esn->seq + replay_esn->seq replay_esn 354 net/xfrm/xfrm_replay.c if (replay_esn->oseq_hi == preplay_esn->oseq_hi) replay_esn 355 net/xfrm/xfrm_replay.c oseq_diff = replay_esn->oseq replay_esn 359 net/xfrm/xfrm_replay.c + replay_esn->oseq + 1; replay_esn 374 net/xfrm/xfrm_replay.c if (memcmp(x->replay_esn, x->preplay_esn, replay_esn 375 net/xfrm/xfrm_replay.c xfrm_replay_state_esn_len(replay_esn)) == 0) { replay_esn 383 net/xfrm/xfrm_replay.c memcpy(x->preplay_esn, x->replay_esn, replay_esn 384 net/xfrm/xfrm_replay.c xfrm_replay_state_esn_len(replay_esn)); replay_esn 397 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 401 net/xfrm/xfrm_replay.c XFRM_SKB_CB(skb)->seq.output.low = ++replay_esn->oseq; replay_esn 402 net/xfrm/xfrm_replay.c XFRM_SKB_CB(skb)->seq.output.hi = replay_esn->oseq_hi; replay_esn 404 net/xfrm/xfrm_replay.c if (unlikely(replay_esn->oseq == 0)) { replay_esn 405 net/xfrm/xfrm_replay.c XFRM_SKB_CB(skb)->seq.output.hi = ++replay_esn->oseq_hi; replay_esn 407 net/xfrm/xfrm_replay.c if (replay_esn->oseq_hi == 0) { replay_esn 408 net/xfrm/xfrm_replay.c replay_esn->oseq--; replay_esn 409 net/xfrm/xfrm_replay.c replay_esn->oseq_hi--; replay_esn 428 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 431 net/xfrm/xfrm_replay.c u32 wsize = replay_esn->replay_window; replay_esn 432 net/xfrm/xfrm_replay.c u32 top = replay_esn->seq; replay_esn 438 net/xfrm/xfrm_replay.c if (unlikely(seq == 0 && replay_esn->seq_hi == 0 && replay_esn 439 net/xfrm/xfrm_replay.c (replay_esn->seq < replay_esn->replay_window - 1))) replay_esn 456 net/xfrm/xfrm_replay.c if (diff >= replay_esn->replay_window) { replay_esn 461 net/xfrm/xfrm_replay.c pos = (replay_esn->seq - 1) % replay_esn->replay_window; replay_esn 464 net/xfrm/xfrm_replay.c bitnr = (pos - diff) % replay_esn->replay_window; replay_esn 466 net/xfrm/xfrm_replay.c bitnr = replay_esn->replay_window - (diff - pos); replay_esn 470 net/xfrm/xfrm_replay.c if (replay_esn->bmp[nr] & (1U << bitnr)) replay_esn 499 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 501 net/xfrm/xfrm_replay.c if (!replay_esn->replay_window) replay_esn 505 net/xfrm/xfrm_replay.c pos = (replay_esn->seq - 1) % replay_esn->replay_window; replay_esn 507 net/xfrm/xfrm_replay.c wrap = seq_hi - replay_esn->seq_hi; replay_esn 509 net/xfrm/xfrm_replay.c if ((!wrap && seq > replay_esn->seq) || wrap > 0) { replay_esn 511 net/xfrm/xfrm_replay.c diff = seq - replay_esn->seq; replay_esn 513 net/xfrm/xfrm_replay.c diff = ~replay_esn->seq + seq + 1; replay_esn 515 net/xfrm/xfrm_replay.c if (diff < replay_esn->replay_window) { replay_esn 517 net/xfrm/xfrm_replay.c bitnr = (pos + i) % replay_esn->replay_window; replay_esn 520 net/xfrm/xfrm_replay.c replay_esn->bmp[nr] &= ~(1U << bitnr); replay_esn 523 net/xfrm/xfrm_replay.c nr = (replay_esn->replay_window - 1) >> 5; replay_esn 525 net/xfrm/xfrm_replay.c replay_esn->bmp[i] = 0; replay_esn 528 net/xfrm/xfrm_replay.c bitnr = (pos + diff) % replay_esn->replay_window; replay_esn 529 net/xfrm/xfrm_replay.c replay_esn->seq = seq; replay_esn 532 net/xfrm/xfrm_replay.c replay_esn->seq_hi++; replay_esn 534 net/xfrm/xfrm_replay.c diff = replay_esn->seq - seq; replay_esn 537 net/xfrm/xfrm_replay.c bitnr = (pos - diff) % replay_esn->replay_window; replay_esn 539 net/xfrm/xfrm_replay.c bitnr = replay_esn->replay_window - (diff - pos); replay_esn 546 net/xfrm/xfrm_replay.c replay_esn->bmp[nr] |= (1U << bitnr); replay_esn 595 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 597 net/xfrm/xfrm_replay.c __u32 oseq = replay_esn->oseq; replay_esn 614 net/xfrm/xfrm_replay.c if (unlikely(oseq < replay_esn->oseq)) { replay_esn 620 net/xfrm/xfrm_replay.c replay_esn->oseq = oseq; replay_esn 634 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 636 net/xfrm/xfrm_replay.c __u32 oseq = replay_esn->oseq; replay_esn 637 net/xfrm/xfrm_replay.c __u32 oseq_hi = replay_esn->oseq_hi; replay_esn 656 net/xfrm/xfrm_replay.c if (unlikely(oseq < replay_esn->oseq)) { replay_esn 659 net/xfrm/xfrm_replay.c replay_esn->oseq_hi = oseq_hi; replay_esn 660 net/xfrm/xfrm_replay.c if (replay_esn->oseq_hi == 0) { replay_esn 661 net/xfrm/xfrm_replay.c replay_esn->oseq--; replay_esn 662 net/xfrm/xfrm_replay.c replay_esn->oseq_hi--; replay_esn 670 net/xfrm/xfrm_replay.c replay_esn->oseq = oseq; replay_esn 730 net/xfrm/xfrm_replay.c struct xfrm_replay_state_esn *replay_esn = x->replay_esn; replay_esn 732 net/xfrm/xfrm_replay.c if (replay_esn) { replay_esn 733 net/xfrm/xfrm_replay.c if (replay_esn->replay_window > replay_esn 734 net/xfrm/xfrm_replay.c replay_esn->bmp_len * sizeof(__u32) * 8) replay_esn 738 net/xfrm/xfrm_replay.c if (replay_esn->replay_window == 0) replay_esn 490 net/xfrm/xfrm_state.c kfree(x->replay_esn); replay_esn 1504 net/xfrm/xfrm_state.c if (orig->replay_esn) { replay_esn 425 net/xfrm/xfrm_user.c static inline int xfrm_replay_verify_len(struct xfrm_replay_state_esn *replay_esn, replay_esn 431 net/xfrm/xfrm_user.c if (!replay_esn || !rp) replay_esn 440 net/xfrm/xfrm_user.c xfrm_replay_state_esn_len(replay_esn) != ulen || replay_esn 441 net/xfrm/xfrm_user.c replay_esn->bmp_len != up->bmp_len) replay_esn 450 net/xfrm/xfrm_user.c static int xfrm_alloc_replay_state_esn(struct xfrm_replay_state_esn **replay_esn, replay_esn 477 net/xfrm/xfrm_user.c *replay_esn = p; replay_esn 526 net/xfrm/xfrm_user.c struct xfrm_replay_state_esn *replay_esn; replay_esn 527 net/xfrm/xfrm_user.c replay_esn = nla_data(re); replay_esn 528 net/xfrm/xfrm_user.c memcpy(x->replay_esn, replay_esn, replay_esn 529 net/xfrm/xfrm_user.c xfrm_replay_state_esn_len(replay_esn)); replay_esn 530 net/xfrm/xfrm_user.c memcpy(x->preplay_esn, replay_esn, replay_esn 531 net/xfrm/xfrm_user.c xfrm_replay_state_esn_len(replay_esn)); replay_esn 638 net/xfrm/xfrm_user.c if ((err = xfrm_alloc_replay_state_esn(&x->replay_esn, &x->preplay_esn, replay_esn 949 net/xfrm/xfrm_user.c if (x->replay_esn) replay_esn 951 net/xfrm/xfrm_user.c xfrm_replay_state_esn_len(x->replay_esn), replay_esn 952 net/xfrm/xfrm_user.c x->replay_esn); replay_esn 1962 net/xfrm/xfrm_user.c unsigned int replay_size = x->replay_esn ? replay_esn 1963 net/xfrm/xfrm_user.c xfrm_replay_state_esn_len(x->replay_esn) : replay_esn 1994 net/xfrm/xfrm_user.c if (x->replay_esn) { replay_esn 1996 net/xfrm/xfrm_user.c xfrm_replay_state_esn_len(x->replay_esn), replay_esn 1997 net/xfrm/xfrm_user.c x->replay_esn); replay_esn 2112 net/xfrm/xfrm_user.c err = xfrm_replay_verify_len(x->replay_esn, re); replay_esn 2803 net/xfrm/xfrm_user.c if (x->replay_esn) replay_esn 2804 net/xfrm/xfrm_user.c l += nla_total_size(xfrm_replay_state_esn_len(x->replay_esn));