Lines Matching refs:rss
1085 return ena_dev->rss.hash_func; in ena_com_get_current_hash_function()
1091 (ena_dev->rss).hash_key; in ena_com_hash_key_fill_default_key()
1102 struct ena_rss *rss = &ena_dev->rss; in ena_com_hash_key_allocate() local
1108 rss->hash_key = in ena_com_hash_key_allocate()
1109 dma_alloc_coherent(ena_dev->dmadev, sizeof(*rss->hash_key), in ena_com_hash_key_allocate()
1110 &rss->hash_key_dma_addr, GFP_KERNEL); in ena_com_hash_key_allocate()
1112 if (unlikely(!rss->hash_key)) in ena_com_hash_key_allocate()
1120 struct ena_rss *rss = &ena_dev->rss; in ena_com_hash_key_destroy() local
1122 if (rss->hash_key) in ena_com_hash_key_destroy()
1123 dma_free_coherent(ena_dev->dmadev, sizeof(*rss->hash_key), in ena_com_hash_key_destroy()
1124 rss->hash_key, rss->hash_key_dma_addr); in ena_com_hash_key_destroy()
1125 rss->hash_key = NULL; in ena_com_hash_key_destroy()
1130 struct ena_rss *rss = &ena_dev->rss; in ena_com_hash_ctrl_init() local
1132 rss->hash_ctrl = in ena_com_hash_ctrl_init()
1133 dma_alloc_coherent(ena_dev->dmadev, sizeof(*rss->hash_ctrl), in ena_com_hash_ctrl_init()
1134 &rss->hash_ctrl_dma_addr, GFP_KERNEL); in ena_com_hash_ctrl_init()
1136 if (unlikely(!rss->hash_ctrl)) in ena_com_hash_ctrl_init()
1144 struct ena_rss *rss = &ena_dev->rss; in ena_com_hash_ctrl_destroy() local
1146 if (rss->hash_ctrl) in ena_com_hash_ctrl_destroy()
1147 dma_free_coherent(ena_dev->dmadev, sizeof(*rss->hash_ctrl), in ena_com_hash_ctrl_destroy()
1148 rss->hash_ctrl, rss->hash_ctrl_dma_addr); in ena_com_hash_ctrl_destroy()
1149 rss->hash_ctrl = NULL; in ena_com_hash_ctrl_destroy()
1155 struct ena_rss *rss = &ena_dev->rss; in ena_com_indirect_table_allocate() local
1177 rss->rss_ind_tbl = in ena_com_indirect_table_allocate()
1179 &rss->rss_ind_tbl_dma_addr, GFP_KERNEL); in ena_com_indirect_table_allocate()
1180 if (unlikely(!rss->rss_ind_tbl)) in ena_com_indirect_table_allocate()
1184 rss->host_rss_ind_tbl = in ena_com_indirect_table_allocate()
1186 if (unlikely(!rss->host_rss_ind_tbl)) in ena_com_indirect_table_allocate()
1189 rss->tbl_log_size = log_size; in ena_com_indirect_table_allocate()
1197 dma_free_coherent(ena_dev->dmadev, tbl_size, rss->rss_ind_tbl, in ena_com_indirect_table_allocate()
1198 rss->rss_ind_tbl_dma_addr); in ena_com_indirect_table_allocate()
1199 rss->rss_ind_tbl = NULL; in ena_com_indirect_table_allocate()
1201 rss->tbl_log_size = 0; in ena_com_indirect_table_allocate()
1207 struct ena_rss *rss = &ena_dev->rss; in ena_com_indirect_table_destroy() local
1208 size_t tbl_size = (1ULL << rss->tbl_log_size) * in ena_com_indirect_table_destroy()
1211 if (rss->rss_ind_tbl) in ena_com_indirect_table_destroy()
1212 dma_free_coherent(ena_dev->dmadev, tbl_size, rss->rss_ind_tbl, in ena_com_indirect_table_destroy()
1213 rss->rss_ind_tbl_dma_addr); in ena_com_indirect_table_destroy()
1214 rss->rss_ind_tbl = NULL; in ena_com_indirect_table_destroy()
1216 if (rss->host_rss_ind_tbl) in ena_com_indirect_table_destroy()
1217 devm_kfree(ena_dev->dmadev, rss->host_rss_ind_tbl); in ena_com_indirect_table_destroy()
1218 rss->host_rss_ind_tbl = NULL; in ena_com_indirect_table_destroy()
1300 struct ena_rss *rss = &ena_dev->rss; in ena_com_ind_tbl_convert_to_device() local
1305 for (i = 0; i < 1 << rss->tbl_log_size; i++) { in ena_com_ind_tbl_convert_to_device()
1306 qid = rss->host_rss_ind_tbl[i]; in ena_com_ind_tbl_convert_to_device()
1315 rss->rss_ind_tbl[i].cq_idx = io_sq->idx; in ena_com_ind_tbl_convert_to_device()
2306 struct ena_rss *rss = &ena_dev->rss; in ena_com_set_hash_function() local
2325 if (!(get_resp.u.flow_hash_func.supported_func & BIT(rss->hash_func))) { in ena_com_set_hash_function()
2328 rss->hash_func); in ena_com_set_hash_function()
2338 cmd.u.flow_hash_func.init_val = rss->hash_init_val; in ena_com_set_hash_function()
2339 cmd.u.flow_hash_func.selected_func = 1 << rss->hash_func; in ena_com_set_hash_function()
2343 rss->hash_key_dma_addr); in ena_com_set_hash_function()
2349 cmd.control_buffer.length = sizeof(*rss->hash_key); in ena_com_set_hash_function()
2359 rss->hash_func, ret); in ena_com_set_hash_function()
2373 struct ena_rss *rss = &ena_dev->rss; in ena_com_fill_hash_function() local
2376 hash_key = rss->hash_key; in ena_com_fill_hash_function()
2384 rss->hash_key_dma_addr, in ena_com_fill_hash_function()
2385 sizeof(*rss->hash_key), 0); in ena_com_fill_hash_function()
2405 rss->hash_init_val = init_val; in ena_com_fill_hash_function()
2410 rss->hash_init_val = init_val; in ena_com_fill_hash_function()
2418 old_func = rss->hash_func; in ena_com_fill_hash_function()
2419 rss->hash_func = func; in ena_com_fill_hash_function()
2424 rss->hash_func = old_func; in ena_com_fill_hash_function()
2432 struct ena_rss *rss = &ena_dev->rss; in ena_com_get_hash_function() local
2441 rss->hash_key_dma_addr, in ena_com_get_hash_function()
2442 sizeof(*rss->hash_key), 0); in ena_com_get_hash_function()
2447 rss->hash_func = ffs(get_resp.u.flow_hash_func.selected_func); in ena_com_get_hash_function()
2448 if (rss->hash_func) in ena_com_get_hash_function()
2449 rss->hash_func--; in ena_com_get_hash_function()
2451 *func = rss->hash_func; in ena_com_get_hash_function()
2459 ena_dev->rss.hash_key; in ena_com_get_hash_key()
2472 struct ena_rss *rss = &ena_dev->rss; in ena_com_get_hash_ctrl() local
2478 rss->hash_ctrl_dma_addr, in ena_com_get_hash_ctrl()
2479 sizeof(*rss->hash_ctrl), 0); in ena_com_get_hash_ctrl()
2484 *fields = rss->hash_ctrl->selected_fields[proto].fields; in ena_com_get_hash_ctrl()
2492 struct ena_rss *rss = &ena_dev->rss; in ena_com_set_hash_ctrl() local
2493 struct ena_admin_feature_rss_hash_control *hash_ctrl = rss->hash_ctrl; in ena_com_set_hash_ctrl()
2517 rss->hash_ctrl_dma_addr); in ena_com_set_hash_ctrl()
2538 struct ena_rss *rss = &ena_dev->rss; in ena_com_set_default_hash_ctrl() local
2540 rss->hash_ctrl; in ena_com_set_default_hash_ctrl()
2602 struct ena_rss *rss = &ena_dev->rss; in ena_com_fill_hash_ctrl() local
2603 struct ena_admin_feature_rss_hash_control *hash_ctrl = rss->hash_ctrl; in ena_com_fill_hash_ctrl()
2640 struct ena_rss *rss = &ena_dev->rss; in ena_com_indirect_table_fill_entry() local
2642 if (unlikely(entry_idx >= (1 << rss->tbl_log_size))) in ena_com_indirect_table_fill_entry()
2648 rss->host_rss_ind_tbl[entry_idx] = entry_value; in ena_com_indirect_table_fill_entry()
2656 struct ena_rss *rss = &ena_dev->rss; in ena_com_indirect_table_set() local
2681 cmd.u.ind_table.size = rss->tbl_log_size; in ena_com_indirect_table_set()
2686 rss->rss_ind_tbl_dma_addr); in ena_com_indirect_table_set()
2692 cmd.control_buffer.length = (1ULL << rss->tbl_log_size) * in ena_com_indirect_table_set()
2710 struct ena_rss *rss = &ena_dev->rss; in ena_com_indirect_table_get() local
2715 tbl_size = (1ULL << rss->tbl_log_size) * in ena_com_indirect_table_get()
2720 rss->rss_ind_tbl_dma_addr, in ena_com_indirect_table_get()
2728 for (i = 0; i < (1 << rss->tbl_log_size); i++) in ena_com_indirect_table_get()
2729 ind_tbl[i] = rss->host_rss_ind_tbl[i]; in ena_com_indirect_table_get()
2738 memset(&ena_dev->rss, 0x0, sizeof(ena_dev->rss)); in ena_com_rss_init()
2775 memset(&ena_dev->rss, 0x0, sizeof(ena_dev->rss)); in ena_com_rss_destroy()