Lines Matching refs:spi
73 __be32 spi, u8 proto, unsigned short family) in xfrm_spi_hash() argument
75 return __xfrm_spi_hash(daddr, spi, proto, family, net->xfrm.state_hmask); in xfrm_spi_hash()
100 if (x->id.spi) { in xfrm_hash_transfer()
101 h = __xfrm_spi_hash(&x->id.daddr, x->id.spi, in xfrm_hash_transfer()
472 if (x->km.state == XFRM_STATE_ACQ && x->id.spi == 0) in xfrm_timer_handler()
543 if (x->id.spi) in __xfrm_state_delete()
674 __be32 spi, u8 proto, in __xfrm_state_lookup() argument
677 unsigned int h = xfrm_spi_hash(net, daddr, spi, proto, family); in __xfrm_state_lookup()
682 x->id.spi != spi || in __xfrm_state_lookup()
730 x->id.spi, x->id.proto, family); in __xfrm_state_locate()
815 (tmpl->id.spi == x->id.spi || !tmpl->id.spi)) in xfrm_state_find()
831 (tmpl->id.spi == x->id.spi || !tmpl->id.spi)) in xfrm_state_find()
839 if (tmpl->id.spi && in xfrm_state_find()
840 (x0 = __xfrm_state_lookup(net, mark, daddr, tmpl->id.spi, in xfrm_state_find()
882 if (x->id.spi) { in xfrm_state_find()
883 h = xfrm_spi_hash(net, &x->id.daddr, x->id.spi, x->id.proto, encap_family); in xfrm_state_find()
955 struct xfrm_state *xfrm_state_lookup_byspi(struct net *net, __be32 spi, in xfrm_state_lookup_byspi() argument
965 x->id.spi != spi) in xfrm_state_lookup_byspi()
991 if (x->id.spi) { in __xfrm_state_insert()
992 h = xfrm_spi_hash(net, &x->id.daddr, x->id.spi, x->id.proto, in __xfrm_state_insert()
1057 x->id.spi != 0 || in __find_acq_core()
1432 xfrm_state_lookup(struct net *net, u32 mark, const xfrm_address_t *daddr, __be32 spi, in xfrm_state_lookup() argument
1438 x = __xfrm_state_lookup(net, mark, daddr, spi, proto, family); in xfrm_state_lookup()
1597 if (x->id.spi) in xfrm_alloc_spi()
1608 x->id.spi = minspi; in xfrm_alloc_spi()
1610 u32 spi = 0; in xfrm_alloc_spi() local
1612 spi = low + prandom_u32()%(high-low+1); in xfrm_alloc_spi()
1613 x0 = xfrm_state_lookup(net, mark, &x->id.daddr, htonl(spi), x->id.proto, x->props.family); in xfrm_alloc_spi()
1615 x->id.spi = htonl(spi); in xfrm_alloc_spi()
1621 if (x->id.spi) { in xfrm_alloc_spi()
1623 h = xfrm_spi_hash(net, &x->id.daddr, x->id.spi, x->id.proto, x->props.family); in xfrm_alloc_spi()
2190 u32 spi = ntohl(x->id.spi); in xfrm_audit_helper_sainfo() local
2207 audit_log_format(audit_buf, " spi=%u(0x%x)", spi, spi); in xfrm_audit_helper_sainfo()
2266 u32 spi; in xfrm_audit_state_replay_overflow() local
2274 spi = ntohl(x->id.spi); in xfrm_audit_state_replay_overflow()
2275 audit_log_format(audit_buf, " spi=%u(0x%x)", spi, spi); in xfrm_audit_state_replay_overflow()
2284 u32 spi; in xfrm_audit_state_replay() local
2290 spi = ntohl(x->id.spi); in xfrm_audit_state_replay()
2292 spi, spi, ntohl(net_seq)); in xfrm_audit_state_replay()
2313 u32 spi; in xfrm_audit_state_notfound() local
2319 spi = ntohl(net_spi); in xfrm_audit_state_notfound()
2321 spi, spi, ntohl(net_seq)); in xfrm_audit_state_notfound()
2338 u32 spi = ntohl(net_spi); in xfrm_audit_state_icvfail() local
2340 spi, spi, ntohl(net_seq)); in xfrm_audit_state_icvfail()