Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ jobs:
name: build x86-64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cd src/ && cmake . && make && ls -lh ntttcp && file ntttcp
- uses: gerlero/apt-install@v1
with:
packages: musl musl-dev musl-tools
- uses: actions/checkout@v7
- run: cd src/ && CC="musl-gcc" cmake -DCMAKE_C_FLAGS="-static" . && make && ls -lh ntttcp && file ntttcp

- name: Uploads binary file for x86-64
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ntttcp-x86_64
path: src/ntttcp
Expand All @@ -23,19 +26,19 @@ jobs:
name: build aarch64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
- uses: actions/checkout@v7
- uses: uraimo/run-on-arch-action@v3
name: Build artifact
id: build
with:
arch: aarch64
distro: ubuntu20.04
distro: ubuntu_latest
run: |
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake file
cd src/ && cmake . && make && ls -lh ntttcp && file ntttcp
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake file musl musl-dev musl-tools
cd src/ && CC="musl-gcc" cmake -DCMAKE_C_FLAGS="-static" . && make && ls -lh ntttcp && file ntttcp

- name: Uploads binary file for aarch64
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ntttcp-aarch64
path: src/ntttcp
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ A multiple-threaded Linux network throughput benchmark tool.

* Support writing log into JSON file ('-j').

* CI build statically links with [musl libc](https://wiki.musl-libc.org/getting-started.html) for portability across Linux distros & releases.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion src/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------

#define TOOL_NAME "NTTTCP for Linux"
#define TOOL_VERSION "1.4.7"
#define TOOL_VERSION "1.4.8"
#define AUTHOR_NAME "Shihua (Simon) Xiao, sixiao@microsoft.com"

#define TCP SOCK_STREAM
Expand Down
2 changes: 1 addition & 1 deletion src/udpstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void *run_ntttcp_sender_udp4_stream(struct ntttcp_stream_client *sc)
if (sc->socket_fq_rate_limit_bytes != 0)
enable_fq_rate_limit(sc, sockfd);

if (connect(sockfd, &serv_addr, sa_size) == -1) {
if (connect(sockfd, (const struct sockaddr *)&serv_addr, sa_size) == -1) {
ASPRINTF(&log,"failed to connect socket[%d] to remote: [%s:%d]. errno = %d.",
sockfd, sc->bind_address, sc->server_port, errno);
PRINT_ERR_FREE(log);
Expand Down
Loading