Lines Matching refs:inbuf

24 	MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_MPORT_ALLOC_ALIAS_IN_LEN);  in efx_mae_allocate_mport()
33 MCDI_SET_DWORD(inbuf, MAE_MPORT_ALLOC_ALIAS_IN_TYPE, in efx_mae_allocate_mport()
35 MCDI_SET_DWORD(inbuf, MAE_MPORT_ALLOC_ALIAS_IN_DELIVER_MPORT, in efx_mae_allocate_mport()
37 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MPORT_ALLOC, inbuf, sizeof(inbuf), in efx_mae_allocate_mport()
50 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_MPORT_FREE_IN_LEN); in efx_mae_free_mport()
53 MCDI_SET_DWORD(inbuf, MAE_MPORT_FREE_IN_MPORT_ID, id); in efx_mae_free_mport()
54 return efx_mcdi_rpc(efx, MC_CMD_MAE_MPORT_FREE, inbuf, sizeof(inbuf), in efx_mae_free_mport()
105 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_MPORT_LOOKUP_IN_LEN); in efx_mae_fw_lookup_mport()
109 MCDI_SET_DWORD(inbuf, MAE_MPORT_LOOKUP_IN_MPORT_SELECTOR, selector); in efx_mae_fw_lookup_mport()
110 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MPORT_LOOKUP, inbuf, sizeof(inbuf), in efx_mae_fw_lookup_mport()
122 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_COUNTERS_STREAM_START_V2_IN_LEN); in efx_mae_start_counters()
128 MCDI_SET_WORD(inbuf, MAE_COUNTERS_STREAM_START_V2_IN_QID, in efx_mae_start_counters()
130 MCDI_SET_WORD(inbuf, MAE_COUNTERS_STREAM_START_V2_IN_PACKET_SIZE, in efx_mae_start_counters()
132 MCDI_SET_DWORD(inbuf, MAE_COUNTERS_STREAM_START_V2_IN_COUNTER_TYPES_MASK, in efx_mae_start_counters()
136 inbuf, sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_start_counters()
173 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_COUNTERS_STREAM_STOP_IN_LEN); in efx_mae_stop_counters()
177 MCDI_SET_WORD(inbuf, MAE_COUNTERS_STREAM_STOP_IN_QID, in efx_mae_stop_counters()
180 inbuf, sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_stop_counters()
216 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_COUNTERS_STREAM_GIVE_CREDITS_IN_LEN); in efx_mae_counters_grant_credits()
224 MCDI_SET_DWORD(inbuf, MAE_COUNTERS_STREAM_GIVE_CREDITS_IN_NUM_CREDITS, in efx_mae_counters_grant_credits()
227 inbuf, sizeof(inbuf), NULL, 0, NULL)) in efx_mae_counters_grant_credits()
236 MCDI_DECLARE_BUF(inbuf, MC_CMD_TABLE_DESCRIPTOR_IN_LEN); in efx_mae_table_get_desc()
243 MCDI_SET_DWORD(inbuf, TABLE_DESCRIPTOR_IN_TABLE_ID, table_id); in efx_mae_table_get_desc()
245 MCDI_SET_DWORD(inbuf, TABLE_DESCRIPTOR_IN_FIRST_FIELDS_INDEX, offset); in efx_mae_table_get_desc()
246 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_DESCRIPTOR, inbuf, sizeof(inbuf), in efx_mae_table_get_desc()
409 MCDI_DECLARE_BUF(inbuf, MC_CMD_TABLE_LIST_IN_LEN); in efx_mae_check_table_exists()
419 MCDI_SET_DWORD(inbuf, TABLE_LIST_IN_FIRST_TABLE_ID_INDEX, pos); 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()
892 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_COUNTER_ALLOC_V2_IN_LEN); in efx_mae_allocate_counter()
899 MCDI_SET_DWORD(inbuf, MAE_COUNTER_ALLOC_V2_IN_REQUESTED_COUNT, 1); in efx_mae_allocate_counter()
900 MCDI_SET_DWORD(inbuf, MAE_COUNTER_ALLOC_V2_IN_COUNTER_TYPE, cnt->type); in efx_mae_allocate_counter()
901 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_COUNTER_ALLOC, inbuf, sizeof(inbuf), in efx_mae_allocate_counter()
916 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_COUNTER_FREE_V2_IN_LEN); in efx_mae_free_counter()
920 MCDI_SET_DWORD(inbuf, MAE_COUNTER_FREE_V2_IN_COUNTER_ID_COUNT, 1); in efx_mae_free_counter()
921 MCDI_SET_DWORD(inbuf, MAE_COUNTER_FREE_V2_IN_FREE_COUNTER_ID, cnt->fw_id); in efx_mae_free_counter()
922 MCDI_SET_DWORD(inbuf, MAE_COUNTER_FREE_V2_IN_COUNTER_TYPE, cnt->type); in efx_mae_free_counter()
923 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_COUNTER_FREE, inbuf, sizeof(inbuf), in efx_mae_free_counter()
957 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ENCAP_HEADER_ALLOC_IN_LEN(EFX_TC_MAX_ENCAP_HDR)); in efx_mae_allocate_encap_md()
965 MCDI_SET_DWORD(inbuf, MAE_ENCAP_HEADER_ALLOC_IN_ENCAP_TYPE, rc); in efx_mae_allocate_encap_md()
967 if (WARN_ON(inlen > sizeof(inbuf))) /* can't happen */ in efx_mae_allocate_encap_md()
969 memcpy(MCDI_PTR(inbuf, MAE_ENCAP_HEADER_ALLOC_IN_HDR_DATA), in efx_mae_allocate_encap_md()
972 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ENCAP_HEADER_ALLOC, inbuf, in efx_mae_allocate_encap_md()
985 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ENCAP_HEADER_UPDATE_IN_LEN(EFX_TC_MAX_ENCAP_HDR)); in efx_mae_update_encap_md()
992 MCDI_SET_DWORD(inbuf, MAE_ENCAP_HEADER_UPDATE_IN_ENCAP_TYPE, rc); in efx_mae_update_encap_md()
993 MCDI_SET_DWORD(inbuf, MAE_ENCAP_HEADER_UPDATE_IN_EH_ID, in efx_mae_update_encap_md()
996 if (WARN_ON(inlen > sizeof(inbuf))) /* can't happen */ in efx_mae_update_encap_md()
998 memcpy(MCDI_PTR(inbuf, MAE_ENCAP_HEADER_UPDATE_IN_HDR_DATA), in efx_mae_update_encap_md()
1003 return efx_mcdi_rpc(efx, MC_CMD_MAE_ENCAP_HEADER_UPDATE, inbuf, in efx_mae_update_encap_md()
1011 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ENCAP_HEADER_FREE_IN_LEN(1)); in efx_mae_free_encap_md()
1015 MCDI_SET_DWORD(inbuf, MAE_ENCAP_HEADER_FREE_IN_EH_ID, encap->fw_id); in efx_mae_free_encap_md()
1016 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ENCAP_HEADER_FREE, inbuf, in efx_mae_free_encap_md()
1017 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_encap_md()
1137 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_MPORT_READ_JOURNAL_IN_LEN); in efx_mae_enumerate_mports()
1145 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MPORT_READ_JOURNAL, inbuf, in efx_mae_enumerate_mports()
1146 sizeof(inbuf), outbuf, in efx_mae_enumerate_mports()
1236 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_MAC_ADDR_ALLOC_IN_LEN); in efx_mae_allocate_pedit_mac()
1242 memcpy(MCDI_PTR(inbuf, MAE_MAC_ADDR_ALLOC_IN_MAC_ADDR), ped->h_addr, in efx_mae_allocate_pedit_mac()
1244 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MAC_ADDR_ALLOC, inbuf, sizeof(inbuf), in efx_mae_allocate_pedit_mac()
1266 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_MAC_ADDR_FREE_IN_LEN(1)); in efx_mae_free_pedit_mac()
1270 MCDI_SET_DWORD(inbuf, MAE_MAC_ADDR_FREE_IN_MAC_ID, ped->fw_id); in efx_mae_free_pedit_mac()
1271 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MAC_ADDR_FREE, inbuf, in efx_mae_free_pedit_mac()
1272 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_pedit_mac()
1290 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ACTION_SET_ALLOC_IN_LEN); in efx_mae_alloc_action_set()
1294 MCDI_POPULATE_DWORD_4(inbuf, MAE_ACTION_SET_ALLOC_IN_FLAGS, in efx_mae_alloc_action_set()
1302 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_SRC_MAC_ID, in efx_mae_alloc_action_set()
1305 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_SRC_MAC_ID, in efx_mae_alloc_action_set()
1309 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_DST_MAC_ID, in efx_mae_alloc_action_set()
1312 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_DST_MAC_ID, in efx_mae_alloc_action_set()
1316 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_COUNTER_ID, in efx_mae_alloc_action_set()
1319 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_COUNTER_ID, in efx_mae_alloc_action_set()
1321 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_COUNTER_LIST_ID, in efx_mae_alloc_action_set()
1324 MCDI_SET_WORD_BE(inbuf, MAE_ACTION_SET_ALLOC_IN_VLAN0_TCI_BE, in efx_mae_alloc_action_set()
1326 MCDI_SET_WORD_BE(inbuf, MAE_ACTION_SET_ALLOC_IN_VLAN0_PROTO_BE, in efx_mae_alloc_action_set()
1330 MCDI_SET_WORD_BE(inbuf, MAE_ACTION_SET_ALLOC_IN_VLAN1_TCI_BE, in efx_mae_alloc_action_set()
1332 MCDI_SET_WORD_BE(inbuf, MAE_ACTION_SET_ALLOC_IN_VLAN1_PROTO_BE, in efx_mae_alloc_action_set()
1336 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_ENCAP_HEADER_ID, in efx_mae_alloc_action_set()
1339 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_ENCAP_HEADER_ID, in efx_mae_alloc_action_set()
1342 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_DELIVER, in efx_mae_alloc_action_set()
1345 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_SET_ALLOC, inbuf, sizeof(inbuf), in efx_mae_alloc_action_set()
1365 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ACTION_SET_FREE_IN_LEN(1)); in efx_mae_free_action_set()
1369 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_FREE_IN_AS_ID, fw_id); in efx_mae_free_action_set()
1370 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_SET_FREE, inbuf, sizeof(inbuf), in efx_mae_free_action_set()
1391 efx_dword_t *inbuf; in efx_mae_alloc_action_set_list() local
1409 inbuf = kzalloc(inlen, GFP_KERNEL); in efx_mae_alloc_action_set_list()
1410 if (!inbuf) in efx_mae_alloc_action_set_list()
1414 MCDI_SET_ARRAY_DWORD(inbuf, MAE_ACTION_SET_LIST_ALLOC_IN_AS_IDS, in efx_mae_alloc_action_set_list()
1418 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_LIST_ALLOC_IN_COUNT, i); in efx_mae_alloc_action_set_list()
1419 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_SET_LIST_ALLOC, inbuf, inlen, in efx_mae_alloc_action_set_list()
1436 kfree(inbuf); in efx_mae_alloc_action_set_list()
1444 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ACTION_SET_LIST_FREE_IN_LEN(1)); in efx_mae_free_action_set_list()
1452 MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_LIST_FREE_IN_ASL_ID, in efx_mae_free_action_set_list()
1454 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_SET_LIST_FREE, inbuf, in efx_mae_free_action_set_list()
1455 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_free_action_set_list()
1477 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_OUTER_RULE_INSERT_IN_LEN(MAE_ENC_FIELD_PAIRS_LEN)); in efx_mae_register_encap_match()
1486 match_crit = _MCDI_DWORD(inbuf, MAE_OUTER_RULE_INSERT_IN_FIELD_MATCH_CRITERIA); in efx_mae_register_encap_match()
1491 MCDI_SET_DWORD(inbuf, MAE_OUTER_RULE_INSERT_IN_ENCAP_TYPE, rc); in efx_mae_register_encap_match()
1535 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_OUTER_RULE_INSERT, inbuf, in efx_mae_register_encap_match()
1536 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_register_encap_match()
1549 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_OUTER_RULE_REMOVE_IN_LEN(1)); in efx_mae_unregister_encap_match()
1553 MCDI_SET_DWORD(inbuf, MAE_OUTER_RULE_REMOVE_IN_OR_ID, encap->fw_id); in efx_mae_unregister_encap_match()
1554 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_OUTER_RULE_REMOVE, inbuf, in efx_mae_unregister_encap_match()
1555 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_unregister_encap_match()
1692 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_OUTER_RULE_INSERT_IN_LEN(MAE_ENC_FIELD_PAIRS_LEN)); in efx_mae_insert_lhs_outer_rule()
1699 MCDI_SET_DWORD(inbuf, MAE_OUTER_RULE_INSERT_IN_PRIO, prio); in efx_mae_insert_lhs_outer_rule()
1701 match_crit = _MCDI_DWORD(inbuf, MAE_OUTER_RULE_INSERT_IN_FIELD_MATCH_CRITERIA); in efx_mae_insert_lhs_outer_rule()
1708 MCDI_SET_DWORD(inbuf, MAE_OUTER_RULE_INSERT_IN_ENCAP_TYPE, in efx_mae_insert_lhs_outer_rule()
1714 MCDI_POPULATE_DWORD_6(inbuf, MAE_OUTER_RULE_INSERT_IN_LOOKUP_CONTROL, in efx_mae_insert_lhs_outer_rule()
1725 MCDI_SET_DWORD(inbuf, MAE_OUTER_RULE_INSERT_IN_COUNTER_ID, in efx_mae_insert_lhs_outer_rule()
1727 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_OUTER_RULE_INSERT, inbuf, in efx_mae_insert_lhs_outer_rule()
1728 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_insert_lhs_outer_rule()
1747 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_OUTER_RULE_REMOVE_IN_LEN(1)); in efx_mae_remove_lhs_outer_rule()
1751 MCDI_SET_DWORD(inbuf, MAE_OUTER_RULE_REMOVE_IN_OR_ID, rule->fw_id); in efx_mae_remove_lhs_outer_rule()
1752 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_OUTER_RULE_REMOVE, inbuf, in efx_mae_remove_lhs_outer_rule()
1753 sizeof(inbuf), outbuf, sizeof(outbuf), &outlen); in efx_mae_remove_lhs_outer_rule()
1918 efx_dword_t *inbuf; in efx_mae_insert_ct() local
1932 inbuf = kzalloc(inlen, GFP_KERNEL); in efx_mae_insert_ct()
1933 if (!inbuf) in efx_mae_insert_ct()
1965 MCDI_SET_DWORD(inbuf, TABLE_INSERT_IN_TABLE_ID, TABLE_ID_CONNTRACK_TABLE); in efx_mae_insert_ct()
1966 MCDI_SET_WORD(inbuf, TABLE_INSERT_IN_KEY_WIDTH, in efx_mae_insert_ct()
1969 MCDI_SET_WORD(inbuf, TABLE_INSERT_IN_RESP_WIDTH, in efx_mae_insert_ct()
1971 memcpy(MCDI_PTR(inbuf, TABLE_INSERT_IN_DATA), key, kw * sizeof(__le32)); in efx_mae_insert_ct()
1972 memcpy(MCDI_PTR(inbuf, TABLE_INSERT_IN_DATA) + kw * sizeof(__le32), in efx_mae_insert_ct()
1977 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_INSERT, inbuf, inlen, NULL, 0, NULL); in efx_mae_insert_ct()
1982 kfree(inbuf); in efx_mae_insert_ct()
1989 efx_dword_t *inbuf; in efx_mae_remove_ct() local
2003 inbuf = kzalloc(inlen, GFP_KERNEL); in efx_mae_remove_ct()
2004 if (!inbuf) in efx_mae_remove_ct()
2015 MCDI_SET_DWORD(inbuf, TABLE_DELETE_IN_TABLE_ID, TABLE_ID_CONNTRACK_TABLE); in efx_mae_remove_ct()
2016 MCDI_SET_WORD(inbuf, TABLE_DELETE_IN_KEY_WIDTH, in efx_mae_remove_ct()
2020 memcpy(MCDI_PTR(inbuf, TABLE_DELETE_IN_DATA), key, kw * sizeof(__le32)); in efx_mae_remove_ct()
2024 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_DELETE, inbuf, inlen, NULL, 0, NULL); in efx_mae_remove_ct()
2028 kfree(inbuf); in efx_mae_remove_ct()
2177 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ACTION_RULE_INSERT_IN_LEN(MAE_FIELD_MASK_VALUE_PAIRS_V2_LEN)); in efx_mae_insert_rule()
2187 match_crit = _MCDI_DWORD(inbuf, MAE_ACTION_RULE_INSERT_IN_MATCH_CRITERIA); in efx_mae_insert_rule()
2188 response = _MCDI_DWORD(inbuf, MAE_ACTION_RULE_INSERT_IN_RESPONSE); in efx_mae_insert_rule()
2199 MCDI_SET_DWORD(inbuf, MAE_ACTION_RULE_INSERT_IN_PRIO, prio); in efx_mae_insert_rule()
2204 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_RULE_INSERT, inbuf, sizeof(inbuf), in efx_mae_insert_rule()
2216 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ACTION_RULE_UPDATE_IN_LEN); in efx_mae_update_rule()
2220 response = _MCDI_DWORD(inbuf, MAE_ACTION_RULE_UPDATE_IN_RESPONSE); in efx_mae_update_rule()
2222 MCDI_SET_DWORD(inbuf, MAE_ACTION_RULE_UPDATE_IN_AR_ID, id); in efx_mae_update_rule()
2233 return efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_RULE_UPDATE, inbuf, sizeof(inbuf), in efx_mae_update_rule()
2240 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_ACTION_RULE_DELETE_IN_LEN(1)); in efx_mae_delete_rule()
2244 MCDI_SET_DWORD(inbuf, MAE_ACTION_RULE_DELETE_IN_AR_ID, id); in efx_mae_delete_rule()
2245 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_RULE_DELETE, inbuf, sizeof(inbuf), in efx_mae_delete_rule()