• Home
  • Raw
  • Download

Lines Matching refs:msk

59 		struct mctp_sock *msk = container_of(sk, struct mctp_sock, sk);  in mctp_lookup_bind()  local
61 if (msk->bind_net != MCTP_NET_ANY && msk->bind_net != cb->net) in mctp_lookup_bind()
64 if (msk->bind_type != type) in mctp_lookup_bind()
67 if (!mctp_address_matches(msk->bind_addr, mh->dest)) in mctp_lookup_bind()
70 return msk; in mctp_lookup_bind()
133 static struct mctp_sk_key *mctp_key_alloc(struct mctp_sock *msk, in mctp_key_alloc() argument
146 key->sk = &msk->sk; in mctp_key_alloc()
173 static int mctp_key_add(struct mctp_sk_key *key, struct mctp_sock *msk) in mctp_key_add() argument
175 struct net *net = sock_net(&msk->sk); in mctp_key_add()
182 if (sock_flag(&msk->sk, SOCK_DEAD)) { in mctp_key_add()
202 timer_reduce(&msk->key_expiry, key->expiry); in mctp_key_add()
205 hlist_add_head(&key->sklist, &msk->keys); in mctp_key_add()
328 struct mctp_sock *msk; in mctp_route_input() local
334 msk = NULL; in mctp_route_input()
365 msk = container_of(key->sk, struct mctp_sock, sk); in mctp_route_input()
374 msk = container_of(any_key->sk, in mctp_route_input()
380 if (!key && !msk && (tag & MCTP_HDR_FLAG_TO)) in mctp_route_input()
381 msk = mctp_lookup_bind(net, skb); in mctp_route_input()
383 if (!msk) { in mctp_route_input()
392 sock_queue_rcv_skb(&msk->sk, skb); in mctp_route_input()
409 key = mctp_key_alloc(msk, mh->dest, mh->src, in mctp_route_input()
427 rc = mctp_key_add(key, msk); in mctp_route_input()
582 struct mctp_sock *msk) in mctp_reserve_tag() argument
589 timer_reduce(&msk->key_expiry, key->expiry); in mctp_reserve_tag()
595 hlist_add_head_rcu(&key->sklist, &msk->keys); in mctp_reserve_tag()
602 struct mctp_sk_key *mctp_alloc_local_tag(struct mctp_sock *msk, in mctp_alloc_local_tag() argument
606 struct net *net = sock_net(&msk->sk); in mctp_alloc_local_tag()
617 key = mctp_key_alloc(msk, saddr, daddr, 0, GFP_KERNEL); in mctp_alloc_local_tag()
656 mctp_reserve_tag(net, key, msk); in mctp_alloc_local_tag()
673 static struct mctp_sk_key *mctp_lookup_prealloc_tag(struct mctp_sock *msk, in mctp_lookup_prealloc_tag() argument
677 struct net *net = sock_net(&msk->sk); in mctp_lookup_prealloc_tag()
865 struct mctp_sock *msk = container_of(sk, struct mctp_sock, sk); in mctp_local_output() local
928 key = mctp_lookup_prealloc_tag(msk, daddr, in mctp_local_output()
931 key = mctp_alloc_local_tag(msk, daddr, saddr, in mctp_local_output()