Lines Matching refs:rc

26 	int rc;
37 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MPORT_ALLOC, inbuf, sizeof(inbuf),
39 if (rc)
40 return rc;
107 int rc;
110 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MPORT_LOOKUP, inbuf, sizeof(inbuf),
112 if (rc)
113 return rc;
126 int rc;
135 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_COUNTERS_STREAM_START,
137 if (rc)
138 return rc;
175 int rc, i;
179 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_COUNTERS_STREAM_STOP,
182 if (rc)
183 return rc;
211 return rc;
239 int rc;
246 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_DESCRIPTOR, inbuf, sizeof(inbuf),
248 if (rc)
251 rc = -EIO;
262 rc = -EOPNOTSUPP;
268 rc = -ENOMEM;
310 return rc;
357 int rc;
359 rc = TABLE_HOOK_KEY(meta_ct, eth_proto, ETHER_TYPE);
360 if (rc)
361 return rc;
362 rc = TABLE_HOOK_KEY(meta_ct, ip_proto, IP_PROTO);
363 if (rc)
364 return rc;
365 rc = TABLE_HOOK_KEY(meta_ct, src_ip, SRC_IP);
366 if (rc)
367 return rc;
368 rc = TABLE_HOOK_KEY(meta_ct, dst_ip, DST_IP);
369 if (rc)
370 return rc;
371 rc = TABLE_HOOK_KEY(meta_ct, l4_sport, SRC_PORT);
372 if (rc)
373 return rc;
374 rc = TABLE_HOOK_KEY(meta_ct, l4_dport, DST_PORT);
375 if (rc)
376 return rc;
377 rc = TABLE_HOOK_KEY(meta_ct, zone, DOMAIN);
378 if (rc)
379 return rc;
380 rc = TABLE_HOOK_RESP(meta_ct, dnat, NAT_DIR);
381 if (rc)
382 return rc;
383 rc = TABLE_HOOK_RESP(meta_ct, nat_ip, NAT_IP);
384 if (rc)
385 return rc;
386 rc = TABLE_HOOK_RESP(meta_ct, l4_natport, NAT_PORT);
387 if (rc)
388 return rc;
389 rc = TABLE_HOOK_RESP(meta_ct, mark, CT_MARK);
390 if (rc)
391 return rc;
392 rc = TABLE_HOOK_RESP(meta_ct, counter_id, COUNTER_ID);
393 if (rc)
394 return rc;
413 int rc, idx;
420 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_LIST, inbuf, sizeof(inbuf), outbuf,
422 if (rc)
448 int rc;
452 rc = efx_mae_table_get_desc(efx, &efx->tc->meta_ct.desc,
454 if (rc) {
456 "FW does not support conntrack desc rc %d\n",
457 rc);
461 rc = efx_mae_table_hook_ct(efx, &efx->tc->meta_ct);
462 if (rc) {
464 "FW does not support conntrack hook rc %d\n",
465 rc);
485 int rc;
489 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_GET_CAPS, NULL, 0, outbuf,
491 if (rc)
492 return rc;
508 int rc, i;
518 rc = efx_mcdi_rpc(efx, cmd, NULL, 0, outbuf, sizeof(outbuf), &outlen);
519 if (rc)
520 return rc;
539 int rc;
541 rc = efx_mae_get_basic_caps(efx, caps);
542 if (rc)
543 return rc;
544 rc = efx_mae_get_rule_fields(efx, MC_CMD_MAE_GET_AR_CAPS,
546 if (rc)
547 return rc;
634 /* Validate field mask against hardware capabilities. Captures caller's 'rc' */
639 rc = efx_mae_match_check_cap_typ(supported_fields[MAE_FIELD_ ## _mcdi],\
641 if (rc) \
645 rc; \
651 rc = efx_mae_match_check_cap_typ(supported_fields[MAE_FIELD_ ## _mcdi],\
653 if (rc) \
657 rc; \
667 int rc;
672 rc = efx_mae_match_check_cap_typ(supported_fields[MAE_FIELD_INGRESS_PORT],
674 if (rc) {
677 return rc;
706 return rc;
715 rc = efx_mae_match_check_cap_typ(
718 if (rc) {
720 return rc;
723 return rc;
738 rc = -EOPNOTSUPP; \
740 rc; \
745 rc = -EOPNOTSUPP; \
747 rc; \
761 int rc;
766 rc = efx_mae_match_check_cap_typ(supported_fields[MAE_FIELD_INGRESS_PORT],
768 if (rc) {
772 return rc;
796 return rc;
810 return rc;
818 rc = efx_mae_match_check_cap_typ(supported_fields[MAE_FIELD_ ## _mcdi],\
820 if (rc) \
823 rc; \
834 int rc;
837 return rc;
841 return rc;
845 return rc;
849 return rc;
851 rc = efx_mae_match_check_cap_typ(supported_fields[MAE_FIELD_ENC_L4_SPORT],
853 if (rc) {
856 return rc;
859 rc = efx_mae_match_check_cap_typ(supported_fields[MAE_FIELD_ENC_IP_TOS],
861 if (rc) {
864 return rc;
894 int rc;
901 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_COUNTER_ALLOC, inbuf, sizeof(inbuf),
903 if (rc)
904 return rc;
918 int rc;
923 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_COUNTER_FREE, inbuf, sizeof(inbuf),
925 if (rc)
926 return rc;
960 int rc;
962 rc = efx_mae_encap_type_to_mae_type(encap->type);
963 if (rc < 0)
964 return rc;
965 MCDI_SET_DWORD(inbuf, MAE_ENCAP_HEADER_ALLOC_IN_ENCAP_TYPE, rc);
972 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ENCAP_HEADER_ALLOC, inbuf,
974 if (rc)
975 return rc;
987 int rc;
989 rc = efx_mae_encap_type_to_mae_type(encap->type);
990 if (rc < 0)
991 return rc;
992 MCDI_SET_DWORD(inbuf, MAE_ENCAP_HEADER_UPDATE_IN_ENCAP_TYPE, rc);
1013 int rc;
1016 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ENCAP_HEADER_FREE, inbuf,
1018 if (rc)
1019 return rc;
1041 int rc = -ENOENT;
1051 rc = 0;
1057 return rc;
1081 int rc;
1083 rc = rhashtable_insert_fast(&mae->mports_ht, &desc->linkage,
1086 if (rc) {
1087 pci_err(efx->pci_dev, "Failed to insert MPORT %08x, rc %d\n",
1088 desc->mport_id, rc);
1090 return rc;
1093 return rc;
1140 int rc = 0, i;
1145 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MPORT_READ_JOURNAL, inbuf,
1148 if (rc)
1151 rc = -EIO;
1159 rc = -EIO;
1163 rc = -EIO;
1172 rc = -ENOMEM;
1208 rc = efx_mae_process_mport(efx, d);
1212 if (rc)
1219 return rc;
1238 int rc;
1244 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MAC_ADDR_ALLOC, inbuf, sizeof(inbuf),
1246 if (rc)
1247 return rc;
1268 int rc;
1271 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_MAC_ADDR_FREE, inbuf,
1273 if (rc || outlen < sizeof(outbuf))
1292 int rc;
1346 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_SET_ALLOC, inbuf, sizeof(inbuf),
1348 if (rc)
1349 return rc;
1368 int rc;
1371 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_SET_FREE, inbuf, sizeof(inbuf),
1373 if (rc)
1374 return rc;
1393 int rc;
1420 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_SET_LIST_ALLOC, inbuf, inlen,
1422 if (rc)
1425 rc = -EIO;
1434 rc = -EIO;
1438 return rc;
1447 int rc;
1455 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_SET_LIST_FREE, inbuf,
1457 if (rc)
1458 return rc;
1482 int rc;
1484 rc = efx_mae_encap_type_to_mae_type(encap->tun_type);
1485 if (rc < 0)
1486 return rc;
1492 MCDI_SET_DWORD(inbuf, MAE_OUTER_RULE_INSERT_IN_ENCAP_TYPE, rc);
1536 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_OUTER_RULE_INSERT, inbuf,
1538 if (rc)
1539 return rc;
1552 int rc;
1555 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_OUTER_RULE_REMOVE, inbuf,
1557 if (rc)
1558 return rc;
1698 int rc;
1703 rc = efx_mae_populate_lhs_match_criteria(match_crit, &rule->match);
1704 if (rc)
1705 return rc;
1709 rc = efx_mae_encap_type_to_mae_type(act->tun_type);
1710 if (rc < 0)
1711 return rc;
1712 MCDI_SET_DWORD(inbuf, MAE_OUTER_RULE_INSERT_IN_ENCAP_TYPE, rc);
1730 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_OUTER_RULE_INSERT, inbuf,
1732 if (rc)
1733 return rc;
1753 int rc;
1775 rc = efx_mae_populate_match_criteria(match_crit, &rule->match);
1776 if (rc)
1777 return rc;
1779 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_RULE_INSERT, inbuf, sizeof(inbuf),
1781 if (rc)
1782 return rc;
1803 int rc;
1806 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_OUTER_RULE_REMOVE, inbuf,
1808 if (rc)
1809 return rc;
1940 int rc;
1942 rc = TABLE_POPULATE_KEY(key, ct, eth_proto, conn->eth_proto);
1943 if (rc)
1944 return rc;
1945 rc = TABLE_POPULATE_KEY(key, ct, ip_proto, conn->ip_proto);
1946 if (rc)
1947 return rc;
1949 rc = TABLE_POPULATE_KEY(key, ct, src_ip, conn->src_ip6);
1951 rc = TABLE_POPULATE_KEY_IPV4(key, ct, src_ip, conn->src_ip);
1952 if (rc)
1953 return rc;
1955 rc = TABLE_POPULATE_KEY(key, ct, dst_ip, conn->dst_ip6);
1957 rc = TABLE_POPULATE_KEY_IPV4(key, ct, dst_ip, conn->dst_ip);
1958 if (rc)
1959 return rc;
1960 rc = TABLE_POPULATE_KEY(key, ct, l4_sport, conn->l4_sport);
1961 if (rc)
1962 return rc;
1963 rc = TABLE_POPULATE_KEY(key, ct, l4_dport, conn->l4_dport);
1964 if (rc)
1965 return rc;
1975 int rc = -ENOMEM;
1999 rc = efx_mae_populate_ct_key(efx, key, kw, conn);
2000 if (rc)
2003 rc = TABLE_POPULATE_RESP_BOOL(resp, ct, dnat, conn->dnat);
2004 if (rc)
2008 rc = TABLE_POPULATE_RESP(resp, ct, nat_ip, conn->nat_ip);
2009 if (rc)
2011 rc = TABLE_POPULATE_RESP(resp, ct, l4_natport, conn->l4_natport);
2012 if (rc)
2014 rc = TABLE_POPULATE_RESP(resp, ct, mark, cpu_to_be32(conn->mark));
2015 if (rc)
2017 rc = TABLE_POPULATE_RESP_U24(resp, ct, counter_id, conn->cnt->fw_id);
2018 if (rc)
2033 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_INSERT, inbuf, inlen, NULL, 0, NULL);
2039 return rc;
2047 int rc = -ENOMEM;
2067 rc = efx_mae_populate_ct_key(efx, key, kw, conn);
2068 if (rc)
2080 rc = efx_mcdi_rpc(efx, MC_CMD_TABLE_DELETE, inbuf, inlen, NULL, 0, NULL);
2085 return rc;
2238 int rc;
2256 rc = efx_mae_populate_match_criteria(match_crit, match);
2257 if (rc)
2258 return rc;
2260 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_RULE_INSERT, inbuf, sizeof(inbuf),
2262 if (rc)
2263 return rc;
2298 int rc;
2301 rc = efx_mcdi_rpc(efx, MC_CMD_MAE_ACTION_RULE_DELETE, inbuf, sizeof(inbuf),
2303 if (rc)
2304 return rc;
2320 int rc;
2329 rc = rhashtable_init(&mae->mports_ht, &efx_mae_mports_ht_params);
2330 if (rc < 0) {
2332 return rc;