| b456bf50 | 29-Nov-2024 |
Anatoly Burakov <anatoly.burakov@intel.com> |
usertools/devbind: fix NUMA node display
On some systems (particularly ones with NUMA disabled in BIOS), even though NUMA nodes may be present in sysfs, the lspci command will not have NUMANode keys
usertools/devbind: fix NUMA node display
On some systems (particularly ones with NUMA disabled in BIOS), even though NUMA nodes may be present in sysfs, the lspci command will not have NUMANode keys in them, which will cause an exception. Fix to check if NUMANode keys are available in lspci output before enabling NUMA node output.
Fixes: a7d69cef8f20 ("usertools/devbind: print device NUMA node")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Robin Jarry <rjarry@redhat.com>
show more ...
|
| a7d69cef | 22-Aug-2024 |
Anatoly Burakov <anatoly.burakov@intel.com> |
usertools/devbind: print device NUMA node
Currently, devbind does not print out any NUMA information, which makes figuring out which NUMA node device belongs to not trivial. Add printouts for NUMA i
usertools/devbind: print device NUMA node
Currently, devbind does not print out any NUMA information, which makes figuring out which NUMA node device belongs to not trivial. Add printouts for NUMA information if NUMA support is enabled on the system.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Robin Jarry <rjarry@redhat.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| f63ca249 | 22-Aug-2024 |
Anatoly Burakov <anatoly.burakov@intel.com> |
usertools/hugepages: update coding style
Update coding style:
- make the code PEP-484 compliant - add more comments, improve readability, use f-strings everywhere - address all Python static analys
usertools/hugepages: update coding style
Update coding style:
- make the code PEP-484 compliant - add more comments, improve readability, use f-strings everywhere - address all Python static analysis (e.g. mypy, pylint) warnings - format code with Ruff - improve error handling - refactor printing and sysfs/procfs access functions - sort huge page reservation status output by NUMA node
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Robin Jarry <rjarry@redhat.com>
show more ...
|
| 2b091dea | 22-Aug-2024 |
Anatoly Burakov <anatoly.burakov@intel.com> |
usertools/cpu_layout: print CPU NUMA node
In traditional NUMA case, NUMA nodes and physical sockets were used interchangeably, but there are cases where there can be multiple NUMA nodes per socket,
usertools/cpu_layout: print CPU NUMA node
In traditional NUMA case, NUMA nodes and physical sockets were used interchangeably, but there are cases where there can be multiple NUMA nodes per socket, as well as all CPU's being assigned NUMA node 0 even in cases of multiple sockets. Use sysfs to print out NUMA information.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Robin Jarry <rjarry@redhat.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| d94ebd62 | 16-Apr-2024 |
Robin Jarry <rjarry@redhat.com> |
usertools: add telemetry exporter
For now the telemetry socket is local to the machine running a DPDK application. Also, there is no official "schema" for the exposed metrics. Add a framework and a
usertools: add telemetry exporter
For now the telemetry socket is local to the machine running a DPDK application. Also, there is no official "schema" for the exposed metrics. Add a framework and a script to collect and expose these metrics to telemetry and observability agree gators such as Prometheus, Carbon or Influxdb. The exposed data must be done with end-users in mind, some DPDK terminology or internals may not make sense to everyone.
The script only serves as an entry point and does not know anything about any specific metrics nor JSON data structures exposed in the telemetry socket.
It uses dynamically loaded endpoint exporters which are basic python files that must implement two functions:
def info() -> dict[MetricName, MetricInfo]: Mapping of metric names to their description and type.
def metrics(sock: TelemetrySocket) -> list[MetricValue]: Request data from sock and return it as metric values. A metric value is a 3-tuple: (name: str, value: any, labels: dict). Each name must be present in info().
The sock argument passed to metrics() has a single method:
def cmd(self, uri: str, arg: any = None) -> dict | list: Request JSON data to the telemetry socket and parse it to python values.
The main script invokes endpoints and exports the data into an output format. For now, only two formats are implemented:
* openmetrics/prometheus: text based format exported via a local HTTP server. * carbon/graphite: binary (python pickle) format exported to a distant carbon TCP server.
As a starting point, 3 built-in endpoints are implemented:
* counters: ethdev hardware counters * cpu: lcore usage * memory: overall memory usage
The goal is to keep all built-in endpoints in the DPDK repository so that they can be updated along with the telemetry JSON data structures.
Example output for the openmetrics:// format:
~# dpdk-telemetry-exporter.py -o openmetrics://:9876 & INFO using endpoint: counters (from .../telemetry-endpoints/counters.py) INFO using endpoint: cpu (from .../telemetry-endpoints/cpu.py) INFO using endpoint: memory (from .../telemetry-endpoints/memory.py) INFO listening on port 9876 [1] 838829
~$ curl http://127.0.0.1:9876/ # HELP dpdk_cpu_total_cycles Total number of CPU cycles. # TYPE dpdk_cpu_total_cycles counter # HELP dpdk_cpu_busy_cycles Number of busy CPU cycles. # TYPE dpdk_cpu_busy_cycles counter dpdk_cpu_total_cycles{cpu="73", numa="0"} 4353385274702980 dpdk_cpu_busy_cycles{cpu="73", numa="0"} 6215932860 dpdk_cpu_total_cycles{cpu="9", numa="0"} 4353385274745740 dpdk_cpu_busy_cycles{cpu="9", numa="0"} 6215932860 dpdk_cpu_total_cycles{cpu="8", numa="0"} 4353383451895540 dpdk_cpu_busy_cycles{cpu="8", numa="0"} 6171923160 dpdk_cpu_total_cycles{cpu="72", numa="0"} 4353385274817320 dpdk_cpu_busy_cycles{cpu="72", numa="0"} 6215932860 # HELP dpdk_memory_total_bytes The total size of reserved memory in bytes. # TYPE dpdk_memory_total_bytes gauge # HELP dpdk_memory_used_bytes The currently used memory in bytes. # TYPE dpdk_memory_used_bytes gauge dpdk_memory_total_bytes 1073741824 dpdk_memory_used_bytes 794197376
Link: https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format Link: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#text-format Link: https://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-pickle-protocol Link: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/prometheus Signed-off-by: Robin Jarry <rjarry@redhat.com> Tested-by: Anthony Harivel <aharivel@redhat.com>
show more ...
|
| 0d7dad08 | 01-Jul-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
usertools/pmdinfo: remove unneeded whitespace
Fix the warning $ flake8 --max-line-length=100 dpdk-pmdinfo.py dpdk-pmdinfo.py:217:40: E203 whitespace before ':'
Signed-off-by: Stephen Hemminger <ste
usertools/pmdinfo: remove unneeded whitespace
Fix the warning $ flake8 --max-line-length=100 dpdk-pmdinfo.py dpdk-pmdinfo.py:217:40: E203 whitespace before ':'
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Robin Jarry <rjarry@redhat.com>
show more ...
|
| 202e5b2b | 20-Nov-2023 |
Robin Jarry <rjarry@redhat.com> |
usertools/rss: add cnxk default key
Add default RSS key for CNXK platforms. CNXK platform uses 48 bytes long key for hash calculations and a default RETA size of 64.
Example:
~$ usertools/dpdk-r
usertools/rss: add cnxk default key
Add default RSS key for CNXK platforms. CNXK platform uses 48 bytes long key for hash calculations and a default RETA size of 64.
Example:
~$ usertools/dpdk-rss-flows.py 8 28.0.0.0/24 40.0.0.0/24 -k cnxk SRC_IP DST_IP QUEUE 28.0.0.1 40.0.0.1 7 28.0.0.1 40.0.0.2 2 28.0.0.1 40.0.0.3 4 28.0.0.1 40.0.0.7 1 28.0.0.1 40.0.0.8 3 28.0.0.1 40.0.0.9 5 28.0.0.1 40.0.0.10 0 28.0.0.1 40.0.0.11 6
Suggested-by: Sunil Kumar Kori <skori@marvell.com> Signed-off-by: Robin Jarry <rjarry@redhat.com> Acked-by: Sunil Kumar Kori <skori@marvell.com>
show more ...
|
| bfdf091c | 20-Nov-2023 |
Robin Jarry <rjarry@redhat.com> |
usertools/rss: add --info flag
Add a flag to print the RSS key and RETA size that are used to compute balanced traffic. Example:
$ usertools/dpdk-rss-flows.py -i 4 1.0.0.0 2.2.0.0/24 -k mlx RSS k
usertools/rss: add --info flag
Add a flag to print the RSS key and RETA size that are used to compute balanced traffic. Example:
$ usertools/dpdk-rss-flows.py -i 4 1.0.0.0 2.2.0.0/24 -k mlx RSS key: 2cc681d15bdbf4f7fca28319db1a3e946b9e38d92c9c03d1ad9944a7d… RETA size: 4
SRC_IP DST_IP QUEUE 1.0.0.0 2.2.0.1 2 1.0.0.0 2.2.0.2 0 1.0.0.0 2.2.0.4 1 1.0.0.0 2.2.0.6 3
The flag is only available with the default text output.
Signed-off-by: Robin Jarry <rjarry@redhat.com> Acked-by: Sunil Kumar Kori <skori@marvell.com>
show more ...
|
| a9c28754 | 20-Nov-2023 |
Robin Jarry <rjarry@redhat.com> |
usertools/rss: add driver abstractions
The default RETA size is not the same for all drivers. In some drivers (mlx5), the RETA size may also be dependent on the number of RX queues.
Introduce a new
usertools/rss: add driver abstractions
The default RETA size is not the same for all drivers. In some drivers (mlx5), the RETA size may also be dependent on the number of RX queues.
Introduce a new DriverInfo abstraction for known keys. Define a simple API to expose the RSS key and RETA size (based on the number of RX queues).
Use that abstraction for all three known keys.
Signed-off-by: Robin Jarry <rjarry@redhat.com> Acked-by: Sunil Kumar Kori <skori@marvell.com>
show more ...
|
| a15fc792 | 10-Jan-2023 |
Huisong Li <lihuisong@huawei.com> |
usertools/telemetry: add file prefix argument
Currently, the file prefix for DPDK runtime directory is 'rte' which was fixed in the telemetry client script. The user had to modify the prefix each ti
usertools/telemetry: add file prefix argument
Currently, the file prefix for DPDK runtime directory is 'rte' which was fixed in the telemetry client script. The user had to modify the prefix each time to run this script if the file prefix of application isn't 'rte'. So this patch adds an optional argument for the file prefix, like, "./dpdk-telemetry-client.py -f rte_xxx sock_path"
Signed-off-by: Huisong Li <lihuisong@huawei.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|