| 513 | } |
| 514 | |
| 515 | static int |
| 516 | ionic_dev_rss_reta_update(struct rte_eth_dev *eth_dev, |
| 517 | struct rte_eth_rss_reta_entry64 *reta_conf, |
| 518 | uint16_t reta_size) |
| 519 | { |
| 520 | struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev); |
| 521 | struct ionic_adapter *adapter = lif->adapter; |
| 522 | struct ionic_identity *ident = &adapter->ident; |
| 523 | uint32_t i, j, index, num; |
| 524 | uint16_t tbl_sz = rte_le_to_cpu_16(ident->lif.eth.rss_ind_tbl_sz); |
| 525 | |
| 526 | IONIC_PRINT_CALL(); |
| 527 | |
| 528 | if (!lif->rss_ind_tbl) { |
| 529 | IONIC_PRINT(ERR, "RSS RETA not initialized, " |
| 530 | "can't update the table"); |
| 531 | return -EINVAL; |
| 532 | } |
| 533 | |
| 534 | if (reta_size != tbl_sz) { |
| 535 | IONIC_PRINT(ERR, "The size of hash lookup table configured " |
| 536 | "(%d) does not match the number hardware can support " |
| 537 | "(%d)", |
| 538 | reta_size, tbl_sz); |
| 539 | return -EINVAL; |
| 540 | } |
| 541 | |
| 542 | num = tbl_sz / RTE_ETH_RETA_GROUP_SIZE; |
| 543 | |
| 544 | for (i = 0; i < num; i++) { |
| 545 | for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) { |
| 546 | if (reta_conf[i].mask & ((uint64_t)1 << j)) { |
| 547 | index = (i * RTE_ETH_RETA_GROUP_SIZE) + j; |
| 548 | lif->rss_ind_tbl[index] = reta_conf[i].reta[j]; |
| 549 | } |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | return ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL); |
| 554 | } |
| 555 | |
| 556 | static int |
| 557 | ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev, |
nothing calls this directly
no test coverage detected