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()
93 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_MPORT_LOOKUP_OUT_LEN); in efx_mae_fw_lookup_mport()
100 outbuf, sizeof(outbuf), &outlen); in efx_mae_fw_lookup_mport()
103 if (outlen < sizeof(outbuf)) in efx_mae_fw_lookup_mport()
105 *id = MCDI_DWORD(outbuf, MAE_MPORT_LOOKUP_OUT_MPORT_ID); in efx_mae_fw_lookup_mport()
112 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_COUNTERS_STREAM_START_OUT_LEN); in efx_mae_start_counters()
125 inbuf, sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_start_counters()
128 if (outlen < sizeof(outbuf)) in efx_mae_start_counters()
130 out_flags = MCDI_DWORD(outbuf, MAE_COUNTERS_STREAM_START_OUT_FLAGS); in efx_mae_start_counters()
161 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_COUNTERS_STREAM_STOP_V2_OUT_LENMAX); in efx_mae_stop_counters()
169 inbuf, sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_stop_counters()
177 efx->tc->flush_gen[i] = MCDI_ARRAY_DWORD(outbuf, in efx_mae_stop_counters()
224 MCDI_DECLARE_BUF(outbuf, MC_CMD_TABLE_DESCRIPTOR_OUT_LEN(16)); in efx_mae_table_get_desc()
236 outbuf, sizeof(outbuf), &outlen); in efx_mae_table_get_desc()
244 desc->type = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_TYPE); in efx_mae_table_get_desc()
245 desc->key_width = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_KEY_WIDTH); in efx_mae_table_get_desc()
246 desc->resp_width = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_RESP_WIDTH); in efx_mae_table_get_desc()
247 desc->n_keys = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_N_KEY_FIELDS); in efx_mae_table_get_desc()
248 desc->n_resps = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_N_RESP_FIELDS); in efx_mae_table_get_desc()
249 desc->n_prios = MCDI_WORD(outbuf, TABLE_DESCRIPTOR_OUT_N_PRIORITIES); in efx_mae_table_get_desc()
250 desc->flags = MCDI_BYTE(outbuf, TABLE_DESCRIPTOR_OUT_FLAGS); in efx_mae_table_get_desc()
254 desc->scheme = MCDI_BYTE(outbuf, TABLE_DESCRIPTOR_OUT_SCHEME); in efx_mae_table_get_desc()
272 outlen = min(outlen, sizeof(outbuf)); in efx_mae_table_get_desc()
285 fdesc = MCDI_ARRAY_STRUCT_PTR(outbuf, in efx_mae_table_get_desc()
397 MCDI_DECLARE_BUF(outbuf, MC_CMD_TABLE_LIST_OUT_LEN(16)); in efx_mae_check_table_exists()
404 msg_max = sizeof(outbuf); in efx_mae_check_table_exists()
407 memset(outbuf, 0, sizeof(*outbuf)); in efx_mae_check_table_exists()
409 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_LIST, inbuf, sizeof(inbuf), outbuf, in efx_mae_check_table_exists()
417 tbl_total = MCDI_DWORD(outbuf, TABLE_LIST_OUT_N_TABLES); in efx_mae_check_table_exists()
421 tbl_id = MCDI_ARRAY_DWORD(outbuf, TABLE_LIST_OUT_TABLE_ID, idx); in efx_mae_check_table_exists()
472 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_GET_CAPS_OUT_LEN); in efx_mae_get_basic_caps()
478 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_GET_CAPS, NULL, 0, outbuf, in efx_mae_get_basic_caps()
479 sizeof(outbuf), &outlen); in efx_mae_get_basic_caps()
482 if (outlen < sizeof(outbuf)) in efx_mae_get_basic_caps()
484 caps->match_field_count = MCDI_DWORD(outbuf, MAE_GET_CAPS_OUT_MATCH_FIELD_COUNT); in efx_mae_get_basic_caps()
485 caps->encap_types = MCDI_DWORD(outbuf, MAE_GET_CAPS_OUT_ENCAP_TYPES_SUPPORTED); in efx_mae_get_basic_caps()
486 caps->action_prios = MCDI_DWORD(outbuf, MAE_GET_CAPS_OUT_ACTION_PRIOS); in efx_mae_get_basic_caps()
493 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_GET_AR_CAPS_OUT_LEN(MAE_NUM_FIELDS)); in efx_mae_get_rule_fields()
507 rc = efx_mcdi_rpc(efx, cmd, NULL, 0, outbuf, sizeof(outbuf), &outlen); in efx_mae_get_rule_fields()
512 count = MCDI_DWORD(outbuf, MAE_GET_AR_CAPS_OUT_COUNT); in efx_mae_get_rule_fields()
516 caps = _MCDI_DWORD(outbuf, MAE_GET_AR_CAPS_OUT_FIELD_FLAGS); in efx_mae_get_rule_fields()
521 if (i * sizeof(*outbuf) + MC_CMD_MAE_GET_AR_CAPS_OUT_FIELD_FLAGS_OFST < outlen) in efx_mae_get_rule_fields()
880 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_COUNTER_ALLOC_OUT_LEN(1)); in efx_mae_allocate_counter()
891 outbuf, sizeof(outbuf), &outlen); in efx_mae_allocate_counter()
895 if (outlen < sizeof(outbuf)) in efx_mae_allocate_counter()
897 cnt->fw_id = MCDI_DWORD(outbuf, MAE_COUNTER_ALLOC_OUT_COUNTER_ID); in efx_mae_allocate_counter()
898 cnt->gen = MCDI_DWORD(outbuf, MAE_COUNTER_ALLOC_OUT_GENERATION_COUNT); in efx_mae_allocate_counter()
904 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_COUNTER_FREE_OUT_LEN(1)); in efx_mae_free_counter()
913 outbuf, sizeof(outbuf), &outlen); in efx_mae_free_counter()
917 if (outlen < sizeof(outbuf)) in efx_mae_free_counter()
923 if (WARN_ON(MCDI_DWORD(outbuf, MAE_COUNTER_FREE_OUT_FREED_COUNTER_ID) != in efx_mae_free_counter()
947 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ENCAP_HEADER_ALLOC_OUT_LEN); in efx_mae_allocate_encap_md()
962 inlen, outbuf, sizeof(outbuf), &outlen); in efx_mae_allocate_encap_md()
965 if (outlen < sizeof(outbuf)) in efx_mae_allocate_encap_md()
967 encap->fw_id = MCDI_DWORD(outbuf, MAE_ENCAP_HEADER_ALLOC_OUT_ENCAP_HEADER_ID); in efx_mae_allocate_encap_md()
999 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ENCAP_HEADER_FREE_OUT_LEN(1)); in efx_mae_free_encap_md()
1006 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_encap_md()
1009 if (outlen < sizeof(outbuf)) in efx_mae_free_encap_md()
1015 if (WARN_ON(MCDI_DWORD(outbuf, MAE_ENCAP_HEADER_FREE_OUT_FREED_EH_ID) != encap->fw_id)) in efx_mae_free_encap_md()
1125 efx_dword_t *outbuf = kzalloc(MCDI_MPORT_JOURNAL_LEN, GFP_KERNEL); in efx_mae_enumerate_mports() local
1131 if (!outbuf) in efx_mae_enumerate_mports()
1135 sizeof(inbuf), outbuf, in efx_mae_enumerate_mports()
1143 count = MCDI_DWORD(outbuf, MAE_MPORT_READ_JOURNAL_OUT_MPORT_DESC_COUNT); in efx_mae_enumerate_mports()
1146 stride = MCDI_DWORD(outbuf, MAE_MPORT_READ_JOURNAL_OUT_SIZEOF_MPORT_DESC); in efx_mae_enumerate_mports()
1166 _MCDI_PTR(outbuf, MC_CMD_MAE_MPORT_READ_JOURNAL_OUT_MPORT_DESC_DATA_OFST + in efx_mae_enumerate_mports()
1204 } while (MCDI_FIELD(outbuf, MAE_MPORT_READ_JOURNAL_OUT, MORE) && in efx_mae_enumerate_mports()
1207 kfree(outbuf); in efx_mae_enumerate_mports()
1224 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_MAC_ADDR_ALLOC_OUT_LEN); in efx_mae_allocate_pedit_mac()
1234 outbuf, sizeof(outbuf), &outlen); in efx_mae_allocate_pedit_mac()
1237 if (outlen < sizeof(outbuf)) in efx_mae_allocate_pedit_mac()
1239 ped->fw_id = MCDI_DWORD(outbuf, MAE_MAC_ADDR_ALLOC_OUT_MAC_ID); in efx_mae_allocate_pedit_mac()
1254 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_MAC_ADDR_FREE_OUT_LEN(1)); in efx_mae_free_pedit_mac()
1261 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_pedit_mac()
1262 if (rc || outlen < sizeof(outbuf)) in efx_mae_free_pedit_mac()
1268 if (WARN_ON(MCDI_DWORD(outbuf, MAE_MAC_ADDR_FREE_OUT_FREED_MAC_ID) != ped->fw_id)) in efx_mae_free_pedit_mac()
1278 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_SET_ALLOC_OUT_LEN); in efx_mae_alloc_action_set()
1336 outbuf, sizeof(outbuf), &outlen); in efx_mae_alloc_action_set()
1339 if (outlen < sizeof(outbuf)) in efx_mae_alloc_action_set()
1341 act->fw_id = MCDI_DWORD(outbuf, MAE_ACTION_SET_ALLOC_OUT_AS_ID); in efx_mae_alloc_action_set()
1354 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_SET_FREE_OUT_LEN(1)); in efx_mae_free_action_set()
1361 outbuf, sizeof(outbuf), &outlen); in efx_mae_free_action_set()
1364 if (outlen < sizeof(outbuf)) in efx_mae_free_action_set()
1370 if (WARN_ON(MCDI_DWORD(outbuf, MAE_ACTION_SET_FREE_OUT_FREED_AS_ID) != fw_id)) in efx_mae_free_action_set()
1378 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_SET_LIST_ALLOC_OUT_LEN); in efx_mae_alloc_action_set_list()
1410 outbuf, sizeof(outbuf), &outlen); in efx_mae_alloc_action_set_list()
1413 if (outlen < sizeof(outbuf)) { in efx_mae_alloc_action_set_list()
1417 acts->fw_id = MCDI_DWORD(outbuf, MAE_ACTION_SET_LIST_ALLOC_OUT_ASL_ID); in efx_mae_alloc_action_set_list()
1433 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_SET_LIST_FREE_OUT_LEN(1)); in efx_mae_free_action_set_list()
1445 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_action_set_list()
1448 if (outlen < sizeof(outbuf)) in efx_mae_free_action_set_list()
1454 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()
1468 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_OUTER_RULE_INSERT_OUT_LEN); in efx_mae_register_encap_match()
1526 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_register_encap_match()
1529 if (outlen < sizeof(outbuf)) in efx_mae_register_encap_match()
1531 encap->fw_id = MCDI_DWORD(outbuf, MAE_OUTER_RULE_INSERT_OUT_OR_ID); in efx_mae_register_encap_match()
1538 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_OUTER_RULE_REMOVE_OUT_LEN(1)); in efx_mae_unregister_encap_match()
1545 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_unregister_encap_match()
1548 if (outlen < sizeof(outbuf)) in efx_mae_unregister_encap_match()
1554 if (WARN_ON(MCDI_DWORD(outbuf, MAE_OUTER_RULE_REMOVE_OUT_REMOVED_OR_ID) != encap->fw_id)) in efx_mae_unregister_encap_match()
1683 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_OUTER_RULE_INSERT_OUT_LEN); in efx_mae_insert_lhs_outer_rule()
1720 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_insert_lhs_outer_rule()
1723 if (outlen < sizeof(outbuf)) in efx_mae_insert_lhs_outer_rule()
1725 rule->fw_id = MCDI_DWORD(outbuf, MAE_OUTER_RULE_INSERT_OUT_OR_ID); in efx_mae_insert_lhs_outer_rule()
1737 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_RULE_INSERT_OUT_LEN); in efx_mae_insert_lhs_action_rule()
1769 outbuf, sizeof(outbuf), &outlen); in efx_mae_insert_lhs_action_rule()
1772 if (outlen < sizeof(outbuf)) in efx_mae_insert_lhs_action_rule()
1774 rule->fw_id = MCDI_DWORD(outbuf, MAE_ACTION_RULE_INSERT_OUT_AR_ID); in efx_mae_insert_lhs_action_rule()
1789 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_OUTER_RULE_REMOVE_OUT_LEN(1)); in efx_mae_remove_lhs_outer_rule()
1796 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_remove_lhs_outer_rule()
1799 if (outlen < sizeof(outbuf)) in efx_mae_remove_lhs_outer_rule()
1805 if (WARN_ON(MCDI_DWORD(outbuf, MAE_OUTER_RULE_REMOVE_OUT_REMOVED_OR_ID) != rule->fw_id)) in efx_mae_remove_lhs_outer_rule()
2223 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_RULE_INSERT_OUT_LEN); in efx_mae_insert_rule()
2250 outbuf, sizeof(outbuf), &outlen); in efx_mae_insert_rule()
2253 if (outlen < sizeof(outbuf)) in efx_mae_insert_rule()
2255 *id = MCDI_DWORD(outbuf, MAE_ACTION_RULE_INSERT_OUT_AR_ID); in efx_mae_insert_rule()
2284 MCDI_DECLARE_BUF(outbuf, MC_CMD_MAE_ACTION_RULE_DELETE_OUT_LEN(1)); in efx_mae_delete_rule()
2291 outbuf, sizeof(outbuf), &outlen); in efx_mae_delete_rule()
2294 if (outlen < sizeof(outbuf)) in efx_mae_delete_rule()
2300 if (WARN_ON(MCDI_DWORD(outbuf, MAE_ACTION_RULE_DELETE_OUT_DELETED_AR_ID) != id)) in efx_mae_delete_rule()