]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/lib/librte_eal/common/rte_service.c
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / dpdk / lib / librte_eal / common / rte_service.c
index 8767c72250760e81066e8a0d9f88d32c7d1440c5..5f75e5a53fbf2d90ce227089d2f89045bc978b26 100644 (file)
@@ -7,7 +7,6 @@
 #include <inttypes.h>
 #include <limits.h>
 #include <string.h>
-#include <dirent.h>
 
 #include <rte_compat.h>
 #include <rte_service.h>
@@ -735,7 +734,7 @@ rte_service_lcore_stop(uint32_t lcore)
 }
 
 int32_t
-rte_service_attr_get(uint32_t id, uint32_t attr_id, uint32_t *attr_value)
+rte_service_attr_get(uint32_t id, uint32_t attr_id, uint64_t *attr_value)
 {
        struct rte_service_spec_impl *s;
        SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);
@@ -795,6 +794,9 @@ rte_service_dump_one(FILE *f, struct rte_service_spec_impl *s,
                return;
        }
 
+       if (f == NULL)
+               return;
+
        fprintf(f, "  %s: stats %d\tcalls %"PRIu64"\tcycles %"
                        PRIu64"\tavg: %"PRIu64"\n",
                        s->spec.name, service_stats_enabled(s), s->calls,