common/cnxk: use computed value for WQE skip
[dpdk.git] / drivers / net / cnxk / cnxk_ethdev_telemetry.c
index 83bc658..180108a 100644 (file)
@@ -23,6 +23,7 @@ ethdev_tel_handle_info(const char *cmd __rte_unused,
                struct eth_info_s {
                        /** PF/VF information */
                        uint16_t pf_func;
+                       uint16_t inl_dev_pf_func;
                        uint8_t max_mac_entries;
                        bool dmac_filter_ena;
                        uint8_t dmac_filter_count;
@@ -49,6 +50,8 @@ ethdev_tel_handle_info(const char *cmd __rte_unused,
        rte_tel_data_add_dict_int(d, "n_ports", n_ports);
 
        i_data = rte_tel_data_alloc();
+       if (i_data == NULL)
+               return -ENOMEM;
        rte_tel_data_start_array(i_data, RTE_TEL_U64_VAL);
 
        for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
@@ -62,6 +65,8 @@ 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->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;