├── .ci
├── Jenkinsfile
├── README.md
├── artifacts.sh
├── blackduck_source.sh
├── do_release.sh
├── dockerfiles
│ ├── Dockerfile.rhel8.6
│ ├── Dockerfile.rhel8.6.release
│ └── Dockerfile.rhel9.4
├── matrix_job.yaml
├── pipeline
│ ├── dr_weekly_jjb.yaml
│ ├── dr_weekly_matrix.yaml
│ ├── release_jjb.yaml
│ └── release_matrix_job.yaml
├── proj_jjb.yaml
├── redmine_jjb.yaml
├── redmine_matrix_job.yaml
└── scripts
│ └── doca_install.sh
├── .github
├── ISSUE_TEMPLATE.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .gittemplate
├── CHANGES
├── COPYING
├── LICENSE
├── Makefile.am
├── README
├── README.md
├── autogen.sh
├── config
└── m4
│ ├── compiler.m4
│ ├── func.m4
│ ├── nl.m4
│ ├── opt.m4
│ ├── prof.m4
│ └── verbs.m4
├── configure.ac
├── contrib
├── build_pkg.sh
├── jenkins_tests
│ ├── build.sh
│ ├── commit.sh
│ ├── compiler.sh
│ ├── copyright-check-map.yaml
│ ├── copyrights.sh
│ ├── cov.sh
│ ├── cppcheck.sh
│ ├── csbuild.sh
│ ├── globals.sh
│ ├── gtest.sh
│ ├── rpm.sh
│ ├── style.sh
│ ├── test.sh
│ ├── tool.sh
│ ├── vg.sh
│ └── vutil.sh
├── scripts
│ ├── libvma.spec.in
│ ├── vma.init.in
│ └── vma.service.in
├── test_jenkins.sh
└── valgrind
│ └── valgrind_vma.supp
├── debian
├── changelog.in
├── compat
├── control
├── copyright
├── libvma-dev.install
├── libvma-utils.install
├── libvma.install
├── postinst
├── postrm
├── prerm
├── rules
└── watch
├── docs
├── coding-style.md
├── contributing.md
└── man
│ ├── Makefile.am
│ ├── vma.7.in
│ ├── vma_stats.8.in
│ └── vmad.8.in
├── src
├── Makefile.am
├── state_machine
│ ├── Makefile.am
│ ├── main.cpp
│ ├── sm.cpp
│ ├── sm.h
│ ├── sm_fifo.cpp
│ └── sm_fifo.h
├── stats
│ ├── Makefile.am
│ ├── stats_data_reader.h
│ ├── stats_printer.cpp
│ ├── stats_publisher.cpp
│ └── stats_reader.cpp
├── utils
│ ├── Makefile.am
│ ├── asm-arm64.h
│ ├── asm-ppc64.h
│ ├── asm-x86.h
│ ├── asm.h
│ ├── atomic.h
│ ├── bullseye.h
│ ├── clock.h
│ ├── compiler.h
│ ├── lock_wrapper.h
│ ├── rdtsc.h
│ └── types.h
├── vlogger
│ ├── Makefile.am
│ ├── main.cpp
│ ├── vlogger.cpp
│ └── vlogger.h
└── vma
│ ├── Makefile.am
│ ├── config_parser.c
│ ├── config_parser.h
│ ├── config_scanner.c
│ ├── dev
│ ├── allocator.cpp
│ ├── allocator.h
│ ├── buffer_pool.cpp
│ ├── buffer_pool.h
│ ├── cq_mgr.cpp
│ ├── cq_mgr.h
│ ├── cq_mgr.inl
│ ├── cq_mgr_mlx5.cpp
│ ├── cq_mgr_mlx5.h
│ ├── cq_mgr_mlx5.inl
│ ├── dm_mgr.cpp
│ ├── dm_mgr.h
│ ├── gro_mgr.cpp
│ ├── gro_mgr.h
│ ├── ib_ctx_handler.cpp
│ ├── ib_ctx_handler.h
│ ├── ib_ctx_handler_collection.cpp
│ ├── ib_ctx_handler_collection.h
│ ├── net_device_entry.cpp
│ ├── net_device_entry.h
│ ├── net_device_table_mgr.cpp
│ ├── net_device_table_mgr.h
│ ├── net_device_val.cpp
│ ├── net_device_val.h
│ ├── qp_mgr.cpp
│ ├── qp_mgr.h
│ ├── qp_mgr_eth_direct.cpp
│ ├── qp_mgr_eth_direct.h
│ ├── qp_mgr_eth_mlx5.cpp
│ ├── qp_mgr_eth_mlx5.h
│ ├── rfs.cpp
│ ├── rfs.h
│ ├── rfs_mc.cpp
│ ├── rfs_mc.h
│ ├── rfs_uc.cpp
│ ├── rfs_uc.h
│ ├── rfs_uc_tcp_gro.cpp
│ ├── rfs_uc_tcp_gro.h
│ ├── ring.cpp
│ ├── ring.h
│ ├── ring_allocation_logic.cpp
│ ├── ring_allocation_logic.h
│ ├── ring_bond.cpp
│ ├── ring_bond.h
│ ├── ring_eth_direct.cpp
│ ├── ring_eth_direct.h
│ ├── ring_profile.cpp
│ ├── ring_profile.h
│ ├── ring_simple.cpp
│ ├── ring_simple.h
│ ├── ring_slave.cpp
│ ├── ring_slave.h
│ ├── ring_tap.cpp
│ ├── ring_tap.h
│ ├── time_converter.cpp
│ ├── time_converter.h
│ ├── time_converter_ib_ctx.cpp
│ ├── time_converter_ib_ctx.h
│ ├── time_converter_ptp.cpp
│ ├── time_converter_ptp.h
│ ├── wqe_send_handler.cpp
│ ├── wqe_send_handler.h
│ ├── wqe_send_ib_handler.cpp
│ └── wqe_send_ib_handler.h
│ ├── event
│ ├── command.h
│ ├── delta_timer.cpp
│ ├── delta_timer.h
│ ├── event.h
│ ├── event_handler_ibverbs.h
│ ├── event_handler_manager.cpp
│ ├── event_handler_manager.h
│ ├── event_handler_rdma_cm.h
│ ├── netlink_event.cpp
│ ├── netlink_event.h
│ ├── timer_handler.h
│ ├── timers_group.h
│ ├── vlogger_timer_handler.cpp
│ └── vlogger_timer_handler.h
│ ├── ib
│ ├── base
│ │ ├── verbs_extra.cpp
│ │ └── verbs_extra.h
│ └── mlx5
│ │ ├── ib_mlx5.cpp
│ │ ├── ib_mlx5.h
│ │ ├── ib_mlx5_dv.cpp
│ │ ├── ib_mlx5_dv.h
│ │ ├── ib_mlx5_hw.cpp
│ │ └── ib_mlx5_hw.h
│ ├── infra
│ ├── DemoCollMgr.cpp
│ ├── DemoCollMgr.h
│ ├── DemoObserver.cpp
│ ├── DemoObserver.h
│ ├── DemoSubject.cpp
│ ├── DemoSubject.h
│ ├── Makefile.am
│ ├── cache_subject_observer.h
│ ├── main.cpp
│ ├── sender.cpp
│ ├── sender.h
│ ├── sender_info_dst.cpp
│ ├── sender_info_dst.h
│ ├── subject_observer.cpp
│ └── subject_observer.h
│ ├── iomux
│ ├── epfd_info.cpp
│ ├── epfd_info.h
│ ├── epoll_wait_call.cpp
│ ├── epoll_wait_call.h
│ ├── io_mux_call.cpp
│ ├── io_mux_call.h
│ ├── poll_call.cpp
│ ├── poll_call.h
│ ├── select_call.cpp
│ └── select_call.h
│ ├── libvma.c
│ ├── lwip
│ ├── cc.c
│ ├── cc.h
│ ├── cc_cubic.c
│ ├── cc_cubic.h
│ ├── cc_lwip.c
│ ├── cc_none.c
│ ├── def.h
│ ├── err.h
│ ├── init.c
│ ├── init.h
│ ├── ip.h
│ ├── ip_addr.h
│ ├── opt.h
│ ├── pbuf.c
│ ├── pbuf.h
│ ├── stats.h
│ ├── tcp.c
│ ├── tcp.h
│ ├── tcp_impl.h
│ ├── tcp_in.c
│ └── tcp_out.c
│ ├── main.cpp
│ ├── main.h
│ ├── netlink
│ ├── Makefile.am
│ ├── link_info.cpp
│ ├── link_info.h
│ ├── neigh_info.cpp
│ ├── neigh_info.h
│ ├── netlink_compatibility.cpp
│ ├── netlink_compatibility.h
│ ├── netlink_wrapper.cpp
│ ├── netlink_wrapper.h
│ ├── route_info.cpp
│ ├── route_info.h
│ └── test_main.cpp
│ ├── proto
│ ├── L2_address.cpp
│ ├── L2_address.h
│ ├── arp.cpp
│ ├── arp.h
│ ├── dst_entry.cpp
│ ├── dst_entry.h
│ ├── dst_entry_tcp.cpp
│ ├── dst_entry_tcp.h
│ ├── dst_entry_udp.cpp
│ ├── dst_entry_udp.h
│ ├── dst_entry_udp_mc.cpp
│ ├── dst_entry_udp_mc.h
│ ├── flow_tuple.cpp
│ ├── flow_tuple.h
│ ├── header.cpp
│ ├── header.h
│ ├── igmp_handler.cpp
│ ├── igmp_handler.h
│ ├── igmp_mgr.cpp
│ ├── igmp_mgr.h
│ ├── ip_address.h
│ ├── ip_frag.cpp
│ ├── ip_frag.h
│ ├── mem_buf_desc.h
│ ├── neighbour.cpp
│ ├── neighbour.h
│ ├── neighbour_observer.h
│ ├── neighbour_table_mgr.cpp
│ ├── neighbour_table_mgr.h
│ ├── netlink_socket_mgr.h
│ ├── peer_key.h
│ ├── route_entry.cpp
│ ├── route_entry.h
│ ├── route_rule_table_key.h
│ ├── route_table_mgr.cpp
│ ├── route_table_mgr.h
│ ├── route_val.cpp
│ ├── route_val.h
│ ├── rule_entry.cpp
│ ├── rule_entry.h
│ ├── rule_table_mgr.cpp
│ ├── rule_table_mgr.h
│ ├── rule_val.cpp
│ ├── rule_val.h
│ ├── vma_lwip.cpp
│ └── vma_lwip.h
│ ├── sock
│ ├── cleanable_obj.h
│ ├── fd_collection.cpp
│ ├── fd_collection.h
│ ├── pipeinfo.cpp
│ ├── pipeinfo.h
│ ├── pkt_rcvr_sink.h
│ ├── pkt_sndr_source.h
│ ├── sock-redirect.cpp
│ ├── sock-redirect.h
│ ├── socket_fd_api.cpp
│ ├── socket_fd_api.h
│ ├── sockinfo.cpp
│ ├── sockinfo.h
│ ├── sockinfo_tcp.cpp
│ ├── sockinfo_tcp.h
│ ├── sockinfo_udp.cpp
│ └── sockinfo_udp.h
│ ├── util
│ ├── agent.cpp
│ ├── agent.h
│ ├── agent_def.h
│ ├── chunk_list.h
│ ├── config_parser.y
│ ├── config_scanner.l
│ ├── data_updater.cpp
│ ├── data_updater.h
│ ├── hash_map.h
│ ├── hash_map.inl
│ ├── if.h
│ ├── instrumentation.cpp
│ ├── instrumentation.h
│ ├── libvma.conf
│ ├── libvma.h
│ ├── list.h
│ ├── match.cpp
│ ├── sg_array.h
│ ├── sock_addr.h
│ ├── sys_vars.cpp
│ ├── sys_vars.h
│ ├── sysctl_reader.h
│ ├── to_str.h
│ ├── utils.cpp
│ ├── utils.h
│ ├── valgrind.h
│ ├── vma_list.h
│ ├── vma_stats.h
│ ├── vtypes.h
│ ├── wakeup.cpp
│ ├── wakeup.h
│ ├── wakeup_pipe.cpp
│ └── wakeup_pipe.h
│ └── vma_extra.h
├── tests
├── Makefile.am
├── README_How_to_update_sockperf_in_VMA.txt
├── TODO
├── api-support-check.py
├── async-echo-client
│ ├── async-echo-client.py
│ ├── echo-server.py
│ └── syncronized-echo-client.py
├── benchmarking_test
│ └── Accelerators_Benchmarking.sh
├── bindtodevice
│ └── client.py
├── connect-disconnect
│ └── client.py
├── extra_api_tests
│ ├── socketxtreme
│ │ └── server_tcp.c
│ └── tcp_zcopy_cb
│ │ ├── README
│ │ ├── client.c
│ │ ├── client.h
│ │ ├── main.c
│ │ ├── server.c
│ │ ├── server.h
│ │ ├── types.h
│ │ └── utils.c
├── functionality
│ ├── getsockname_test.c
│ └── iomux
│ │ ├── 1epoll_1socket_twice.c
│ │ ├── 2epoll_1socket.c
│ │ ├── client.py
│ │ ├── eclient.py
│ │ ├── eserver.py
│ │ ├── pclient.py
│ │ ├── pserver.py
│ │ └── server.py
├── gtest
│ ├── Makefile.am
│ ├── README
│ ├── common
│ │ ├── base.cc
│ │ ├── base.h
│ │ ├── cmn.h
│ │ ├── def.h
│ │ ├── log.h
│ │ ├── sys.cc
│ │ ├── sys.h
│ │ └── tap.h
│ ├── googletest
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── include
│ │ │ └── gtest
│ │ │ │ ├── gtest-death-test.h
│ │ │ │ ├── gtest-message.h
│ │ │ │ ├── gtest-param-test.h
│ │ │ │ ├── gtest-printers.h
│ │ │ │ ├── gtest-spi.h
│ │ │ │ ├── gtest-test-part.h
│ │ │ │ ├── gtest-typed-test.h
│ │ │ │ ├── gtest.h
│ │ │ │ ├── gtest_pred_impl.h
│ │ │ │ ├── gtest_prod.h
│ │ │ │ └── internal
│ │ │ │ ├── gtest-death-test-internal.h
│ │ │ │ ├── gtest-filepath.h
│ │ │ │ ├── gtest-internal.h
│ │ │ │ ├── gtest-linked_ptr.h
│ │ │ │ ├── gtest-param-util-generated.h
│ │ │ │ ├── gtest-param-util.h
│ │ │ │ ├── gtest-port.h
│ │ │ │ ├── gtest-string.h
│ │ │ │ ├── gtest-tuple.h
│ │ │ │ └── gtest-type-util.h
│ │ └── src
│ │ │ ├── gtest-all.cc
│ │ │ ├── gtest-death-test.cc
│ │ │ ├── gtest-filepath.cc
│ │ │ ├── gtest-internal-inl.h
│ │ │ ├── gtest-port.cc
│ │ │ ├── gtest-printers.cc
│ │ │ ├── gtest-test-part.cc
│ │ │ ├── gtest-typed-test.cc
│ │ │ ├── gtest.cc
│ │ │ └── gtest_main.cc
│ ├── main.cc
│ ├── mix
│ │ ├── mix_base.cc
│ │ ├── mix_base.h
│ │ ├── mix_list.cc
│ │ └── sg_array.cc
│ ├── sock
│ │ ├── sock_base.cc
│ │ ├── sock_base.h
│ │ └── sock_socket.cc
│ ├── tcp
│ │ ├── tcp_base.cc
│ │ ├── tcp_base.h
│ │ ├── tcp_bind.cc
│ │ ├── tcp_connect.cc
│ │ ├── tcp_connect_nb.cc
│ │ ├── tcp_event.cc
│ │ ├── tcp_send.cc
│ │ ├── tcp_send_zc.cc
│ │ ├── tcp_sendfile.cc
│ │ ├── tcp_sendto.cc
│ │ ├── tcp_socket.cc
│ │ ├── tcp_sockopt.cc
│ │ └── tcp_tls.cc
│ ├── udp
│ │ ├── udp_base.cc
│ │ ├── udp_base.h
│ │ ├── udp_bind.cc
│ │ ├── udp_connect.cc
│ │ ├── udp_send.cc
│ │ └── udp_sendto.cc
│ ├── vma
│ │ ├── vma_base.cc
│ │ ├── vma_base.h
│ │ ├── vma_ioctl.cc
│ │ ├── vma_poll.cc
│ │ ├── vma_recvfrom_zcopy.cc
│ │ ├── vma_ring.cc
│ │ └── vma_sockopt.cc
│ └── vmad
│ │ ├── vmad_base.cc
│ │ ├── vmad_base.h
│ │ ├── vmad_bitmap.cc
│ │ ├── vmad_flow.cc
│ │ ├── vmad_hash.cc
│ │ ├── vmad_init.cc
│ │ └── vmad_state.cc
├── latency_test
│ ├── Makefile.am
│ ├── tcp_lat.cpp
│ └── udp_lat.c
├── listen
│ ├── tcp_client.py
│ └── tcp_server.py
├── low_pps_tcp_send_test
│ ├── exchange.cpp
│ ├── readme.txt
│ └── trader.cpp
├── mc_loop_test
│ └── mc_loop_test.c
├── multithread_test
│ ├── exchange.cpp
│ ├── readme.txt
│ └── trader.cpp
├── pps_test
│ ├── Makefile.am
│ └── pps_test.c
├── resource_release_checker
│ ├── server_socket_receive_and_recreate_loop.py
│ └── server_socket_recreate_loop.py
├── reuse_ud_test.c
├── select_t1.c
├── server_test
│ ├── Makefile.am
│ ├── client.cc
│ ├── client.h
│ ├── main.cc
│ ├── options.cc
│ ├── options.h
│ ├── server.cc
│ ├── server.h
│ ├── vtime.cc
│ └── vtime.h
├── simple_fork
│ └── fork.py
├── tcp_window_size_exerciser
│ ├── Makefile
│ ├── README
│ ├── tcp_wnd_test.h
│ ├── tcp_wnd_test_client.c
│ └── tcp_wnd_test_server.c
├── testbed
│ ├── README
│ └── testbed.c
├── throughput_test
│ ├── Makefile.am
│ └── bandwidth_test.c
├── timetest
│ ├── Makefile.am
│ └── timetest.cpp
└── vma_perf_envelope
│ ├── vma_multiplexers_test.sh
│ └── vma_perf_envelope.sh
└── tools
├── Makefile.am
└── daemon
├── Makefile.am
├── bitmap.h
├── daemon.c
├── daemon.h
├── flow.c
├── hash.c
├── hash.h
├── loop.c
├── message.c
├── nl.c
├── nl.h
├── notify.c
├── store.c
├── tc.c
└── tc.h
/.ci/Jenkinsfile:
--------------------------------------------------------------------------------
1 | #!/usr/bin/groovy
2 |
3 | // load pipeline functions
4 | // Requires pipeline-github-lib plugin to load library from github
5 | @Library('github.com/Mellanox/ci-demo@stable_media')
6 | def matrix = new com.mellanox.cicd.Matrix()
7 |
8 | matrix.main()
9 |
--------------------------------------------------------------------------------
/.ci/artifacts.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -xl
2 |
3 | if [ -d jenkins ]; then
4 | gzip -f ./jenkins/*.tar 2>/dev/null || true
5 | cd ./jenkins/ ;
6 | for f in *.tar.gz ; do [ -e "$f" ] && mv "$f" "${flags}/arch-${name}-$f" ; done ;
7 | cd ..
8 | cd ./jenkins/${flags};
9 | for f in *.tap ; do [ -e "$f" ] && mv "$f" "${flags}-${name}-$f" ; done ;
10 | for f in *.xml ; do [ -e "$f" ] && mv "$f" "${flags}-${name}-$f" ; done ;
11 | cd ../..
12 | fi
13 |
--------------------------------------------------------------------------------
/.ci/blackduck_source.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -Exel
2 |
3 | topdir=$(git rev-parse --show-toplevel)
4 | cd "$topdir"
5 |
6 | # Check if the variables and pipeline attributes are set
7 | [[ -z "${WORKSPACE}" ]] && { echo "Error: WORKSPACE variable is not set"; exit 1; }
8 | [[ -z "$BLACKDUCK_API_TOKEN" ]] && { echo "Error: BLACKDUCK_API_TOKEN variable is not set"; exit 1; }
9 | [[ ! -d "${WORKSPACE}/logs" ]] && mkdir -p "${WORKSPACE}/logs"
10 |
11 | # Create valid JSON for further authentication in BlackDuck server
12 | json=$(jq -n \
13 | --arg token "$BLACKDUCK_API_TOKEN" \
14 | '{"blackduck.url": "https://blackduck.mellanox.com/", "blackduck.api.token": $token }')
15 |
16 | export SPRING_APPLICATION_JSON="$json"
17 | export PROJECT_NAME=LibVMA
18 | export PROJECT_VERSION="$sha1"
19 | export PROJECT_SRC_PATH="$topdir"/src/
20 |
21 | echo "Running BlackDuck (SRC) on $name"
22 | echo "CONFIG:"
23 | echo " NAME: ${PROJECT_NAME}"
24 | echo " VERSION: ${PROJECT_VERSION}"
25 | echo " SRC_PATH: ${PROJECT_SRC_PATH}"
26 |
27 | # clone BlackDuck
28 | [[ -d /tmp/blackduck ]] && rm -rf /tmp/blackduck
29 | [[ -d ~/.ssh/ ]] || mkdir -p ~/.ssh/
30 | chmod 600 "${GERRIT_SSH_KEY}"
31 | ssh-keyscan -p 12023 -H git-nbu.nvidia.com >> ~/.ssh/known_hosts
32 | git clone -c core.sshCommand="ssh -i ${GERRIT_SSH_KEY} -l swx-jenkins2-svc" -b master --single-branch --depth=1 ssh://git-nbu.nvidia.com:12023/DevOps/Tools/blackduck /tmp/blackduck
33 | cd /tmp/blackduck
34 |
35 | # disable check errors
36 | set +e
37 | timeout 3600 ./run_bd_scan.sh
38 | exit_code=$?
39 | # enable back
40 | set -e
41 |
42 | # copy run log to a place that jenkins job will archive it
43 | REPORT_NAME="BlackDuck_source_${PROJECT_NAME}_${PROJECT_VERSION}"
44 | cat "log/${PROJECT_NAME}_${PROJECT_VERSION}"*.log > "${WORKSPACE}/logs/${REPORT_NAME}.log" || true
45 | cat "log/${PROJECT_NAME}_${PROJECT_VERSION}"*.log || true
46 |
47 | if [ "$exit_code" == "0" ]; then
48 | cp -v /tmp/blackduck/report/*.pdf "${WORKSPACE}/logs/${REPORT_NAME}.pdf"
49 | fi
50 |
51 | exit $exit_code
52 |
--------------------------------------------------------------------------------
/.ci/dockerfiles/Dockerfile.rhel8.6:
--------------------------------------------------------------------------------
1 | ARG HARBOR_URL=nbu-harbor.gtm.nvidia.com
2 | ARG ARCH=x86_64
3 | FROM $HARBOR_URL/hpcx/x86_64/rhel8.6/core:latest
4 | ARG WEBREPO_URL=webrepo.gtm.nvidia.com
5 |
6 | RUN sed -i "s/webrepo/${WEBREPO_URL}/" /etc/yum.repos.d/* && \
7 | sed -i 's/mirrorlist/#mirrorlist/;s!#baseurl=http://mirror.centos.org!baseurl=http://vault.centos.org!' /etc/yum.repos.d/* && \
8 | echo "[mlnx-opt]" > /etc/yum.repos.d/mlnx-opt.repo && \
9 | echo "name=RHEL 8.6 mirror" >> /etc/yum.repos.d/mlnx-opt.repo && \
10 | echo "baseurl=http://${WEBREPO_URL}/RH/optional/8.6/x86_64/" >> /etc/yum.repos.d/mlnx-opt.repo && \
11 | echo "enabled=1" >> /etc/yum.repos.d/mlnx-opt.repo && \
12 | echo "gpgcheck=0" >> /etc/yum.repos.d/mlnx-opt.repo && \
13 | yum makecache
14 |
15 | RUN yum install --allowerasing -y \
16 | java-11-openjdk jq git && \
17 | yum clean all && \
18 | rm -rf /var/cache/yum
19 |
--------------------------------------------------------------------------------
/.ci/dockerfiles/Dockerfile.rhel8.6.release:
--------------------------------------------------------------------------------
1 | ARG HARBOR_URL=nbu-harbor.gtm.nvidia.com
2 | FROM $HARBOR_URL/hpcx/x86_64/rhel8.6/core:latest
3 | ARG WEBREPO_URL=webrepo.gtm.nvidia.com
4 | ARG _UID=6213
5 | ARG _GID=101
6 | ARG _LOGIN=swx-jenkins
7 | ARG _HOME=/var/home/$_LOGIN
8 |
9 | RUN sed -i "s#http://webrepo#http://${WEBREPO_URL}#" /etc/yum.repos.d/* && \
10 | sed -i 's/mirrorlist/#mirrorlist/;s!#baseurl=http://mirror.centos.org!baseurl=http://vault.centos.org!' /etc/yum.repos.d/* && \
11 | echo "[mlnx-opt]" > /etc/yum.repos.d/mlnx-opt.repo && \
12 | echo "name=RHEL 8.6 mirror" >> /etc/yum.repos.d/mlnx-opt.repo && \
13 | echo "baseurl=http://${WEBREPO_URL}/RH/optional/8.6/x86_64/" >> /etc/yum.repos.d/mlnx-opt.repo && \
14 | echo "enabled=1" >> /etc/yum.repos.d/mlnx-opt.repo && \
15 | echo "gpgcheck=0" >> /etc/yum.repos.d/mlnx-opt.repo && \
16 | yum makecache
17 |
18 | RUN echo "${_LOGIN} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
19 | echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
20 | mkdir -p ${_HOME} && \
21 | groupadd -f -g "$_GID" "$_LOGIN" && \
22 | useradd -u "$_UID" -g "$_GID" -s /bin/bash -m -d ${_HOME} "${_LOGIN}" && \
23 | chown -R ${_LOGIN} ${_HOME}
24 |
25 | RUN yum install --allowerasing -y \
26 | git autoconf automake libtool gcc \
27 | sudo gcc-c++ libibverbs-devel rdma-core \
28 | librdmacm unzip patch wget make \
29 | libnl3-devel rpm-build
30 |
--------------------------------------------------------------------------------
/.ci/dockerfiles/Dockerfile.rhel9.4:
--------------------------------------------------------------------------------
1 | ARG HARBOR_URL=nbu-harbor.gtm.nvidia.com
2 | ARG ARCH=x86_64
3 | FROM $HARBOR_URL/swx-infra/media/$ARCH/base/rhel:9.4
4 | ARG WEBREPO_URL=webrepo.gtm.nvidia.com
5 | ARG ARCH
6 | ARG _UID=6213
7 | ARG _GID=101
8 | ARG _LOGIN=swx-jenkins
9 | ARG _HOME=/var/home/$_LOGIN
10 |
11 | RUN sed -i "s#http://webrepo#http://${WEBREPO_URL}#" /etc/yum.repos.d/* && \
12 | sed -i 's/mirrorlist/#mirrorlist/;s!#baseurl=http://mirror.centos.org!baseurl=http://vault.centos.org!' /etc/yum.repos.d/* && \
13 | echo "[mlnx-9.4-BaseOS]" > /etc/yum.repos.d/mlnx-9.4-BaseOS.repo && \
14 | echo "name=RHEL 9.4 mirror BaseOS" >> /etc/yum.repos.d/mlnx-9.4-BaseOS.repo && \
15 | echo "baseurl=http://${WEBREPO_URL}/RH/9.4/$ARCH/BaseOS/" >> /etc/yum.repos.d/mlnx-9.4-BaseOS.repo && \
16 | echo "enabled=1" >> /etc/yum.repos.d/mlnx-9.4-BaseOS.repo && \
17 | echo "gpgcheck=0" >> /etc/yum.repos.d/mlnx-9.4-BaseOS.repo && \
18 | echo "[mlnx-9.4-AppStream]" > /etc/yum.repos.d/mlnx-9.4-AppStream.repo && \
19 | echo "name=RHEL 9.4 mirror AppStream" >> /etc/yum.repos.d/mlnx-9.4-AppStream.repo && \
20 | echo "baseurl=http://${WEBREPO_URL}/RH/9.4/$ARCH/AppStream/" >> /etc/yum.repos.d/mlnx-9.4-AppStream.repo && \
21 | echo "enabled=1" >> /etc/yum.repos.d/mlnx-9.4-AppStream.repo && \
22 | echo "gpgcheck=0" >> /etc/yum.repos.d/mlnx-9.4-AppStream.repo && \
23 | yum makecache
24 |
25 | RUN echo "${_LOGIN} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
26 | echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
27 | mkdir -p ${_HOME} && \
28 | groupadd -f -g "$_GID" "$_LOGIN" && \
29 | useradd -u "$_UID" -g "$_GID" -s /bin/bash -m -d ${_HOME} "${_LOGIN}" && \
30 | chown -R ${_LOGIN} ${_HOME}
31 |
32 | RUN dnf install --allowerasing -y \
33 | git autoconf automake libtool gcc \
34 | sudo gcc-c++ libibverbs-devel rdma-core \
35 | librdmacm unzip patch wget make \
36 | libnl3-devel rpm-build && \
37 | dnf clean all && rm -rf /var/cache/dnf/*
38 |
--------------------------------------------------------------------------------
/.ci/pipeline/release_matrix_job.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | job: LibVMA-release
3 | registry_host: nbu-harbor.gtm.nvidia.com
4 | registry_auth: swx-infra_harbor_credentials
5 | registry_path: /swx-infra/media/libvma
6 |
7 | kubernetes:
8 | privileged: true
9 | cloud: il-ipp-blossom-prod
10 | nodeSelector: 'beta.kubernetes.io/os=linux'
11 | namespace: swx-media
12 | limits: '{memory: 8Gi, cpu: 7000m}'
13 | requests: '{memory: 8Gi, cpu: 7000m}'
14 |
15 | env:
16 | MAIL_FROM: jenkins@nvidia.com
17 |
18 | volumes:
19 | # Default release location
20 | - {mountPath: /auto/mswg/release/vma, hostPath: /auto/mswg/release/vma}
21 | # User profile for release
22 | - {mountPath: /var/home/swx-jenkins, hostPath: /labhome/swx-jenkins}
23 |
24 | empty_volumes:
25 | - {mountPath: /tmp/source_rpms, memory: true}
26 |
27 | runs_on_dockers:
28 | - {
29 | file: '.ci/dockerfiles/Dockerfile.rhel8.6.release',
30 | name: 'rhel8.6',
31 | uri: '$arch/$name/release',
32 | build_args: '--no-cache',
33 | arch: 'x86_64',
34 | tag: '20250128'
35 | }
36 |
37 | steps:
38 | - name: Release
39 | parallel: false
40 | run: |
41 | .ci/do_release.sh
42 | archiveArtifacts: pkg/build_pkg.log,pkg/packages/*.rpm
43 |
44 | pipeline_start:
45 | shell: action
46 | module: groovy
47 | run: |
48 | echo "Starting release process for LibVMA-${release_tag}"
49 | currentBuild.displayName += "-${release_tag}"
50 |
51 | pipeline_stop:
52 | shell: action
53 | module: groovy
54 | run: |
55 | if (!params.notification_email.isEmpty()) {
56 | mail from: "${MAIL_FROM}",
57 | mimeType: 'text/html',
58 | to: "${notification_email}",
59 | subject: "Release build ended for LibVMA - ${release_tag}",
60 | body: """
61 |
Tag: ${release_tag}
62 | Build url: link
63 | Status: ${currentBuild.currentResult}
"""
64 | }
65 |
--------------------------------------------------------------------------------
/.ci/redmine_matrix_job.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | job: LibVMA-redmine-issue
3 |
4 | registry_host: harbor.mellanox.com
5 | registry_auth: swx-storage
6 |
7 | kubernetes:
8 | privileged: true
9 | cloud: il-ipp-blossom-prod
10 | namespace: swx-media
11 | nodeSelector: 'beta.kubernetes.io/os=linux'
12 | limits: '{memory: 1Gi, cpu: 1000m}'
13 | requests: '{memory: 1Gi, cpu: 1000m}'
14 |
15 | failFast: false
16 | timeout_minutes: 20
17 | env:
18 | MAIL_FROM: jenkins@nvidia.com
19 |
20 | volumes:
21 | - {mountPath: /hpc/local/inst/hpc-internal-tools, hostPath: /hpc/local/inst/hpc-internal-tools}
22 |
23 | runs_on_dockers:
24 | - {name: 'ub22.04-base', url: 'harbor.mellanox.com/hpcx/x86_64/ubuntu22.04/base', arch: 'x86_64'}
25 |
26 | steps:
27 | - name: Redmine
28 | containerSelector:
29 | - "{name: 'ub22.04-base'}"
30 | run: |
31 | #!/bin/bash -eExl
32 | env
33 | python3 -m pip install six
34 | python3 /hpc/local/inst/hpc-internal-tools/tools/git_tools/git_redmine/update_redmine_from_git_commit_python3.py --update --project_id=9 --on_email_mismatch=warn \
35 | --on_issue_not_in_project=fail --pr_url=${ghprbPullLink} --commit_id=${ghprbActualCommit}
36 | parallel: false
37 |
38 | pipeline_start:
39 | run: |
40 | printenv
41 | echo "Start"
42 |
43 | pipeline_stop:
44 | shell: action
45 | module: groovy
46 | run: |
47 | mail from: "${MAIL_FROM}",
48 | mimeType: 'text/html',
49 | to: "${MAIL_TO}",
50 | subject: 'Redmine check for build ${currentBuild.number}',
51 | body: """
52 | Build url: link
"""
53 | sh 'echo "Finish"'
54 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Subject
2 |
3 | ## Issue type
4 | - [ ] Bug report
5 | - [ ] Feature request
6 |
7 | ## Configuration:
8 | * Product version
9 | * OS
10 | * OFED
11 | * Hardware
12 |
13 | ## Actual behavior:
14 |
15 | ## Expected behavior:
16 |
17 | ## Steps to reproduce:
18 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Description
2 | Please provide a summary of the change.
3 |
4 | ##### What
5 | _Subject: what this PR is doing in one line._
6 |
7 | ##### Why ?
8 | _Justification for the PR. If there is existing issue/bug please reference._
9 |
10 | ##### How ?
11 | _It is optional but for complex PRs please provide information about the design,
12 | architecture, approach, etc._
13 |
14 | ## Change type
15 | What kind of change does this PR introduce?
16 | - [ ] Bugfix
17 | - [ ] Feature
18 | - [ ] Code style update
19 | - [ ] Refactoring (no functional changes, no api changes)
20 | - [ ] Build related changes
21 | - [ ] CI related changes
22 | - [ ] Documentation content changes
23 | - [ ] Tests
24 | - [ ] Other
25 |
26 | ## Check list
27 | - [ ] Code follows the style de facto guidelines of this project
28 | - [ ] Comments have been inserted in hard to understand places
29 | - [ ] Documentation has been updated (if necessary)
30 | - [ ] Test has been added (if possible)
31 |
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Object files
2 | *.o
3 | *.lo
4 | *.la
5 |
6 | # Libraries
7 | .libs
8 | *.lib
9 | *.a
10 |
11 | # Shared objects
12 | *.so
13 | *.so.*
14 |
15 | # Dependencies
16 | .dirstamp
17 | .deps
18 |
19 | # Automake
20 | Makefile.in
21 | Makefile
22 | aclocal.m4
23 | autom4te.cache/
24 | config.h
25 | config.h.in
26 | config.h.in~
27 | config.log
28 | config.status
29 | config/aux/config.guess
30 | config/aux/config.sub
31 | config/aux/install-sh
32 | config/aux/missing
33 | config/aux/decomp
34 | config/aux/ltmain.sh
35 | config/aux/compile
36 | config/aux/depcomp
37 | config/m4/libtool.m4
38 | config/m4/ltoptions.m4
39 | config/m4/ltsugar.m4
40 | config/m4/ltversion.m4
41 | config/m4/lt~obsolete.m4
42 | configure
43 | libtool
44 |
45 | # Tool
46 | cov-int/
47 | jenkins/
48 |
49 | # IDE files
50 | .cproject
51 | .project
52 | tags
53 | .vs/
54 | obj/
55 | *.sln
56 | *.vcxproj
57 | *.vcxproj.filters
58 | *.vcxproj.user
59 | VTune Profiler Results/
60 |
61 | # VMA specific
62 | src/utils/timetest
63 | src/stats/vma_stats
64 | src/vlogger/vlogger_test
65 | src/state_machine/state_machine_test
66 | stamp-h1
67 |
68 | # build products
69 | VMA_VERSION
70 | build/libvma.spec
71 | debian/changelog
72 | contrib/scripts/vma.init
73 | contrib/scripts/vma.service
74 | tools/daemon/vmad
75 |
--------------------------------------------------------------------------------
/.gittemplate:
--------------------------------------------------------------------------------
1 | issue:
2 |
3 | log:
4 |
5 | reviewed by:
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2 | SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
3 |
4 | This software is available to you under a choice of one of two
5 | licenses. You may choose to be licensed under the terms of the GNU
6 | General Public License (GPL) Version 2, available from the file
7 | COPYING in the main directory of this source tree, or the
8 | BSD – 2- Clause license below:
9 |
10 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
11 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
12 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 |
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS := src tools docs/man
2 |
3 |
4 | DIST_SUBDIRS := src tests tools docs/man
5 |
6 | noinst_SCRIPTS = \
7 | $(wildcard contrib/scripts/*)
8 |
9 | EXTRA_DIST = \
10 | contrib \
11 | debian \
12 | LICENSE \
13 | CHANGES \
14 | README
15 |
16 |
17 | .PHONY: tests
18 |
19 | mydocdir = $(if $(docdir),$(docdir),${datadir}/doc/$(distdir))
20 | mydoc_DATA = README CHANGES
21 |
22 | install-exec-hook:
23 | if command -v systemctl >/dev/null 2>&1; then \
24 | mkdir -p $(DESTDIR)$(prefix)/lib/systemd/system/; \
25 | cp $(top_builddir)/contrib/scripts/vma.service $(DESTDIR)$(prefix)/lib/systemd/system/vma.service; \
26 | chmod 644 $(DESTDIR)$(prefix)/lib/systemd/system/vma.service; \
27 | fi
28 |
29 | uninstall-hook:
30 | if command -v systemctl >/dev/null 2>&1; then \
31 | rm -rf $(DESTDIR)$(prefix)/lib/systemd/system/vma.service; \
32 | fi
33 |
34 | install-all: install
35 |
36 | uninstall-all: uninstall
37 |
38 | tests:
39 | $(MAKE)
40 | $(MAKE) -C tests/gtest
41 | $(MAKE) -C tests/latency_test
42 | $(MAKE) -C tests/throughput_test
43 | $(MAKE) -C tests/pps_test
44 |
45 | demo:
46 | $(MAKE)
47 | $(MAKE) -C src/vma/infra
48 |
49 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://badge.fury.io/gh/mellanox%2Flibvma)
2 | [](https://scan.coverity.com/projects/libvma)
3 |
4 | ### Introduction
5 | NVIDIA Messaging Accelerator (VMA) boosts performance for message-based and streaming applications such as those found in financial services market data environments and Web2.0 clusters. It allows application written over standard socket API
6 | to run over Ethernet and/or Infiniband from user-space with full network stack bypass.
7 |
8 | The [VMA architecture](https://github.com/Mellanox/libvma/wiki/Architecture) page includes additional information.
9 |
10 | ### Download
11 | Get all download and installation information [here](https://github.com/Mellanox/libvma/wiki/Downloads).
12 | or some quick instruction in order to [build VMA from source](https://github.com/Mellanox/libvma/wiki/Build-Instruction).
13 |
14 | ### Technical Support
15 | Have a question? please open a [github issue](https://github.com/Mellanox/libvma/issues) or contact support@mellanox.com.
16 |
17 | ### Additional Information
18 | * Refer to the libvma [README](https://github.com/Mellanox/libvma/blob/master/README)
19 | * Messaging Accelerator [VMA](https://www.mellanox.com/products/software/accelerator-software/vma?mtag=vma) page
20 | * Check out the rest of the Wiki pages in this project
21 |
--------------------------------------------------------------------------------
/autogen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 | rm -rf autom4te.cache
5 | mkdir -p config
6 | autoreconf -v --install || exit 1
7 | rm -rf autom4te.cache
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/config/m4/func.m4:
--------------------------------------------------------------------------------
1 | #
2 | # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3 | # Copyright (c) 2001-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4 | # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
5 | #
6 | # func.m4 - Collection of functions
7 |
8 | ##########################
9 | # Configure functions
10 | #
11 | # Some helper script functions
12 | #
13 | AC_DEFUN([FUNC_CONFIGURE_INIT],
14 | [
15 | show_section_title()
16 | {
17 | cat < /dev/null`" = "x"],
50 | [AC_MSG_RESULT([not found])
51 | AC_MSG_WARN([Expected file $2/$3 not found])
52 | AC_MSG_ERROR([Cannot continue])],
53 | [AC_MSG_RESULT([($2)])]
54 | )
55 | ]
56 | )
57 | ]
58 | )
59 | ])
60 |
--------------------------------------------------------------------------------
/config/m4/opt.m4:
--------------------------------------------------------------------------------
1 | #
2 | # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3 | # Copyright (c) 2001-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4 | # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
5 | #
6 | # opt.m4 - Macros to control optimization
7 |
8 | ##########################
9 | # Logging control
10 | #
11 | # VMA defined log levels
12 | #
13 | AC_DEFUN([OPT_VMA_LOGGING],
14 | [
15 | AC_DEFINE(DEFINED_VLOG_INIT, -2, VMA Log Init Definition)
16 | AC_DEFINE(DEFINED_VLOG_NONE, -1, VMA Log None Definition)
17 | AC_DEFINE(DEFINED_VLOG_PANIC, 0, VMA Log Panic Definition)
18 | AC_DEFINE(DEFINED_VLOG_ERROR, 1, VMA Log Error Definition)
19 | AC_DEFINE(DEFINED_VLOG_WARNING, 2, VMA Log Warning Definition)
20 | AC_DEFINE(DEFINED_VLOG_INFO, 3, VMA Log Info Definition)
21 | AC_DEFINE(DEFINED_VLOG_DETAILS, 4, VMA Log Details Definition)
22 | AC_DEFINE(DEFINED_VLOG_DEBUG, 5, VMA Log Debug Definition)
23 | AC_DEFINE(DEFINED_VLOG_FINE, 6, VMA Log Fine Definition)
24 | AC_DEFINE(DEFINED_VLOG_FINER, 7, VMA Log Finer Definition)
25 | AC_DEFINE(DEFINED_VLOG_ALL, 8, VMA Log All Definition)
26 |
27 | AC_ARG_ENABLE([opt-log],
28 | AS_HELP_STRING([--enable-opt-log],
29 | [Optimize latency (none, medium, high) by limiting max log level (default=medium)]),,
30 | enableval=medium)
31 | AC_MSG_CHECKING([for logging optimization])
32 | enable_opt_log=DEFINED_VLOG_ALL
33 | case "$enableval" in
34 | no | none)
35 | ;;
36 | yes | medium)
37 | enable_opt_log=DEFINED_VLOG_DEBUG
38 | ;;
39 | high)
40 | enable_opt_log=DEFINED_VLOG_DETAILS
41 | ;;
42 | *)
43 | AC_MSG_ERROR([Unrecognized --enable-opt-log parameter as $enableval])
44 | ;;
45 | esac
46 | AC_DEFINE_UNQUOTED([VMA_MAX_DEFINED_LOG_LEVEL], [$enable_opt_log], [Log optimization level])
47 | AC_MSG_RESULT([$enableval])
48 | ])
49 |
--------------------------------------------------------------------------------
/contrib/jenkins_tests/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -eExl
2 |
3 | source $(dirname $0)/globals.sh
4 |
5 | echo "Checking for building with gcc ..."
6 |
7 | cd $WORKSPACE
8 |
9 | rm -rf ${build_dir}
10 | mkdir -p ${build_dir}
11 | cd ${build_dir}
12 |
13 | # Set symbolic links to default build and install
14 | ln -s "${build_dir}/0/install" "${install_dir}"
15 |
16 | build_list="\
17 | default: \
18 | debug:--enable-opt-log=no --enable-debug"
19 |
20 |
21 | build_tap=${WORKSPACE}/${prefix}/build.tap
22 | echo "1..$(echo $build_list | tr " " "\n" | wc -l)" > $build_tap
23 |
24 | test_id=0
25 | for build in $build_list; do
26 | IFS=':' read build_name build_option <<< "$build"
27 | mkdir -p ${build_dir}/${test_id}
28 | cd ${build_dir}/${test_id}
29 | test_exec='${WORKSPACE}/configure --prefix=${build_dir}/${test_id}/install $build_option $jenkins_test_custom_configure && make $make_opt install'
30 | do_check_result "$test_exec" "$test_id" "$build_name" "$build_tap" "${build_dir}/build-${test_id}"
31 | cd ${build_dir}
32 | test_id=$((test_id+1))
33 | done
34 |
35 |
36 | echo "[${0##*/}]..................exit code = $rc"
37 | exit $rc
38 |
--------------------------------------------------------------------------------
/contrib/jenkins_tests/commit.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -xeEl
2 |
3 | source $(dirname $0)/globals.sh
4 |
5 | echo "Checking for commit message ..."
6 |
7 | cd $WORKSPACE
8 |
9 | rm -rf $commit_dir
10 | mkdir -p $commit_dir
11 | cd $commit_dir
12 |
13 | commit_tap=${WORKSPACE}/${prefix}/commit_test.tap
14 | rm -rf $commit_tap
15 | out_log=${commit_dir}/output.log
16 |
17 | function current_head()
18 | {
19 | echo ${ghprbActualCommit:=HEAD}
20 | }
21 |
22 | function current_ancestor()
23 | {
24 | git merge-base origin/master HEAD
25 | }
26 |
27 | function current_commits()
28 | {
29 | git log --pretty=%H $(current_ancestor)..$(current_head)
30 | }
31 |
32 | function check_commit()
33 | {
34 | echo "1..$(echo $(current_commits) | tr " " "\n" | wc -l)" > $commit_tap
35 | nerrors=0
36 | test_id=1
37 |
38 | for sha in $(current_commits); do
39 | ret=0
40 | test_name=$(echo ${sha:0:7})
41 |
42 | echo "#${test_id} commit: ${test_name}" >>${out_log} 2>&1
43 |
44 | commit_subject=$(git log --format=%B -n 1 "${sha}" | head -n2)
45 | commit_body=$(git log --format=%B -n 1 "${sha}" | awk '{if(NR>2)print}')
46 |
47 | if [ 0 -eq "${#commit_subject}" -o "${#commit_subject}" -gt 72 ]; then
48 | echo "Commit message subject should be less than 72 characters" >>${out_log} 2>&1
49 | ret=$((ret+1))
50 | fi
51 |
52 | if [[ "${commit_subject}" == *. ]]; then
53 | echo "Commit message subject should not have period at the end" >>${out_log} 2>&1
54 | ret=$((ret+1))
55 | fi
56 |
57 | if [ -z "$(echo ${commit_body} | grep 'Signed-off-by')" ]; then
58 | echo "Commit message body should have 'Signed-off-by'" >>${out_log} 2>&1
59 | ret=$((ret+1))
60 | fi
61 |
62 | if [ $ret -eq 0 ]; then
63 | echo -e "ok ${test_name}" >> $commit_tap
64 | else
65 | echo -e "not ok ${test_name}: error ${ret} see ${out_log}" >> $commit_tap
66 | nerrors=$(($ret+$nerrors))
67 | ret=0
68 | fi
69 |
70 | test_id=$((test_id+1))
71 | done
72 | }
73 |
74 | check_commit
75 |
76 | do_archive "${out_log}"
77 | rc=$(($rc+$nerrors))
78 |
79 | echo "[${0##*/}]..................exit code = $rc"
80 | exit $rc
81 |
--------------------------------------------------------------------------------
/contrib/jenkins_tests/compiler.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -eExl
2 |
3 | source $(dirname $0)/globals.sh
4 |
5 | echo "Checking for compiler ..."
6 |
7 | cd $WORKSPACE
8 |
9 | rm -rf $compiler_dir
10 | mkdir -p $compiler_dir
11 | cd $compiler_dir
12 |
13 | compiler_list="clang:clang++:dev/clang-9.0.1 icc:icpc:intel/ics-18.0.4 icc:icpc:intel/ics-19.1.1 gcc:g++:dev/gcc-8.3.0 gcc:g++:dev/gcc-9.3.0 gcc:g++:dev/gcc-10.1.0"
14 |
15 | compiler_tap=${WORKSPACE}/${prefix}/compiler.tap
16 | echo "1..$(echo $compiler_list | tr " " "\n" | wc -l)" > $compiler_tap
17 |
18 | test_id=0
19 | for compiler in $compiler_list; do
20 | IFS=':' read cc cxx module <<< "$compiler"
21 | mkdir -p ${compiler_dir}/${test_id}
22 | cd ${compiler_dir}/${test_id}
23 | [ -z "$module" ] && test_name=$($cc --version | head -n 1) || test_name="$module"
24 | [ ! -z "$module" ] && do_module "$module"
25 | echo "======================================================"
26 | $cc --version
27 | echo
28 | test_exec='${WORKSPACE}/configure --prefix=$compiler_dir-$cc CC=$cc CXX=$cxx $jenkins_test_custom_configure && make $make_opt all'
29 | do_check_result "$test_exec" "$test_id" "$test_name" "$compiler_tap" "${compiler_dir}/compiler-${test_id}"
30 | [ ! -z "$module" ] && module unload "$module"
31 | cd ${compiler_dir}
32 | test_id=$((test_id+1))
33 | done
34 |
35 | echo "[${0##*/}]..................exit code = $rc"
36 | exit $rc
37 |
--------------------------------------------------------------------------------
/contrib/jenkins_tests/copyright-check-map.yaml:
--------------------------------------------------------------------------------
1 | general:
2 | exclude:
3 | - "\\.git.*"
4 | - "\\.ci.*"
5 | - "\\.dockers.*"
6 | - "build.*"
7 | - "contrib/jenkins_tests.*"
8 | - "contrib/valgrind.*"
9 | - "contrib/xlio-bench.*"
10 | - "contrib/.*\\.sh"
11 | - "debian.*"
12 | - ".*\\.pdf"
13 | - ".*Makefile\\.am"
14 | - ".*CHANGES"
15 | - ".*LICENSE"
16 | - ".*NOTICE"
17 | - ".*README"
18 | - ".*COPYING"
19 | - ".*TODO"
20 | - ".*license"
21 | - ".*\\.md"
22 | - ".*configure\\.ac"
23 | - ".*Jenkinsfile"
24 | - ".*\\.docx"
25 | - ".*\\.txt"
26 | - ".*\\.log"
27 | - ".*\\.cmake"
28 | - ".*\\.png"
29 | - ".*\\.conf"
30 | - ".*autogen\\.sh"
31 | #
32 | # Auto generated files
33 | #
34 | - ".*src/vma/config_parser.*"
35 | - ".*src/vma/config_scanner\\.c"
36 |
37 | dual_gpl_2_bsd_2_no_license:
38 | validate-spdx-license: True
39 | include:
40 | - ".*"
41 | exclude:
42 | - ".*src/vma/lwip/.*"
43 | - ".*tests/gtest/common/tap\\.h"
44 | - ".*tests/gtest/googletest/.*"
45 | - ".*src/vma/util/list\\.h"
46 | - ".*contrib/scripts/libvma\\.spec\\.in"
47 | - ".*contrib/scripts/vma\\.service\\.in"
48 | - ".*docs/man/.*\\.in"
49 |
--------------------------------------------------------------------------------
/contrib/jenkins_tests/copyrights.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -xvEe -o pipefail
4 |
5 | source $(dirname $0)/globals.sh
6 |
7 | if [ -z "$WORKSPACE" ]; then
8 | echo "ERROR: WORKSPACE variable is empty"
9 | exit 1
10 | fi
11 |
12 | if [ ! -d "$WORKSPACE" ]; then
13 | echo "ERROR: $WORKSPACE does not exist"
14 | exit 1
15 | fi
16 |
17 | if [[ -z $GITHUB_TOKEN ]]; then
18 | echo "ERROR: GITHUB_TOKEN variable is empty"
19 | exit 1
20 | fi
21 |
22 | cpp_files=' "extensions": [".c", ".cc", ".cpp", "c++", ".h", ".hpp", ".cs", ".inl", ".l", ".y"],'
23 | sed -i "s/.*\"extensions\": \[\"\.c\".*/$cpp_files/g" /opt/nvidia/ProjectConfig/header-types.json
24 |
25 | cat /opt/nvidia/ProjectConfig/header-types.json
26 |
27 | /opt/nvidia/header_check.py \
28 | --config ${WORKSPACE}/contrib/jenkins_tests/copyright-check-map.yaml \
29 | --path ${WORKSPACE} \
30 | --git-repo ${WORKSPACE} | tee copyrights.log
31 | exit_code=$?
32 | echo "exit_code=${exit_code}"
33 | # Correct error code is not returned by the script
34 | set +eE
35 | grep -rn ERROR copyrights.log
36 | exit_code=$?
37 | set -eE
38 | if [ ${exit_code} -eq 0 ]; then
39 | echo "Please refer to https://confluence.nvidia.com/pages/viewpage.action?pageId=788418816"
40 | /opt/nvidia/header_check.py \
41 | --config contrib/jenkins_tests/copyright-check-map.yaml \
42 | --path ${WORKSPACE} \
43 | --repair \
44 | --git-repo ${WORKSPACE} | tee copyrights_repair.log
45 | # create list of modified files
46 | files=$(git status | grep 'modified:' | awk '{print $NF}' )
47 | mkdir $WORKSPACE/repaired_files/
48 | cp --parents $files $WORKSPACE/repaired_files/
49 | cd $WORKSPACE/repaired_files/
50 | tar -czf $WORKSPACE/copyright_repaired_files.tar.gz .
51 | exit 1
52 | fi
53 |
--------------------------------------------------------------------------------
/contrib/jenkins_tests/tool.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -eExl
2 |
3 | source $(dirname $0)/globals.sh
4 |
5 | echo "Checking for tool ..."
6 |
7 | # Check dependencies
8 | if [ $(test -d ${install_dir} >/dev/null 2>&1 || echo $?) ]; then
9 | echo "[SKIP] Not found ${install_dir} : build should be done before this stage"
10 | exit 1
11 | fi
12 |
13 | cd $WORKSPACE
14 |
15 | rm -rf $tool_dir
16 | mkdir -p $tool_dir
17 | cd $tool_dir
18 |
19 | tool_list="daemon"
20 |
21 | tool_tap=${WORKSPACE}/${prefix}/tool.tap
22 | echo "1..$(echo $tool_list | tr " " "\n" | wc -l)" > $tool_tap
23 |
24 | function check_daemon()
25 | {
26 | local ret=0
27 | local out_log=$1
28 | local service="vma"
29 |
30 | rm -rf ${out_log}
31 | eval "${sudo_cmd} pkill -9 ${prj_service} 2>/dev/null || true"
32 |
33 | if systemctl >/dev/null 2>&1; then
34 | service=${install_dir}/sbin/${prj_service}
35 | service_arg=${install_dir}/lib/systemd/system/vma.service
36 |
37 | echo "System has been booted with SystemD" >> ${out_log}
38 | echo "daemon check output: ${service}" >> ${out_log}
39 |
40 | if [ $(sudo systemd-analyze verify ${service_arg} >>${out_log} 2>&1 || echo $?) ]; then
41 | ret=1
42 | fi
43 | sleep 3
44 | if [ $(sudo ${service} >>${out_log} 2>&1 || echo $?) ]; then
45 | ret=1
46 | fi
47 | sleep 3
48 | if [ "0" == "$ret" -a "" == "$(pgrep ${prj_service})" ]; then
49 | ret=1
50 | fi
51 | sudo pkill -9 ${prj_service} >>${out_log} 2>&1
52 | sleep 3
53 | if [ "0" == "$ret" -a "" != "$(pgrep ${prj_service})" ]; then
54 | ret=1
55 | fi
56 | fi
57 |
58 | eval "${sudo_cmd} pkill -9 ${prj_service} 2>/dev/null || true"
59 |
60 | echo "$ret"
61 | }
62 |
63 | test_id=0
64 | for tool in $tool_list; do
65 | mkdir -p ${tool_dir}/${tool}
66 | cd ${tool_dir}/${tool}
67 | test_id=$((test_id+1))
68 | test_exec="[ 0 = $(check_daemon "${tool_dir}/${tool}/output.log") ]"
69 | do_check_result "$test_exec" "$test_id" "$tool" "$tool_tap" "${tool_dir}/tool-${test_id}"
70 | do_archive "${tool_dir}/${tool}/output.log"
71 | cd ${tool_dir}
72 | done
73 |
74 | echo "[${0##*/}]..................exit code = $rc"
75 | exit $rc
76 |
--------------------------------------------------------------------------------
/contrib/scripts/vma.service.in:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=VMA Daemon
3 | After=network.target
4 |
5 | [Service]
6 | Type=forking
7 | Restart=on-failure
8 | ExecStart=@prefix@/sbin/vmad
9 | RestartForceExitStatus=1 SIGTERM
10 |
11 | [Install]
12 | WantedBy=multi-user.target
13 |
--------------------------------------------------------------------------------
/debian/changelog.in:
--------------------------------------------------------------------------------
1 | libvma (@VERSION@-@PRJ_LIBRARY_RELEASE@) release; urgency=low
2 |
3 | * Please refer to CHANGES for full changelog.
4 |
5 | -- NVIDIA CORPORATION @BUILD_DATE_CHANGELOG@
6 |
--------------------------------------------------------------------------------
/debian/compat:
--------------------------------------------------------------------------------
1 | 7
2 |
--------------------------------------------------------------------------------
/debian/libvma-dev.install:
--------------------------------------------------------------------------------
1 | usr/include/mellanox/vma_extra.h
2 | libvma-debug.so usr/lib
3 |
--------------------------------------------------------------------------------
/debian/libvma-utils.install:
--------------------------------------------------------------------------------
1 | usr/bin/vma_stats
2 | usr/share/man/man8/vma_stats.*
3 |
--------------------------------------------------------------------------------
/debian/libvma.install:
--------------------------------------------------------------------------------
1 | usr/lib/libvma*.so.*
2 | usr/lib/libvma.so
3 | usr/share/doc/libvma/README
4 | usr/share/doc/libvma/CHANGES
5 | usr/sbin/
6 | etc/libvma.conf
7 | etc/
8 | contrib/scripts/vma.service lib/systemd/system
9 | usr/share/man/man7/vma.*
10 | usr/share/man/man8/vmad.*
11 |
--------------------------------------------------------------------------------
/debian/postinst:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | /sbin/ldconfig
4 |
5 | if command -v systemctl >/dev/null 2>&1; then
6 | systemctl --no-reload enable vma.service >/dev/null 2>&1 || true
7 | fi
8 |
--------------------------------------------------------------------------------
/debian/postrm:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | /sbin/ldconfig
3 | if command -v systemctl >/dev/null 2>&1; then
4 | systemctl --system daemon-reload >/dev/null 2>&1 || true
5 | fi
6 |
--------------------------------------------------------------------------------
/debian/prerm:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if command -v systemctl >/dev/null 2>&1; then
4 | systemctl --no-reload disable vma.service >/dev/null 2>&1 || true
5 | systemctl stop vma.service || true
6 | fi
7 |
--------------------------------------------------------------------------------
/debian/rules:
--------------------------------------------------------------------------------
1 | #!/usr/bin/make -f
2 | # -*- mode: makefile; coding: utf-8 -*-
3 |
4 | #export DH_VERBOSE=1
5 |
6 | %:
7 | dh $@
8 |
9 | build: build-debug
10 | @echo "Using extra configuration options: ${configure_options}"
11 | ./configure --with-ofed=/usr --prefix=/usr \
12 | --libdir=/usr/lib --includedir=/usr/include --sysconfdir=/etc \
13 | ${configure_options}
14 |
15 | build-debug:
16 | ./configure --with-ofed=/usr --prefix=/usr \
17 | --libdir=/usr/lib --includedir=/usr/include --sysconfdir=/etc \
18 | --enable-opt-log=none --enable-debug ${configure_options}
19 | make
20 | cp -f src/vma/.libs/libvma.so libvma-debug.so
21 | make clean
22 |
23 |
24 | # Commands not to run
25 | override_dh_auto_configure:
26 |
27 | # Workaround for missing dependency information in libmongoclient package
28 | override_dh_shlibdeps:
29 | dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
30 |
--------------------------------------------------------------------------------
/debian/watch:
--------------------------------------------------------------------------------
1 | # Compulsory line, this is a version 4 file
2 | version=4
3 |
4 | # GitHub hosted projects
5 | opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%libvma-$1.tar.gz%" \
6 | https://github.com/mellanox/libvma/tags \
7 | (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
8 |
--------------------------------------------------------------------------------
/docs/man/Makefile.am:
--------------------------------------------------------------------------------
1 | vma_man_pages = \
2 | vma.7 \
3 | vmad.8 \
4 | vma_stats.8
5 |
6 | man_MANS = $(vma_man_pages)
7 | CLEANFILES = $(vma_man_pages)
8 | EXTRA_DIST = \
9 | $(vma_man_pages:.7=.7.in) \
10 | $(vma_man_pages:.8=.8.in)
11 |
12 | %.7: %.7.in
13 | @cp $< $@
14 | @sed -i 's/#BUILD_DATE#/@BUILD_DATE@/g' $@
15 | @sed -i 's/#VMA_LIBRARY_MAJOR#/@VMA_LIBRARY_MAJOR@/g' $@
16 | @sed -i 's/#VMA_LIBRARY_MINOR#/@VMA_LIBRARY_MINOR@/g' $@
17 | @sed -i 's/#VMA_LIBRARY_REVISION#/@VMA_LIBRARY_REVISION@/g' $@
18 |
19 | %.8: %.8.in
20 | @cp $< $@
21 | @sed -i 's/#BUILD_DATE#/@BUILD_DATE@/g' $@
22 | @sed -i 's/#VMA_LIBRARY_MAJOR#/@VMA_LIBRARY_MAJOR@/g' $@
23 | @sed -i 's/#VMA_LIBRARY_MINOR#/@VMA_LIBRARY_MINOR@/g' $@
24 | @sed -i 's/#VMA_LIBRARY_REVISION#/@VMA_LIBRARY_REVISION@/g' $@
25 |
--------------------------------------------------------------------------------
/docs/man/vma.7.in:
--------------------------------------------------------------------------------
1 | .\" -*- groff -*-
2 | .\"
3 | .TH VMA 7 "#BUILD_DATE#" libvma "VMA(#VMA_LIBRARY_MAJOR#.#VMA_LIBRARY_MINOR#.#VMA_LIBRARY_REVISION#) User's Manual"
4 | .SH NAME
5 | VMA \- NVIDIA Messaging Accelerator (VMA) library.
6 |
7 | .SH SYNOPSIS
8 | .B libvma.so
9 |
10 | .SH DESCRIPTION
11 | .B VMA
12 | NVIDIA Messaging Accelerator (VMA) boosts performance for message-based
13 | and streaming applications such as those found in financial services market
14 | data environments and Web2.0 clusters. It allows application written over
15 | standard socket API to run over Ethernet and/or Infiniband from user-space
16 | with full network stack bypass. The result is a reduction in latency by as
17 | much as 300%, an increase in application throughput by as much as 200%, higher
18 | packets rates and better CPU utilization as compared to applications running
19 | on standard Ethernet or InfiniBand interconnect networks.
20 |
21 | .SH FILES
22 | .I /etc/libvma.conf
23 | .RS
24 | The system wide configuration file. Look inside libvma.conf for instructions
25 | and examples.
26 | .RE
27 | .I /usr/share/doc/libvma/README.txt
28 | .RS
29 | General VMA Library description.
30 | .RE
31 | .I /usr/share/doc/libvma/VMA_VERSION
32 | .RS
33 | VMA Library version information.
34 | .RE
35 |
36 | .SH SEE ALSO
37 | .BR vmad (8),
38 | .BR vma_stats (8)
39 |
40 | .SH "AUTHORS"
41 | .TP
42 | NVIDIA CORPORATION
43 |
--------------------------------------------------------------------------------
/docs/man/vmad.8.in:
--------------------------------------------------------------------------------
1 | .\" -*- groff -*-
2 | .\"
3 | .TH VMA 8 "#BUILD_DATE#" libvma "VMA(#VMA_LIBRARY_MAJOR#.#VMA_LIBRARY_MINOR#.#VMA_LIBRARY_REVISION#) User's Manual"
4 | .SH NAME
5 | vmad \- NVIDIA Messaging Accelerator (VMA) daemon.
6 |
7 | .SH SYNOPSIS
8 | .B vmad
9 | [\-\-console] [\-\-pid,-p \fInum\fP] [\-\-fid,-f \fInum\fP]
10 | [\-\-force-rst] [\-\-verbose,\-v \fIlevel\fP]
11 |
12 | .SH DESCRIPTION
13 | vmad is the daemon program for vma (7).
14 |
15 | vmad can be configured using command-line options
16 |
17 | The options are as follows:
18 | .sp
19 | \fB\-\-console\fP
20 | Enable foreground mode.
21 | .TP
22 | \fB\-\-pid,\-p \fP\fInum\fP
23 | Set prime number as maximum of processes per node.
24 | .TP
25 | \fB\-\-fid,\-f \fP\fInum\fP
26 | Set prime number as maximum of sockets per process.
27 | .TP
28 | \fB\-\-force\-rst\fP
29 | Force internal RST.
30 | .TP
31 | \fB\-\-verbose,\-v \fP\fIlevel\fP
32 | Output verbose level
33 | .TP
34 |
35 | .SH SEE ALSO
36 | .BR vma (7),
37 | .BR vma_stats (8)
38 |
39 | .SH "AUTHORS"
40 | .TP
41 | NVIDIA CORPORATION
42 |
--------------------------------------------------------------------------------
/src/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS := utils vlogger state_machine stats vma
2 |
--------------------------------------------------------------------------------
/src/state_machine/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS := -I$(top_srcdir)/src
2 |
3 | noinst_LTLIBRARIES = libstate_machine.la
4 | libstate_machine_la_LDFLAGS = -static
5 | libstate_machine_la_SOURCES = \
6 | sm_fifo.cpp \
7 | sm.cpp \
8 | sm_fifo.h \
9 | sm.h
10 |
11 |
12 | noinst_PROGRAMS = state_machine_test
13 | state_machine_test_LDADD = \
14 | libstate_machine.la \
15 | $(top_builddir)/src/utils/libutils.la \
16 | $(top_builddir)/src/vlogger/libvlogger.la
17 |
18 | state_machine_test_SOURCES = main.cpp
19 |
20 | state_machine_test_DEPENDENCIES = \
21 | libstate_machine.la \
22 | $(top_builddir)/src/utils/libutils.la \
23 | $(top_builddir)/src/vlogger/libvlogger.la
24 |
--------------------------------------------------------------------------------
/src/state_machine/sm_fifo.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3 | * Copyright (c) 2001-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4 | * SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
5 | */
6 |
7 |
8 | #include "sm_fifo.h"
9 |
10 | bool sm_fifo::is_empty()
11 | {
12 | return m_sm_event_fifo.empty();
13 | }
14 |
15 | void sm_fifo::push_back(int element, void* ev_data)
16 | {
17 | sm_fifo_entry_t fe;
18 | fe.ev_data = ev_data;
19 | fe.event = element;
20 | m_sm_event_fifo.push_back(fe);
21 | }
22 |
23 | // Return the first element in the fifo.
24 | // in case the fifo is empty: ret.event = -1
25 | sm_fifo_entry_t sm_fifo::pop_front()
26 | {
27 | sm_fifo_entry_t ret;
28 | ret.event = -1;
29 | ret.ev_data = NULL;
30 | if (!m_sm_event_fifo.empty()) {
31 | ret = m_sm_event_fifo.front();
32 | m_sm_event_fifo.pop_front();
33 | }
34 | return ret;
35 | }
36 |
37 | //code coverage
38 | #if 0
39 | void sm_fifo::debug_print_fifo()
40 | {
41 | int i = 1;
42 | sm_event_list_t::iterator tmp = m_sm_event_fifo.begin();
43 | for (sm_event_list_t::iterator tmp = m_sm_event_fifo.begin(); tmp != m_sm_event_fifo.end(); tmp++) {
44 | printf("element num %d is %d\n",i , tmp->event);
45 | i++;
46 | }
47 | }
48 | #endif
49 |
50 |
--------------------------------------------------------------------------------
/src/state_machine/sm_fifo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3 | * Copyright (c) 2001-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4 | * SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
5 | */
6 |
7 |
8 | #ifndef V_SM_FIFO_H
9 | #define V_SM_FIFO_H
10 |
11 | #include
12 | #include
13 |
14 | typedef struct {
15 | int event;
16 | void* ev_data;
17 | } sm_fifo_entry_t;
18 |
19 | typedef std::deque sm_event_list_t;
20 |
21 |
22 | class sm_fifo
23 | {
24 | public:
25 | bool is_empty();
26 | void push_back(int element, void* ev_data);
27 | sm_fifo_entry_t pop_front();
28 | void debug_print_fifo();
29 |
30 | private:
31 | sm_event_list_t m_sm_event_fifo;
32 | };
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/src/stats/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS := -I$(top_srcdir)/src ${LIBNL_CFLAGS}
2 |
3 | noinst_LTLIBRARIES = libstats.la
4 | libstats_la_LDFLAGS = -static
5 | libstats_la_SOURCES = \
6 | stats_printer.cpp \
7 | stats_publisher.cpp \
8 | stats_data_reader.h
9 |
10 | bin_PROGRAMS = vma_stats
11 | vma_stats_LDADD= -lrt \
12 | libstats.la \
13 | $(top_builddir)/src/utils/libutils.la \
14 | $(top_builddir)/src/vlogger/libvlogger.la
15 | vma_stats_SOURCES = stats_reader.cpp
16 | vma_stats_DEPENDENCIES = \
17 | libstats.la \
18 | $(top_builddir)/src/vlogger/libvlogger.la
19 |
--------------------------------------------------------------------------------
/src/stats/stats_data_reader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3 | * Copyright (c) 2001-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4 | * SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
5 | */
6 |
7 |
8 | #ifndef STATS_DATA_READER_H
9 | #define STATS_DATA_READER_H
10 |
11 | #include