Lines Matching refs:aentry
67 mlxsw_sp_acl_atcam_is_centry(const struct mlxsw_sp_acl_atcam_entry *aentry) in mlxsw_sp_acl_atcam_is_centry() argument
69 return mlxsw_sp_acl_erp_mask_is_ctcam(aentry->erp_mask); in mlxsw_sp_acl_atcam_is_centry()
382 struct mlxsw_sp_acl_atcam_entry *aentry, in mlxsw_sp_acl_atcam_region_entry_insert() argument
386 u8 erp_id = mlxsw_sp_acl_erp_mask_erp_id(aentry->erp_mask); in mlxsw_sp_acl_atcam_region_entry_insert()
396 lkey_id = aregion->ops->lkey_id_get(aregion, aentry->enc_key, erp_id); in mlxsw_sp_acl_atcam_region_entry_insert()
399 aentry->lkey_id = lkey_id; in mlxsw_sp_acl_atcam_region_entry_insert()
404 aentry->enc_key, erp_id, in mlxsw_sp_acl_atcam_region_entry_insert()
405 aentry->delta_info.start, in mlxsw_sp_acl_atcam_region_entry_insert()
406 aentry->delta_info.mask, in mlxsw_sp_acl_atcam_region_entry_insert()
407 aentry->delta_info.value, in mlxsw_sp_acl_atcam_region_entry_insert()
424 struct mlxsw_sp_acl_atcam_entry *aentry) in mlxsw_sp_acl_atcam_region_entry_remove() argument
426 struct mlxsw_sp_acl_atcam_lkey_id *lkey_id = aentry->lkey_id; in mlxsw_sp_acl_atcam_region_entry_remove()
428 u8 erp_id = mlxsw_sp_acl_erp_mask_erp_id(aentry->erp_mask); in mlxsw_sp_acl_atcam_region_entry_remove()
433 aentry->enc_key, erp_id, in mlxsw_sp_acl_atcam_region_entry_remove()
434 aentry->delta_info.start, in mlxsw_sp_acl_atcam_region_entry_remove()
435 aentry->delta_info.mask, in mlxsw_sp_acl_atcam_region_entry_remove()
436 aentry->delta_info.value, in mlxsw_sp_acl_atcam_region_entry_remove()
446 struct mlxsw_sp_acl_atcam_entry *aentry, in mlxsw_sp_acl_atcam_region_entry_action_replace() argument
449 struct mlxsw_sp_acl_atcam_lkey_id *lkey_id = aentry->lkey_id; in mlxsw_sp_acl_atcam_region_entry_action_replace()
450 u8 erp_id = mlxsw_sp_acl_erp_mask_erp_id(aentry->erp_mask); in mlxsw_sp_acl_atcam_region_entry_action_replace()
462 aentry->enc_key, erp_id, in mlxsw_sp_acl_atcam_region_entry_action_replace()
463 aentry->delta_info.start, in mlxsw_sp_acl_atcam_region_entry_action_replace()
464 aentry->delta_info.mask, in mlxsw_sp_acl_atcam_region_entry_action_replace()
465 aentry->delta_info.value, in mlxsw_sp_acl_atcam_region_entry_action_replace()
474 struct mlxsw_sp_acl_atcam_entry *aentry, in __mlxsw_sp_acl_atcam_entry_add() argument
485 aentry->ht_key.full_enc_key, mask); in __mlxsw_sp_acl_atcam_entry_add()
490 aentry->erp_mask = erp_mask; in __mlxsw_sp_acl_atcam_entry_add()
491 aentry->ht_key.erp_id = mlxsw_sp_acl_erp_mask_erp_id(erp_mask); in __mlxsw_sp_acl_atcam_entry_add()
492 memcpy(aentry->enc_key, aentry->ht_key.full_enc_key, in __mlxsw_sp_acl_atcam_entry_add()
493 sizeof(aentry->enc_key)); in __mlxsw_sp_acl_atcam_entry_add()
498 delta = mlxsw_sp_acl_erp_delta(aentry->erp_mask); in __mlxsw_sp_acl_atcam_entry_add()
499 aentry->delta_info.start = mlxsw_sp_acl_erp_delta_start(delta); in __mlxsw_sp_acl_atcam_entry_add()
500 aentry->delta_info.mask = mlxsw_sp_acl_erp_delta_mask(delta); in __mlxsw_sp_acl_atcam_entry_add()
501 aentry->delta_info.value = in __mlxsw_sp_acl_atcam_entry_add()
503 aentry->ht_key.full_enc_key); in __mlxsw_sp_acl_atcam_entry_add()
504 mlxsw_sp_acl_erp_delta_clear(delta, aentry->enc_key); in __mlxsw_sp_acl_atcam_entry_add()
510 list_add(&aentry->list, &aregion->entries_list); in __mlxsw_sp_acl_atcam_entry_add()
516 &aentry->ht_node, in __mlxsw_sp_acl_atcam_entry_add()
524 err = mlxsw_sp_acl_erp_bf_insert(mlxsw_sp, aregion, erp_mask, aentry); in __mlxsw_sp_acl_atcam_entry_add()
528 err = mlxsw_sp_acl_atcam_region_entry_insert(mlxsw_sp, aregion, aentry, in __mlxsw_sp_acl_atcam_entry_add()
536 mlxsw_sp_acl_erp_bf_remove(mlxsw_sp, aregion, erp_mask, aentry); in __mlxsw_sp_acl_atcam_entry_add()
538 rhashtable_remove_fast(&aregion->entries_ht, &aentry->ht_node, in __mlxsw_sp_acl_atcam_entry_add()
541 list_del(&aentry->list); in __mlxsw_sp_acl_atcam_entry_add()
549 struct mlxsw_sp_acl_atcam_entry *aentry) in __mlxsw_sp_acl_atcam_entry_del() argument
551 mlxsw_sp_acl_atcam_region_entry_remove(mlxsw_sp, aregion, aentry); in __mlxsw_sp_acl_atcam_entry_del()
552 mlxsw_sp_acl_erp_bf_remove(mlxsw_sp, aregion, aentry->erp_mask, aentry); in __mlxsw_sp_acl_atcam_entry_del()
553 rhashtable_remove_fast(&aregion->entries_ht, &aentry->ht_node, in __mlxsw_sp_acl_atcam_entry_del()
555 list_del(&aentry->list); in __mlxsw_sp_acl_atcam_entry_del()
556 mlxsw_sp_acl_erp_mask_put(aregion, aentry->erp_mask); in __mlxsw_sp_acl_atcam_entry_del()
562 struct mlxsw_sp_acl_atcam_entry *aentry, in __mlxsw_sp_acl_atcam_entry_action_replace() argument
566 aentry, rulei); in __mlxsw_sp_acl_atcam_entry_action_replace()
572 struct mlxsw_sp_acl_atcam_entry *aentry, in mlxsw_sp_acl_atcam_entry_add() argument
577 err = __mlxsw_sp_acl_atcam_entry_add(mlxsw_sp, aregion, aentry, rulei); in mlxsw_sp_acl_atcam_entry_add()
586 &achunk->cchunk, &aentry->centry, in mlxsw_sp_acl_atcam_entry_add()
597 struct mlxsw_sp_acl_atcam_entry *aentry) in mlxsw_sp_acl_atcam_entry_del() argument
599 if (mlxsw_sp_acl_atcam_is_centry(aentry)) in mlxsw_sp_acl_atcam_entry_del()
601 &achunk->cchunk, &aentry->centry); in mlxsw_sp_acl_atcam_entry_del()
603 __mlxsw_sp_acl_atcam_entry_del(mlxsw_sp, aregion, aentry); in mlxsw_sp_acl_atcam_entry_del()
609 struct mlxsw_sp_acl_atcam_entry *aentry, in mlxsw_sp_acl_atcam_entry_action_replace() argument
614 if (mlxsw_sp_acl_atcam_is_centry(aentry)) in mlxsw_sp_acl_atcam_entry_action_replace()
617 &aentry->centry, in mlxsw_sp_acl_atcam_entry_action_replace()
621 aregion, aentry, in mlxsw_sp_acl_atcam_entry_action_replace()