From: Anoob Joseph <ano...@marvell.com>

Inline PF FUNC would be required to set SSO_PF_FUNC in the instruction
for cryptodev Rx inject. Move the API to idev to allow usage of the
same.

Signed-off-by: Anoob Joseph <ano...@marvell.com>
---
 drivers/common/cnxk/roc_idev.c           | 6 ++++++
 drivers/common/cnxk/roc_idev.h           | 2 ++
 drivers/common/cnxk/roc_nix_inl.h        | 1 -
 drivers/common/cnxk/roc_nix_inl_dev.c    | 6 ------
 drivers/common/cnxk/version.map          | 2 +-
 drivers/net/cnxk/cn10k_ethdev_sec.c      | 2 +-
 drivers/net/cnxk/cnxk_ethdev_telemetry.c | 3 +--
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/common/cnxk/roc_idev.c b/drivers/common/cnxk/roc_idev.c
index d0307c666c..0778d51d1e 100644
--- a/drivers/common/cnxk/roc_idev.c
+++ b/drivers/common/cnxk/roc_idev.c
@@ -374,3 +374,9 @@ roc_idev_nix_rx_chan_set(uint16_t port, uint16_t chan)
        if (idev != NULL && port < PLT_MAX_ETHPORTS)
                __atomic_store_n(&idev->inl_rx_inj_cfg.chan[port], chan, 
__ATOMIC_RELEASE);
 }
+
+uint16_t
+roc_idev_nix_inl_dev_pffunc_get(void)
+{
+       return nix_inl_dev_pffunc_get();
+}
diff --git a/drivers/common/cnxk/roc_idev.h b/drivers/common/cnxk/roc_idev.h
index 00664eaed6..fc0f7db54e 100644
--- a/drivers/common/cnxk/roc_idev.h
+++ b/drivers/common/cnxk/roc_idev.h
@@ -27,4 +27,6 @@ uint8_t __roc_api roc_idev_nix_rx_inject_get(uint16_t port);
 void __roc_api roc_idev_nix_rx_inject_set(uint16_t port, uint8_t enable);
 uint16_t *__roc_api roc_idev_nix_rx_chan_base_get(void);
 void __roc_api roc_idev_nix_rx_chan_set(uint16_t port, uint16_t chan);
+
+uint16_t __roc_api roc_idev_nix_inl_dev_pffunc_get(void);
 #endif /* _ROC_IDEV_H_ */
diff --git a/drivers/common/cnxk/roc_nix_inl.h 
b/drivers/common/cnxk/roc_nix_inl.h
index ab0965e512..1a4bf8808c 100644
--- a/drivers/common/cnxk/roc_nix_inl.h
+++ b/drivers/common/cnxk/roc_nix_inl.h
@@ -112,7 +112,6 @@ void __roc_api roc_nix_inl_dev_lock(void);
 void __roc_api roc_nix_inl_dev_unlock(void);
 int __roc_api roc_nix_inl_dev_xaq_realloc(uint64_t aura_handle);
 int __roc_api roc_nix_inl_dev_stats_get(struct roc_nix_stats *stats);
-uint16_t __roc_api roc_nix_inl_dev_pffunc_get(void);
 int __roc_api roc_nix_inl_dev_cpt_setup(bool use_inl_dev_sso);
 int __roc_api roc_nix_inl_dev_cpt_release(void);
 bool __roc_api roc_nix_inl_dev_is_multi_channel(void);
diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c 
b/drivers/common/cnxk/roc_nix_inl_dev.c
index 60e6a43033..e2bbe3a67b 100644
--- a/drivers/common/cnxk/roc_nix_inl_dev.c
+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
@@ -34,12 +34,6 @@ nix_inl_dev_pffunc_get(void)
        return 0;
 }
 
-uint16_t
-roc_nix_inl_dev_pffunc_get(void)
-{
-       return nix_inl_dev_pffunc_get();
-}
-
 static void
 nix_inl_selftest_work_cb(uint64_t *gw, void *args, uint32_t soft_exp_event)
 {
diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map
index eac2ea9ff8..f98738d07e 100644
--- a/drivers/common/cnxk/version.map
+++ b/drivers/common/cnxk/version.map
@@ -112,6 +112,7 @@ INTERNAL {
        roc_idev_npa_nix_get;
        roc_idev_num_lmtlines_get;
        roc_idev_nix_inl_meta_aura_get;
+       roc_idev_nix_inl_dev_pffunc_get;
        roc_idev_nix_list_get;
        roc_idev_nix_rx_chan_base_get;
        roc_idev_nix_rx_chan_set;
@@ -244,7 +245,6 @@ INTERNAL {
        roc_nix_inl_dev_is_probed;
        roc_nix_inl_dev_stats_get;
        roc_nix_inl_dev_lock;
-       roc_nix_inl_dev_pffunc_get;
        roc_nix_inl_dev_rq;
        roc_nix_inl_dev_rq_get;
        roc_nix_inl_dev_rq_put;
diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c 
b/drivers/net/cnxk/cn10k_ethdev_sec.c
index b8b0da5ea9..5e509e97d4 100644
--- a/drivers/net/cnxk/cn10k_ethdev_sec.c
+++ b/drivers/net/cnxk/cn10k_ethdev_sec.c
@@ -1360,7 +1360,7 @@ cn10k_eth_sec_rx_inject_config(void *device, uint16_t 
port_id, bool enable)
        inj_cfg->io_addr = inl_lf->io_addr;
        inj_cfg->lmt_base = nix->lmt_base;
        channel = roc_nix_get_base_chan(nix);
-       pf_func = roc_nix_inl_dev_pffunc_get();
+       pf_func = roc_idev_nix_inl_dev_pffunc_get();
        inj_cfg->cmd_w0 = pf_func << 48 | inj_match_id << 32 | channel << 4;
 
        return 0;
diff --git a/drivers/net/cnxk/cnxk_ethdev_telemetry.c 
b/drivers/net/cnxk/cnxk_ethdev_telemetry.c
index 3027ca4735..a1958185f2 100644
--- a/drivers/net/cnxk/cnxk_ethdev_telemetry.c
+++ b/drivers/net/cnxk/cnxk_ethdev_telemetry.c
@@ -65,8 +65,7 @@ ethdev_tel_handle_info(const char *cmd __rte_unused,
                        info = &eth_info.info;
                        dev = cnxk_eth_pmd_priv(eth_dev);
                        if (dev) {
-                               info->inl_dev_pf_func =
-                                       roc_nix_inl_dev_pffunc_get();
+                               info->inl_dev_pf_func = 
roc_idev_nix_inl_dev_pffunc_get();
                                info->pf_func = roc_nix_get_pf_func(&dev->nix);
                                info->max_mac_entries = dev->max_mac_entries;
                                info->dmac_filter_ena = dev->dmac_filter_enable;
-- 
2.25.1

Reply via email to