Here we do repace testpmd direct usage of IXGBE driver calls with generic ethdev macsec API calls
Signed-off-by: Igor Russkikh <igor.russk...@aquantia.com> --- app/test-pmd/cmdline.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2ab03c111316..1730c76fe65c 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -13958,9 +13958,7 @@ cmd_set_macsec_offload_on_parsed( rte_eth_dev_info_get(port_id, &dev_info); if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MACSEC_INSERT) { -#ifdef RTE_LIBRTE_IXGBE_PMD - ret = rte_pmd_ixgbe_macsec_enable(port_id, en, rp); -#endif + ret = rte_eth_macsec_enable(port_id, en, rp); } RTE_SET_USED(en); RTE_SET_USED(rp); @@ -14052,9 +14050,7 @@ cmd_set_macsec_offload_off_parsed( rte_eth_dev_info_get(port_id, &dev_info); if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MACSEC_INSERT) { -#ifdef RTE_LIBRTE_IXGBE_PMD - ret = rte_pmd_ixgbe_macsec_disable(port_id); -#endif + ret = rte_eth_macsec_disable(port_id); } switch (ret) { case 0: @@ -14138,13 +14134,11 @@ cmd_set_macsec_sc_parsed( int ret = -ENOTSUP; int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0; -#ifdef RTE_LIBRTE_IXGBE_PMD ret = is_tx ? - rte_pmd_ixgbe_macsec_config_txsc(res->port_id, + rte_eth_macsec_config_txsc(res->port_id, res->mac.addr_bytes) : - rte_pmd_ixgbe_macsec_config_rxsc(res->port_id, + rte_eth_macsec_config_rxsc(res->port_id, res->mac.addr_bytes, res->pi); -#endif RTE_SET_USED(is_tx); switch (ret) { @@ -14257,13 +14251,11 @@ cmd_set_macsec_sa_parsed( key[i] = (uint8_t) ((xdgt0 * 16) + xdgt1); } -#ifdef RTE_LIBRTE_IXGBE_PMD ret = is_tx ? - rte_pmd_ixgbe_macsec_select_txsa(res->port_id, + rte_eth_macsec_select_txsa(res->port_id, res->idx, res->an, res->pn, key) : - rte_pmd_ixgbe_macsec_select_rxsa(res->port_id, + rte_eth_macsec_select_rxsa(res->port_id, res->idx, res->an, res->pn, key); -#endif RTE_SET_USED(is_tx); RTE_SET_USED(key); -- 2.17.1