Lines Matching refs:outbuf

23 	MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_MPORT_ALLOC_ALIAS_OUT_LEN);  in efx_mae_allocate_mport()
38 outbuf, sizeof(outbuf), &outlen); in efx_mae_allocate_mport()
41 if (outlen < sizeof(outbuf)) in efx_mae_allocate_mport()
43 *id = MCDI_DWORD(outbuf, MAE_MPORT_ALLOC_ALIAS_OUT_MPORT_ID); in efx_mae_allocate_mport()
44 *label = MCDI_DWORD(outbuf, MAE_MPORT_ALLOC_ALIAS_OUT_LABEL); in efx_mae_allocate_mport()
104 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_MPORT_LOOKUP_OUT_LEN); in efx_mae_fw_lookup_mport()
111 outbuf, sizeof(outbuf), &outlen); in efx_mae_fw_lookup_mport()
114 if (outlen < sizeof(outbuf)) in efx_mae_fw_lookup_mport()
116 *id = MCDI_DWORD(outbuf, MAE_MPORT_LOOKUP_OUT_MPORT_ID); in efx_mae_fw_lookup_mport()
123 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_COUNTERS_STREAM_START_OUT_LEN); in efx_mae_start_counters()
136 inbuf, sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_start_counters()
139 if (outlen < sizeof(outbuf)) in efx_mae_start_counters()
141 out_flags = MCDI_DWORD(outbuf, MAE_COUNTERS_STREAM_START_OUT_FLAGS); in efx_mae_start_counters()
172 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_COUNTERS_STREAM_STOP_V2_OUT_LENMAX); in efx_mae_stop_counters()
180 inbuf, sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_stop_counters()
188 efx->tc->flush_gen[i] = MCDI_ARRAY_DWORD(outbuf, in efx_mae_stop_counters()
235 MCDI_DECLARE_BUF(outbuf, MC_CMD_TABLE_DESCRIPTOR_OUT_LEN(16)); in efx_mae_table_get_desc()
247 outbuf, sizeof(outbuf), &outlen); in efx_mae_table_get_desc()
255 desc->type = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_TYPE); in efx_mae_table_get_desc()
256 desc->key_width = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_KEY_WIDTH); in efx_mae_table_get_desc()
257 desc->resp_width = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_RESP_WIDTH); in efx_mae_table_get_desc()
258 desc->n_keys = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_N_KEY_FIELDS); in efx_mae_table_get_desc()
259 desc->n_resps = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_N_RESP_FIELDS); in efx_mae_table_get_desc()
260 desc->n_prios = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_N_PRIORITIES); in efx_mae_table_get_desc()
261 desc->flags = MCDI_BYTE(outbuf, TABLE_DESCRIPTOR_OUT_FLAGS); in efx_mae_table_get_desc()
265 desc->scheme = MCDI_BYTE(outbuf, TABLE_DESCRIPTOR_OUT_SCHEME); in efx_mae_table_get_desc()
283 outlen = min(outlen, sizeof(outbuf)); in efx_mae_table_get_desc()
296 fdesc = MCDI_ARRAY_STRUCT_PTR(outbuf, in efx_mae_table_get_desc()
408 MCDI_DECLARE_BUF(outbuf, MC_CMD_TABLE_LIST_OUT_LEN(16)); in efx_mae_check_table_exists()
415 msg_max = sizeof(outbuf); in efx_mae_check_table_exists()
418 memset(outbuf, 0, sizeof(*outbuf)); in efx_mae_check_table_exists()
420 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_LIST, inbuf, sizeof(inbuf), outbuf, in efx_mae_check_table_exists()
428 tbl_total = MCDI_DWORD(outbuf, TABLE_LIST_OUT_N_TABLES); in efx_mae_check_table_exists()
432 tbl_id = MCDI_ARRAY_DWORD(outbuf, TABLE_LIST_OUT_TABLE_ID, idx); in efx_mae_check_table_exists()
483 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_GET_CAPS_OUT_LEN); in efx_mae_get_basic_caps()
489 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_GET_CAPS, NULL, 0, outbuf, in efx_mae_get_basic_caps()
490 sizeof(outbuf), &outlen); in efx_mae_get_basic_caps()
493 if (outlen < sizeof(outbuf)) in efx_mae_get_basic_caps()
495 caps->match_field_count = MCDI_DWORD(outbuf, MAE_GET_CAPS_OUT_MATCH_FIELD_COUNT); in efx_mae_get_basic_caps()
496 caps->encap_types = MCDI_DWORD(outbuf, MAE_GET_CAPS_OUT_ENCAP_TYPES_SUPPORTED); in efx_mae_get_basic_caps()
497 caps->action_prios = MCDI_DWORD(outbuf, MAE_GET_CAPS_OUT_ACTION_PRIOS); in efx_mae_get_basic_caps()
504 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_GET_AR_CAPS_OUT_LEN(MAE_NUM_FIELDS)); in efx_mae_get_rule_fields()
518 rc = efx_mcdi_rpc(efx, cmd, NULL, 0, outbuf, sizeof(outbuf), &outlen); in efx_mae_get_rule_fields()
523 count = MCDI_DWORD(outbuf, MAE_GET_AR_CAPS_OUT_COUNT); in efx_mae_get_rule_fields()
527 caps = _MCDI_DWORD(outbuf, MAE_GET_AR_CAPS_OUT_FIELD_FLAGS); in efx_mae_get_rule_fields()
532 if (i * sizeof(*outbuf) + MC_CMD_MAE_GET_AR_CAPS_OUT_FIELD_FLAGS_OFST < outlen) in efx_mae_get_rule_fields()
891 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_COUNTER_ALLOC_OUT_LEN(1)); in efx_mae_allocate_counter()
902 outbuf, sizeof(outbuf), &outlen); in efx_mae_allocate_counter()
906 if (outlen < sizeof(outbuf)) in efx_mae_allocate_counter()
908 cnt->fw_id = MCDI_DWORD(outbuf, MAE_COUNTER_ALLOC_OUT_COUNTER_ID); in efx_mae_allocate_counter()
909 cnt->gen = MCDI_DWORD(outbuf, MAE_COUNTER_ALLOC_OUT_GENERATION_COUNT); in efx_mae_allocate_counter()
915 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_COUNTER_FREE_OUT_LEN(1)); in efx_mae_free_counter()
924 outbuf, sizeof(outbuf), &outlen); in efx_mae_free_counter()
928 if (outlen < sizeof(outbuf)) in efx_mae_free_counter()
934 if (WARN_ON(MCDI_DWORD(outbuf, MAE_COUNTER_FREE_OUT_FREED_COUNTER_ID) != in efx_mae_free_counter()
958 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ENCAP_HEADER_ALLOC_OUT_LEN); in efx_mae_allocate_encap_md()
973 inlen, outbuf, sizeof(outbuf), &outlen); in efx_mae_allocate_encap_md()
976 if (outlen < sizeof(outbuf)) in efx_mae_allocate_encap_md()
978 encap->fw_id = MCDI_DWORD(outbuf, MAE_ENCAP_HEADER_ALLOC_OUT_ENCAP_HEADER_ID); in efx_mae_allocate_encap_md()
1010 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ENCAP_HEADER_FREE_OUT_LEN(1)); in efx_mae_free_encap_md()
1017 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_encap_md()
1020 if (outlen < sizeof(outbuf)) in efx_mae_free_encap_md()
1026 if (WARN_ON(MCDI_DWORD(outbuf, MAE_ENCAP_HEADER_FREE_OUT_FREED_EH_ID) != encap->fw_id)) in efx_mae_free_encap_md()
1136 efx_dword_t *outbuf = kzalloc(MCDI_MPORT_JOURNAL_LEN, GFP_KERNEL); in efx_mae_enumerate_mports() local
1142 if (!outbuf) in efx_mae_enumerate_mports()
1146 sizeof(inbuf), outbuf, in efx_mae_enumerate_mports()
1154 count = MCDI_DWORD(outbuf, MAE_MPORT_READ_JOURNAL_OUT_MPORT_DESC_COUNT); in efx_mae_enumerate_mports()
1157 stride = MCDI_DWORD(outbuf, MAE_MPORT_READ_JOURNAL_OUT_SIZEOF_MPORT_DESC); in efx_mae_enumerate_mports()
1177 _MCDI_PTR(outbuf, MC_CMD_MAE_MPORT_READ_JOURNAL_OUT_MPORT_DESC_DATA_OFST + in efx_mae_enumerate_mports()
1215 } while (MCDI_FIELD(outbuf, MAE_MPORT_READ_JOURNAL_OUT, MORE) && in efx_mae_enumerate_mports()
1218 kfree(outbuf); in efx_mae_enumerate_mports()
1235 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_MAC_ADDR_ALLOC_OUT_LEN); in efx_mae_allocate_pedit_mac()
1245 outbuf, sizeof(outbuf), &outlen); in efx_mae_allocate_pedit_mac()
1248 if (outlen < sizeof(outbuf)) in efx_mae_allocate_pedit_mac()
1250 ped->fw_id = MCDI_DWORD(outbuf, MAE_MAC_ADDR_ALLOC_OUT_MAC_ID); in efx_mae_allocate_pedit_mac()
1265 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_MAC_ADDR_FREE_OUT_LEN(1)); in efx_mae_free_pedit_mac()
1272 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_pedit_mac()
1273 if (rc || outlen < sizeof(outbuf)) in efx_mae_free_pedit_mac()
1279 if (WARN_ON(MCDI_DWORD(outbuf, MAE_MAC_ADDR_FREE_OUT_FREED_MAC_ID) != ped->fw_id)) in efx_mae_free_pedit_mac()
1289 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_SET_ALLOC_OUT_LEN); in efx_mae_alloc_action_set()
1346 outbuf, sizeof(outbuf), &outlen); in efx_mae_alloc_action_set()
1349 if (outlen < sizeof(outbuf)) in efx_mae_alloc_action_set()
1351 act->fw_id = MCDI_DWORD(outbuf, MAE_ACTION_SET_ALLOC_OUT_AS_ID); in efx_mae_alloc_action_set()
1364 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_SET_FREE_OUT_LEN(1)); in efx_mae_free_action_set()
1371 outbuf, sizeof(outbuf), &outlen); in efx_mae_free_action_set()
1374 if (outlen < sizeof(outbuf)) in efx_mae_free_action_set()
1380 if (WARN_ON(MCDI_DWORD(outbuf, MAE_ACTION_SET_FREE_OUT_FREED_AS_ID) != fw_id)) in efx_mae_free_action_set()
1388 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_SET_LIST_ALLOC_OUT_LEN); in efx_mae_alloc_action_set_list()
1420 outbuf, sizeof(outbuf), &outlen); in efx_mae_alloc_action_set_list()
1423 if (outlen < sizeof(outbuf)) { in efx_mae_alloc_action_set_list()
1427 acts->fw_id = MCDI_DWORD(outbuf, MAE_ACTION_SET_LIST_ALLOC_OUT_ASL_ID); in efx_mae_alloc_action_set_list()
1443 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_SET_LIST_FREE_OUT_LEN(1)); in efx_mae_free_action_set_list()
1455 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_action_set_list()
1458 if (outlen < sizeof(outbuf)) in efx_mae_free_action_set_list()
1464 if (WARN_ON(MCDI_DWORD(outbuf, MAE_ACTION_SET_LIST_FREE_OUT_FREED_ASL_ID) != acts->fw_id)) in efx_mae_free_action_set_list()
1478 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_OUTER_RULE_INSERT_OUT_LEN); in efx_mae_register_encap_match()
1536 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_register_encap_match()
1539 if (outlen < sizeof(outbuf)) in efx_mae_register_encap_match()
1541 encap->fw_id = MCDI_DWORD(outbuf, MAE_OUTER_RULE_INSERT_OUT_OR_ID); in efx_mae_register_encap_match()
1548 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_OUTER_RULE_REMOVE_OUT_LEN(1)); in efx_mae_unregister_encap_match()
1555 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_unregister_encap_match()
1558 if (outlen < sizeof(outbuf)) in efx_mae_unregister_encap_match()
1564 if (WARN_ON(MCDI_DWORD(outbuf, MAE_OUTER_RULE_REMOVE_OUT_REMOVED_OR_ID) != encap->fw_id)) in efx_mae_unregister_encap_match()
1693 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_OUTER_RULE_INSERT_OUT_LEN); in efx_mae_insert_lhs_outer_rule()
1728 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_insert_lhs_outer_rule()
1731 if (outlen < sizeof(outbuf)) in efx_mae_insert_lhs_outer_rule()
1733 rule->fw_id = MCDI_DWORD(outbuf, MAE_OUTER_RULE_INSERT_OUT_OR_ID); in efx_mae_insert_lhs_outer_rule()
1746 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_OUTER_RULE_REMOVE_OUT_LEN(1)); in efx_mae_remove_lhs_outer_rule()
1753 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_remove_lhs_outer_rule()
1756 if (outlen < sizeof(outbuf)) in efx_mae_remove_lhs_outer_rule()
1762 if (WARN_ON(MCDI_DWORD(outbuf, MAE_OUTER_RULE_REMOVE_OUT_REMOVED_OR_ID) != rule->fw_id)) in efx_mae_remove_lhs_outer_rule()
2178 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_RULE_INSERT_OUT_LEN); in efx_mae_insert_rule()
2205 outbuf, sizeof(outbuf), &outlen); in efx_mae_insert_rule()
2208 if (outlen < sizeof(outbuf)) in efx_mae_insert_rule()
2210 *id = MCDI_DWORD(outbuf, MAE_ACTION_RULE_INSERT_OUT_AR_ID); in efx_mae_insert_rule()
2239 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_RULE_DELETE_OUT_LEN(1)); in efx_mae_delete_rule()
2246 outbuf, sizeof(outbuf), &outlen); in efx_mae_delete_rule()
2249 if (outlen < sizeof(outbuf)) in efx_mae_delete_rule()
2255 if (WARN_ON(MCDI_DWORD(outbuf, MAE_ACTION_RULE_DELETE_OUT_DELETED_AR_ID) != id)) in efx_mae_delete_rule()