| 1181 | } |
| 1182 | |
| 1183 | static int |
| 1184 | ionic_lif_rss_setup(struct ionic_lif *lif) |
| 1185 | { |
| 1186 | struct ionic_adapter *adapter = lif->adapter; |
| 1187 | static const uint8_t toeplitz_symmetric_key[] = { |
| 1188 | 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, |
| 1189 | 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, |
| 1190 | 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, |
| 1191 | 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, |
| 1192 | 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, |
| 1193 | }; |
| 1194 | uint32_t i; |
| 1195 | uint16_t tbl_sz = |
| 1196 | rte_le_to_cpu_16(adapter->ident.lif.eth.rss_ind_tbl_sz); |
| 1197 | |
| 1198 | IONIC_PRINT_CALL(); |
| 1199 | |
| 1200 | if (!lif->rss_ind_tbl_z) { |
| 1201 | lif->rss_ind_tbl_z = rte_eth_dma_zone_reserve(lif->eth_dev, |
| 1202 | "rss_ind_tbl", 0 /* queue_idx */, |
| 1203 | sizeof(*lif->rss_ind_tbl) * tbl_sz, |
| 1204 | IONIC_ALIGN, rte_socket_id()); |
| 1205 | if (!lif->rss_ind_tbl_z) { |
| 1206 | IONIC_PRINT(ERR, "OOM"); |
| 1207 | return -ENOMEM; |
| 1208 | } |
| 1209 | |
| 1210 | lif->rss_ind_tbl = lif->rss_ind_tbl_z->addr; |
| 1211 | lif->rss_ind_tbl_pa = lif->rss_ind_tbl_z->iova; |
| 1212 | } |
| 1213 | |
| 1214 | if (lif->rss_ind_tbl_nrxqcqs != lif->nrxqcqs) { |
| 1215 | lif->rss_ind_tbl_nrxqcqs = lif->nrxqcqs; |
| 1216 | |
| 1217 | /* Fill indirection table with 'default' values */ |
| 1218 | for (i = 0; i < tbl_sz; i++) |
| 1219 | lif->rss_ind_tbl[i] = i % lif->nrxqcqs; |
| 1220 | } |
| 1221 | |
| 1222 | return ionic_lif_rss_config(lif, IONIC_RSS_OFFLOAD_ALL, |
| 1223 | toeplitz_symmetric_key, NULL); |
| 1224 | } |
| 1225 | |
| 1226 | static void |
| 1227 | ionic_lif_rss_teardown(struct ionic_lif *lif) |
no test coverage detected