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()
2314 struct ena_rss *rss = &ena_dev->rss; in ena_com_set_hash_function() local
2333 if (!(get_resp.u.flow_hash_func.supported_func & BIT(rss->hash_func))) { in ena_com_set_hash_function()
2336 rss->hash_func); in ena_com_set_hash_function()
2346 cmd.u.flow_hash_func.init_val = rss->hash_init_val; in ena_com_set_hash_function()
2347 cmd.u.flow_hash_func.selected_func = 1 << rss->hash_func; in ena_com_set_hash_function()
2351 rss->hash_key_dma_addr); in ena_com_set_hash_function()
2357 cmd.control_buffer.length = sizeof(*rss->hash_key); in ena_com_set_hash_function()
2367 rss->hash_func, ret); in ena_com_set_hash_function()
2381 struct ena_rss *rss = &ena_dev->rss; in ena_com_fill_hash_function() local
2384 hash_key = rss->hash_key; in ena_com_fill_hash_function()
2392 rss->hash_key_dma_addr, in ena_com_fill_hash_function()
2393 sizeof(*rss->hash_key), 0); in ena_com_fill_hash_function()
2414 rss->hash_init_val = init_val; in ena_com_fill_hash_function()
2415 old_func = rss->hash_func; in ena_com_fill_hash_function()
2416 rss->hash_func = func; in ena_com_fill_hash_function()
2421 rss->hash_func = old_func; in ena_com_fill_hash_function()
2429 struct ena_rss *rss = &ena_dev->rss; in ena_com_get_hash_function() local
2438 rss->hash_key_dma_addr, in ena_com_get_hash_function()
2439 sizeof(*rss->hash_key), 0); in ena_com_get_hash_function()
2444 rss->hash_func = ffs(get_resp.u.flow_hash_func.selected_func); in ena_com_get_hash_function()
2445 if (rss->hash_func) in ena_com_get_hash_function()
2446 rss->hash_func--; in ena_com_get_hash_function()
2448 *func = rss->hash_func; in ena_com_get_hash_function()
2456 ena_dev->rss.hash_key; in ena_com_get_hash_key()
2469 struct ena_rss *rss = &ena_dev->rss; in ena_com_get_hash_ctrl() local
2475 rss->hash_ctrl_dma_addr, in ena_com_get_hash_ctrl()
2476 sizeof(*rss->hash_ctrl), 0); in ena_com_get_hash_ctrl()
2481 *fields = rss->hash_ctrl->selected_fields[proto].fields; in ena_com_get_hash_ctrl()
2489 struct ena_rss *rss = &ena_dev->rss; in ena_com_set_hash_ctrl() local
2490 struct ena_admin_feature_rss_hash_control *hash_ctrl = rss->hash_ctrl; in ena_com_set_hash_ctrl()
2514 rss->hash_ctrl_dma_addr); in ena_com_set_hash_ctrl()
2535 struct ena_rss *rss = &ena_dev->rss; in ena_com_set_default_hash_ctrl() local
2537 rss->hash_ctrl; in ena_com_set_default_hash_ctrl()
2599 struct ena_rss *rss = &ena_dev->rss; in ena_com_fill_hash_ctrl() local
2600 struct ena_admin_feature_rss_hash_control *hash_ctrl = rss->hash_ctrl; in ena_com_fill_hash_ctrl()
2637 struct ena_rss *rss = &ena_dev->rss; in ena_com_indirect_table_fill_entry() local
2639 if (unlikely(entry_idx >= (1 << rss->tbl_log_size))) in ena_com_indirect_table_fill_entry()
2645 rss->host_rss_ind_tbl[entry_idx] = entry_value; in ena_com_indirect_table_fill_entry()
2653 struct ena_rss *rss = &ena_dev->rss; in ena_com_indirect_table_set() local
2678 cmd.u.ind_table.size = rss->tbl_log_size; in ena_com_indirect_table_set()
2683 rss->rss_ind_tbl_dma_addr); in ena_com_indirect_table_set()
2689 cmd.control_buffer.length = (1ULL << rss->tbl_log_size) * in ena_com_indirect_table_set()
2707 struct ena_rss *rss = &ena_dev->rss; in ena_com_indirect_table_get() local
2712 tbl_size = (1ULL << rss->tbl_log_size) * in ena_com_indirect_table_get()
2717 rss->rss_ind_tbl_dma_addr, in ena_com_indirect_table_get()
2725 for (i = 0; i < (1 << rss->tbl_log_size); i++) in ena_com_indirect_table_get()
2726 ind_tbl[i] = rss->host_rss_ind_tbl[i]; in ena_com_indirect_table_get()
2735 memset(&ena_dev->rss, 0x0, sizeof(ena_dev->rss)); in ena_com_rss_init()
2772 memset(&ena_dev->rss, 0x0, sizeof(ena_dev->rss)); in ena_com_rss_destroy()