| 1146 | } |
| 1147 | |
| 1148 | int |
| 1149 | ionic_lif_rss_config(struct ionic_lif *lif, |
| 1150 | const uint16_t types, const uint8_t *key, const uint32_t *indir) |
| 1151 | { |
| 1152 | struct ionic_adapter *adapter = lif->adapter; |
| 1153 | struct ionic_admin_ctx ctx = { |
| 1154 | .pending_work = true, |
| 1155 | .cmd.lif_setattr = { |
| 1156 | .opcode = IONIC_CMD_LIF_SETATTR, |
| 1157 | .attr = IONIC_LIF_ATTR_RSS, |
| 1158 | .rss.types = rte_cpu_to_le_16(types), |
| 1159 | .rss.addr = rte_cpu_to_le_64(lif->rss_ind_tbl_pa), |
| 1160 | }, |
| 1161 | }; |
| 1162 | unsigned int i; |
| 1163 | uint16_t tbl_sz = |
| 1164 | rte_le_to_cpu_16(adapter->ident.lif.eth.rss_ind_tbl_sz); |
| 1165 | |
| 1166 | IONIC_PRINT_CALL(); |
| 1167 | |
| 1168 | lif->rss_types = types; |
| 1169 | |
| 1170 | if (key) |
| 1171 | memcpy(lif->rss_hash_key, key, IONIC_RSS_HASH_KEY_SIZE); |
| 1172 | |
| 1173 | if (indir) |
| 1174 | for (i = 0; i < tbl_sz; i++) |
| 1175 | lif->rss_ind_tbl[i] = indir[i]; |
| 1176 | |
| 1177 | memcpy(ctx.cmd.lif_setattr.rss.key, lif->rss_hash_key, |
| 1178 | IONIC_RSS_HASH_KEY_SIZE); |
| 1179 | |
| 1180 | return ionic_adminq_post_wait(lif, &ctx); |
| 1181 | } |
| 1182 | |
| 1183 | static int |
| 1184 | ionic_lif_rss_setup(struct ionic_lif *lif) |
no test coverage detected