Lines Matching refs:pkey

48 	struct pkey_index_qp_list *pkey = NULL;  in get_pkey_idx_qp_list()  local
56 pkey = tmp_pkey; in get_pkey_idx_qp_list()
61 return pkey; in get_pkey_idx_qp_list()
65 u16 *pkey, in get_pkey_and_subnet_prefix() argument
71 ret = ib_get_cached_pkey(dev, pp->port_num, pp->pkey_index, pkey); in get_pkey_and_subnet_prefix()
80 static int enforce_qp_pkey_security(u16 pkey, in enforce_qp_pkey_security() argument
87 ret = security_ib_pkey_access(qp_sec->security, subnet_prefix, pkey); in enforce_qp_pkey_security()
96 pkey); in enforce_qp_pkey_security()
115 u16 pkey; in check_qp_port_pkey_settings() local
123 &pkey, in check_qp_port_pkey_settings()
128 ret = enforce_qp_pkey_security(pkey, in check_qp_port_pkey_settings()
137 &pkey, in check_qp_port_pkey_settings()
142 ret = enforce_qp_pkey_security(pkey, in check_qp_port_pkey_settings()
194 static inline void check_pkey_qps(struct pkey_index_qp_list *pkey, in check_pkey_qps() argument
206 pkey->pkey_index, in check_pkey_qps()
208 spin_lock(&pkey->qp_list_lock); in check_pkey_qps()
209 list_for_each_entry(pp, &pkey->qp_list, qp_list) { in check_pkey_qps()
221 spin_unlock(&pkey->qp_list_lock); in check_pkey_qps()
246 struct pkey_index_qp_list *pkey; in port_pkey_list_insert() local
256 pkey = get_pkey_idx_qp_list(pp); in port_pkey_list_insert()
258 if (!pkey) { in port_pkey_list_insert()
261 pkey = kzalloc(sizeof(*pkey), GFP_KERNEL); in port_pkey_list_insert()
262 if (!pkey) in port_pkey_list_insert()
273 kfree(pkey); in port_pkey_list_insert()
274 pkey = tmp_pkey; in port_pkey_list_insert()
281 pkey->pkey_index = pp->pkey_index; in port_pkey_list_insert()
282 spin_lock_init(&pkey->qp_list_lock); in port_pkey_list_insert()
283 INIT_LIST_HEAD(&pkey->qp_list); in port_pkey_list_insert()
284 list_add(&pkey->pkey_index_list, in port_pkey_list_insert()
290 spin_lock(&pkey->qp_list_lock); in port_pkey_list_insert()
291 list_add(&pp->qp_list, &pkey->qp_list); in port_pkey_list_insert()
292 spin_unlock(&pkey->qp_list_lock); in port_pkey_list_insert()
304 struct pkey_index_qp_list *pkey; in port_pkey_list_remove() local
309 pkey = get_pkey_idx_qp_list(pp); in port_pkey_list_remove()
311 spin_lock(&pkey->qp_list_lock); in port_pkey_list_remove()
313 spin_unlock(&pkey->qp_list_lock); in port_pkey_list_remove()
544 struct pkey_index_qp_list *pkey; in ib_security_cache_change() local
546 list_for_each_entry (pkey, &device->port_data[port_num].pkey_list, in ib_security_cache_change()
548 check_pkey_qps(pkey, in ib_security_cache_change()
557 struct pkey_index_qp_list *pkey, *tmp_pkey; in ib_security_release_port_pkey_list() local
561 list_for_each_entry_safe(pkey, in ib_security_release_port_pkey_list()
565 list_del(&pkey->pkey_index_list); in ib_security_release_port_pkey_list()
566 kfree(pkey); in ib_security_release_port_pkey_list()
657 u16 pkey; in ib_security_pkey_access() local
663 ret = ib_get_cached_pkey(dev, port_num, pkey_index, &pkey); in ib_security_pkey_access()
669 return security_ib_pkey_access(sec, subnet_prefix, pkey); in ib_security_pkey_access()