Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server version of Hercules #10

Open
wants to merge 117 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
879193e
allow running multiple transfers back-to-back
marcopioppini May 13, 2024
a049a76
monitor messages, multiple transfers ok
marcopioppini May 21, 2024
c4fc100
Arguments for daemon
marcopioppini May 23, 2024
d9ee3b8
rework some stuff, fix kick
marcopioppini May 24, 2024
4b26317
make monitor find actual paths
marcopioppini May 25, 2024
88aeea5
allow specifying mtu/nPaths when submitting job
marcopioppini May 26, 2024
f6d047d
look up return path only when needed
marcopioppini May 26, 2024
e579f41
re-enable sending path handshakes
marcopioppini May 26, 2024
88d8187
clean up session states, add error enum
marcopioppini May 27, 2024
77b96d1
timeouts, HS resend
marcopioppini May 27, 2024
cf53b7f
remove unused code, stop session on error instead of stopping hercules
marcopioppini May 27, 2024
a6c38f7
reply to HS packets for PCC
marcopioppini May 28, 2024
3bc1572
remove unused code
marcopioppini May 28, 2024
11c3f65
move xdp setup to separate file
marcopioppini May 28, 2024
dd0ae79
ensure return values are checked, group tx/rx code
marcopioppini May 28, 2024
87596c5
rework event handler
marcopioppini May 29, 2024
31ae2c9
drop received packets when no session running
marcopioppini May 29, 2024
fba658d
reorder code
marcopioppini May 29, 2024
096043c
re-enable pcc
marcopioppini May 30, 2024
929e4cc
inform monitor about finished transfers
marcopioppini May 30, 2024
2937980
periodically ask for new paths
marcopioppini May 31, 2024
7fe725e
session freeing, mark some fields atomic
marcopioppini Jun 1, 2024
ac64813
quit if no paths received
marcopioppini Jun 2, 2024
a889a8a
monitor: configfile
marcopioppini Jun 3, 2024
26d2dce
implement fetching job status
marcopioppini Jun 4, 2024
b696f16
remove sender_state_per_receiver
marcopioppini Jun 4, 2024
961ced9
path swapping, cleanup
marcopioppini Jun 4, 2024
4c89f39
Handle SCMP messages
marcopioppini Jun 4, 2024
459f8d7
update monitor stats
marcopioppini Jun 5, 2024
fdb0484
fix intra-as (empty paths)
marcopioppini Jun 5, 2024
c4ad90f
Change makefile to distinguish server/monitor
marcopioppini Jun 7, 2024
abb8317
Remove monitor socket locking
marcopioppini Jun 7, 2024
29343b4
go code cleanup
marcopioppini Jun 7, 2024
3a13935
implement cancel handler
marcopioppini Jun 9, 2024
52a8eeb
cleanup some todos
marcopioppini Jun 9, 2024
e960cfd
add stat for gfal
marcopioppini Jun 10, 2024
b0340c5
more todos
marcopioppini Jun 11, 2024
45b3277
split umem lock
marcopioppini Jun 11, 2024
9975060
add monitor socket, interfaces and listen addr to config
marcopioppini Jun 11, 2024
f8580cb
Determine payload length based on selected paths
marcopioppini Jun 13, 2024
638eac9
Cap payload length to interface MTU
marcopioppini Jun 13, 2024
1e97502
pathset freeing
marcopioppini Jun 14, 2024
574d580
fix mtu bug
marcopioppini Jun 14, 2024
9daca06
fix fill_rbudp_pkt
marcopioppini Jun 14, 2024
7585de7
implement directory transfer
marcopioppini Jun 15, 2024
fd33abe
enable multiple concurrent sessions
marcopioppini Jun 15, 2024
c36ab42
Merge branch 'directory-transfer' into server
marcopioppini Jun 19, 2024
c7b7ffc
Merge branch 'multiple-sessions' into server
marcopioppini Jun 19, 2024
e1a02dd
set destination path in directory index
marcopioppini Jun 20, 2024
3ba8306
fix session stopping
marcopioppini Jun 20, 2024
ae837f1
add underlay source port randomisation
marcopioppini Jun 20, 2024
cd9e42f
fix nacks with multiple sessions, minor improvements
marcopioppini Jun 21, 2024
9cada06
ensure ports printed correctly
marcopioppini Jun 21, 2024
be4afb6
make sure sessions are freed entirely
marcopioppini Jun 21, 2024
342e26a
cleanup on shutdown
marcopioppini Jun 21, 2024
cdfebfc
make server read config file
marcopioppini Jun 21, 2024
d38c677
big cleanup, check return codes in xdp setup
marcopioppini Jun 22, 2024
4ca77ea
Allow clients to override automatic MTU selection
marcopioppini Jun 23, 2024
78031a1
monitor cleanup
marcopioppini Jun 24, 2024
ac75f79
Ensure RTT is updated at receiver
marcopioppini Jun 26, 2024
269c635
Inform monitor earlier about finished transfers
marcopioppini Jun 26, 2024
0324146
fix some memory leaks (cc state)
marcopioppini Jun 26, 2024
2ec64ba
exit instead of waiting if sciond unreachable
marcopioppini Jun 26, 2024
accd379
print version at startup
marcopioppini Jun 26, 2024
fa56c7b
Improve printed error messages
marcopioppini Jun 26, 2024
98872a9
merge tls-certs
marcopioppini Jun 26, 2024
8a30fd9
commit gfal plugin
marcopioppini Jun 27, 2024
dd10098
retry monitor read if it times out
marcopioppini Jun 27, 2024
92be6a1
check reply path enabled
marcopioppini Jun 27, 2024
7d6b26d
fix nack timings and rtt computation
marcopioppini Jun 28, 2024
efa27a0
Changes for benchmarking mode, performance fix
marcopioppini Aug 9, 2024
ef8fb2e
add hcp: a cli tool to interact with Hercules
marcopioppini Sep 5, 2024
361febf
fix compilation
marcopioppini Sep 20, 2024
3c8e910
monitor: correctly determine directory size
marcopioppini Sep 24, 2024
5095387
Add option to drop privileges after startup
marcopioppini Sep 24, 2024
64c12de
remove timeout from monitor socket
marcopioppini Sep 24, 2024
4901b65
readme: explain api
marcopioppini Oct 10, 2024
78f20a8
config: allow specifying payload length per-dest
marcopioppini Oct 10, 2024
7474850
add systemd service files
marcopioppini Oct 10, 2024
33e434d
fix scmp parsing
marcopioppini Oct 10, 2024
ce9b226
Rework documentation, add manual pages
marcopioppini Oct 28, 2024
64e45e5
add hcp to Makefile, upgrade go (docker) to 1.22.8
marcopioppini Oct 28, 2024
7e37e79
print warning when running as root
marcopioppini Oct 29, 2024
c0ea8a2
Merge branch 'docs' into server
marcopioppini Oct 30, 2024
8d92d31
modify makefile to allow building without docker
marcopioppini Oct 30, 2024
8258876
add dependencies to build instructions
marcopioppini Oct 31, 2024
beac3cb
update go mod files
marcopioppini Oct 31, 2024
911e1c2
make building with clang possible
marcopioppini Oct 31, 2024
cd72e37
add clangd and clang-format config files
marcopioppini Oct 31, 2024
d0ee2d5
update service files
marcopioppini Oct 31, 2024
283aaad
add version field to header
marcopioppini Oct 31, 2024
95780c7
Merge branch 'server' of gitlab.inf.ethz.ch:OU-PERRIG/theses/msc_piop…
marcopioppini Oct 31, 2024
dbb5215
look for config in /usr/local/etc
marcopioppini Oct 31, 2024
86adc4e
make target to build packages
marcopioppini Nov 1, 2024
1d0e015
add payload length option to hcp
marcopioppini Nov 5, 2024
63960ce
add timeout to path selection
marcopioppini Nov 5, 2024
ca5099f
add chroot option
marcopioppini Nov 5, 2024
3032303
improve error messages
marcopioppini Nov 6, 2024
87dde8a
Revert "add version field to header"
marcopioppini Nov 6, 2024
13cc04c
add TxOnly and RxOnly options to use fewer threads
marcopioppini Nov 6, 2024
9c2dac6
small fix for pathset timeout
marcopioppini Nov 6, 2024
e37bcff
small fix in makefile, service file
marcopioppini Nov 8, 2024
47a0b43
looping acks
marcopioppini Nov 13, 2024
d8f966d
move to libxdp
marcopioppini Nov 20, 2024
d53164b
load in frags mode
marcopioppini Nov 26, 2024
7a365bb
jumbo rx/tx (with additional copy)
marcopioppini Nov 27, 2024
31d6a17
fix possible segfault
marcopioppini Nov 13, 2024
bab4acb
use multibuf only if supported, config option
marcopioppini Nov 28, 2024
f7d1618
make sure tx_p does not get stuck
marcopioppini Nov 15, 2024
62c3bcd
remove copy from multibuf TX
marcopioppini Dec 2, 2024
06665ff
add error control packets
marcopioppini Nov 15, 2024
7913ad6
remove copy from multibuf RX
marcopioppini Dec 2, 2024
d2fb21c
hcp: complain if dest port not set
marcopioppini Nov 27, 2024
30a6b1b
Merge branch 'jumbo-frames' into server
marcopioppini Dec 4, 2024
82b1555
fix possible memory leak
marcopioppini Dec 4, 2024
0df87c3
auto-detect zc support, allow disabling via config
marcopioppini Dec 9, 2024
3d32c7f
add copyright/license header to new files
marcopioppini Dec 10, 2024
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
Prev Previous commit
Next Next commit
Changes for benchmarking mode, performance fix
  • Loading branch information
marcopioppini committed Dec 10, 2024
commit efa27a0a5f86d51f7d0491bd7d5b3e94d415ced6
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -2,14 +2,15 @@ TARGET_SERVER := hercules-server
TARGET_MONITOR := hercules-monitor

CC := gcc
CFLAGS = -O3 -flto -std=gnu11 -D_GNU_SOURCE -Itomlc99
CFLAGS = -O3 -g3 -std=gnu11 -D_GNU_SOURCE -Itomlc99
# CFLAGS += -DNDEBUG
# CFLAGS += -Wall -Wextra

## Options:
# Print rx/tx session stats
CFLAGS += -DPRINT_STATS
# Enforce checking the source SCION/UDP address/port of received packets
CFLAGS += -DCHECK_SRC_ADDRESS
# CFLAGS += -DCHECK_SRC_ADDRESS
# Randomise the UDP underlay port (no restriction on the range of used ports).
# Enabling this currently breaks SCMP packet parsing
# CFLAGS += -DRANDOMIZE_UNDERLAY_SRC
@@ -21,7 +22,7 @@ CFLAGS += -DCHECK_SRC_ADDRESS
# CFLAGS += -DDEBUG_PRINT_PKTS # print received/sent packets (lots of noise!)


LDFLAGS = -flto -l:libbpf.a -Lbpf/src -Ltomlc99 -lm -lelf -latomic -pthread -lz -ltoml -z noexecstack $(ASAN_FLAG)
LDFLAGS = -g3 -l:libbpf.a -Lbpf/src -Ltomlc99 -lm -lelf -latomic -pthread -lz -ltoml -z noexecstack $(ASAN_FLAG)
DEPFLAGS := -MP -MD

SRCS := $(wildcard *.c)
105 changes: 77 additions & 28 deletions hercules.c
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@
#define RANDOMIZE_FLOWID

/* #define PCC_BENCH */
#define PCC_BENCH_SEC 30

#define RATE_LIMIT_CHECK 1000 // check rate limit every X packets
// Maximum burst above target pps allowed
@@ -74,9 +75,9 @@
static const int rbudp_headerlen = sizeof(struct hercules_header);
static const u64 session_timeout = 10e9; // 10 sec
static const u64 session_hs_retransmit_interval = 2e9; // 2 sec
static const u64 session_stale_timeout = 30e9; // 30 sec
static const u64 session_stale_timeout = 50e9; // 30 sec
static const u64 print_stats_interval = 1e9; // 1 sec
static const u64 path_update_interval = 60e9 * 2; // 2 minutes
static const u64 path_update_interval = 60e9 * 5; // 5 minutes
static const u64 monitor_update_interval = 30e9; // 30 seconds
#define PCC_NO_PATH \
UINT8_MAX // tell the receiver not to count the packet on any path
@@ -180,10 +181,7 @@ static void send_eth_frame(struct hercules_server *server,
}

static inline bool session_state_is_running(enum session_state s) {
if (s == SESSION_STATE_RUNNING_IDX || s == SESSION_STATE_RUNNING_DATA) {
return true;
}
return false;
return (s == SESSION_STATE_RUNNING_IDX || s == SESSION_STATE_RUNNING_DATA);
}

static inline void count_received_pkt(struct hercules_session *session,
@@ -310,6 +308,7 @@ static struct hercules_session *make_session(
s->state = SESSION_STATE_NONE;
s->error = SESSION_ERROR_NONE;
s->payloadlen = payloadlen;
debug_printf("Using payloadlen %u", payloadlen);
s->jobid = job_id;
s->peer = *peer_addr;
s->last_pkt_sent = 0;
@@ -396,12 +395,19 @@ struct hercules_server *hercules_init_server(struct hercules_config config,
exit_with_error(NULL, ENOMEM);
}

server->usock =
monitor_bind_daemon_socket(config.server_socket, config.monitor_socket);
if (server->usock == 0) {
fprintf(stderr,
"Error binding daemon socket. Is the monitor running?\n");
exit_with_error(NULL, EINVAL);
for (int i = 0; i < 5; i++) {
server->usock = monitor_bind_daemon_socket(config.server_socket,
config.monitor_socket);
if (server->usock == 0) {
fprintf(stderr,
"Error binding daemon socket. Is the monitor running?\n");
if (i == 4) {
exit_with_error(NULL, EINVAL);
}
sleep(1);
} else {
break;
}
}

server->config = config;
@@ -1073,6 +1079,10 @@ static void rx_receive_batch(struct hercules_server *server,
u32 len = xsk_ring_cons__rx_desc(&xsk->rx, idx_rx + i)->len;
const char *pkt = xsk_umem__get_data(xsk->umem->buffer, addr);
const char *rbudp_pkt = parse_pkt_fast_path(pkt, len, true, UINT32_MAX);
if (!rbudp_pkt) {
debug_printf("Unparseable packet on XDP socket, ignoring");
continue;
}
u16 pkt_dst_port = ntohs(*(u16 *)(rbudp_pkt - 6));

struct hercules_session *session_rx =
@@ -1115,8 +1125,6 @@ static void rx_receive_batch(struct hercules_server *server,
len - (rbudp_pkt - pkt))) {
debug_printf("Non-data packet on XDP socket? Ignoring.");
}
} else {
debug_printf("Unparseable packet on XDP socket, ignoring");
}
atomic_fetch_add(&session_rx->rx_npkts, 1);
}
@@ -1261,7 +1269,7 @@ static struct receiver_state *make_rx_state(
(rx_state->index_size + rx_state->chunklen - 1) / rx_state->chunklen;
bitset__create(&rx_state->received_chunks, rx_state->total_chunks);
bitset__create(&rx_state->received_chunks_index, rx_state->index_chunks);
rx_state->start_time = 0;
rx_state->start_time = get_nsecs();
rx_state->end_time = 0;
rx_state->handshake_rtt = 0;
rx_state->is_pcc_benchmark = false;
@@ -2454,8 +2462,13 @@ static char *tx_mmap(char *fname, char *dstname, size_t *filesize,
debug_printf("real filesize %llu", real_filesize);
debug_printf("total entry size %llu", index_size);

char *mem =
mmap(NULL, total_filesize, PROT_NONE, MAP_PRIVATE | MAP_ANON, 0, 0);
char *mem = mmap(NULL, total_filesize, PROT_NONE,
MAP_PRIVATE | MAP_ANON
#ifdef PCC_BENCH
| MAP_POPULATE
#endif
,
0, 0);
if (mem == MAP_FAILED) {
free(index);
return NULL;
@@ -2725,9 +2738,11 @@ static void tx_send_p(void *arg) {
struct worker_args *args = arg;
struct hercules_server *server = args->server;
int cur_session = 0;
int batch = 0;
while (!wants_shutdown) {
cur_session = ( cur_session + 1 ) % HERCULES_CONCURRENT_SESSIONS;
struct hercules_session *session_tx = server->sessions_tx[cur_session];
// XXX may need another kick_tx here?
if (session_tx == NULL ||
!session_state_is_running(session_tx->state)) {
continue;
@@ -2736,7 +2751,9 @@ static void tx_send_p(void *arg) {
struct send_queue_unit unit;
int ret = send_queue_pop(session_tx->send_queue, &unit);
if (!ret) {
kick_tx_server(server);
for (int i = 0; i < server->num_ifaces; i++){
kick_tx(server, args->xsks[i]);
}
continue;
}
// The unit may contain fewer than the max number of chunks. We only
@@ -2762,7 +2779,12 @@ static void tx_send_p(void *arg) {
frame_addrs, &unit, args->id,
is_index_transfer);
atomic_fetch_add(&session_tx->tx_npkts, num_chunks_in_unit);
kick_tx_server(server);
if (++batch > 5){
for (int i = 0; i < server->num_ifaces; i++){
kick_tx(server, args->xsks[i]);
}
batch = 0;
}
}
}

@@ -2789,6 +2811,7 @@ static void rx_trickle_acks(void *arg) {
session_rx->state = SESSION_STATE_INDEX_READY;
} else {
debug_printf("Received all, done.");
debug_printf("Time elapsed %.2f sec", (get_nsecs() - rx_state->start_time) / 1.e9);
rx_send_acks(server, rx_state, is_index_transfer);
quit_session(session_rx, SESSION_ERROR_OK);
}
@@ -3132,6 +3155,12 @@ static void mark_timed_out_sessions(struct hercules_server *server, int s,
quit_session(session_tx, SESSION_ERROR_TIMEOUT);
fprintf(stderr, "Session (TX %2d) timed out!\n", s);
}
#ifdef PCC_BENCH
if (session_tx->tx_state->start_time != 0 &&
now > session_tx->tx_state->start_time + PCC_BENCH_SEC * 1e9) {
quit_session(session_tx, SESSION_ERROR_OK);
}
#endif
}
struct hercules_session *session_rx = server->sessions_rx[s];
if (session_rx && session_rx->state != SESSION_STATE_DONE) {
@@ -3143,6 +3172,12 @@ static void mark_timed_out_sessions(struct hercules_server *server, int s,
quit_session(session_rx, SESSION_ERROR_STALE);
fprintf(stderr, "Session (RX %2d) stale!\n", s);
}
#ifdef PCC_BENCH
if (session_rx->rx_state->start_time != 0 &&
now > session_rx->rx_state->start_time + PCC_BENCH_SEC * 1e9) {
quit_session(session_rx, SESSION_ERROR_OK);
}
#endif
}
}

@@ -3260,9 +3295,10 @@ static void tx_update_paths(struct hercules_server *server, int s, u64 now) {
}

struct print_info {
u64 ts;
u32 rx_received;
u32 rx_chunks;
u32 tx_sent;
u64 ts;
};

static void print_session_stats(struct hercules_server *server, u64 now,
@@ -3279,6 +3315,7 @@ static void print_session_stats(struct hercules_server *server, u64 now,
u32 acked_count = session_tx->tx_state->acked_chunks.num_set;
u32 total = session_tx->tx_state->acked_chunks.num;
u64 tdiff = now - p->ts;
u64 elapsed = (now - session_tx->tx_state->start_time) / 1e9;
p->ts = now;
double send_rate_pps =
(sent_now - p->tx_sent) / ((double)tdiff / 1e9);
@@ -3289,10 +3326,10 @@ static void print_session_stats(struct hercules_server *server, u64 now,
send_rate_total += send_rate;
fprintf(
stdout,
"(TX %2d) [%4.1f%%] Chunks: %9u/%9u, rx: %9ld, tx:%9ld, rate "
"(TX %2d) [%4.1f%%] %5llus Chunks: %9u/%9u, rx: %9ld, tx:%9ld, rate "
"%8.2f "
"Mbps\n",
s, progress_percent, acked_count, total, session_tx->rx_npkts,
s, progress_percent, elapsed, acked_count, total, session_tx->rx_npkts,
session_tx->tx_npkts, send_rate);
}

@@ -3304,26 +3341,38 @@ static void print_session_stats(struct hercules_server *server, u64 now,
u32 total = session_rx->rx_state->received_chunks.num;
u32 rcvd_now = session_rx->rx_npkts;
u64 tdiff = now - p->ts;
u64 elapsed = (now - session_rx->rx_state->start_time) / 1e9;
p->ts = now;
double recv_rate_pps =
(rcvd_now - p->rx_received) / ((double)tdiff / 1e9);
double goodput_pps = (rec_count - p->rx_chunks) / ((double) tdiff / 1e9);
p->rx_received = rcvd_now;
p->rx_chunks = rec_count;
double recv_rate =
8 * recv_rate_pps * session_rx->rx_state->chunklen / 1e6;
double goodput_rate =
8 * goodput_pps * session_rx->rx_state->chunklen / 1e6;
recv_rate_total += recv_rate;
double progress_percent = rec_count / (double)total * 100;
fprintf(stdout,
"(RX %2d) [%4.1f%%] Chunks: %9u/%9u, rx: %9ld, tx:%9ld, "
"rate %8.2f "
"(RX %2d) [%4.1f%%] %5llus Chunks: %9u/%9u, rx: %9ld, tx:%9ld, "
"rate %8.2f (%8.2f)"
"Mbps\n",
s, progress_percent, rec_count, total, session_rx->rx_npkts,
session_rx->tx_npkts, recv_rate);
s, progress_percent, elapsed, rec_count, total, session_rx->rx_npkts,
session_rx->tx_npkts, recv_rate, goodput_rate);
fprintf(stdout, "(RX %2d) 1: %u | 2: %u | 3: %u | 4: %u\n",
s,
session_rx->rx_state->path_state[0].rx_npkts,
session_rx->rx_state->path_state[1].rx_npkts,
session_rx->rx_state->path_state[2].rx_npkts,
session_rx->rx_state->path_state[3].rx_npkts);
}
}
if (active_session) {
fprintf(stdout, "TX Total Rate: %.2f Mbps\n", send_rate_total);
fprintf(stdout, "RX Total Rate: %.2f Mbps\n", recv_rate_total);
fprintf(stdout, "\n");
fflush(stdout);
}
}

@@ -3383,7 +3432,7 @@ static void stop_finished_sessions(struct hercules_server *server, int slot,
struct hercules_session *session_rx = server->sessions_rx[slot];
if (session_rx != NULL && session_rx->state != SESSION_STATE_DONE &&
session_rx->error != SESSION_ERROR_NONE) {
fprintf(stderr, "Stopping RX %d\n", slot);
fprintf(stderr, "Stopping RX %d. Time elapsed: %.2fs\n", slot, (now - session_rx->rx_state->start_time)/1e9);
session_rx->state = SESSION_STATE_DONE;
int ret =
msync(session_rx->rx_state->mem, session_rx->rx_state->filesize,
@@ -3439,6 +3488,7 @@ static void events_p(void *arg) {
ssize_t len =
recvfrom(server->control_sockfd, buf, sizeof(buf), MSG_DONTWAIT,
(struct sockaddr *)&addr, &addr_size);
u64 pkt_received_at = get_nsecs();
if (len == -1) {
if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) {
continue;
@@ -3489,7 +3539,6 @@ static void events_p(void *arg) {
struct hercules_app_addr pkt_source = {.port = udphdr->uh_sport,
.ip = scionaddrhdr->src_ip,
.ia = scionaddrhdr->src_ia};
u64 pkt_received_at = get_nsecs();

const size_t rbudp_len = len - (rbudp_pkt - buf);
if (rbudp_len < sizeof(u32)) {
5 changes: 4 additions & 1 deletion monitor/pathstodestination.go
Original file line number Diff line number Diff line change
@@ -105,6 +105,9 @@ func (ptd *PathsToDestination) choosePaths() bool {
// No payloadlen set yet, we set it to the maximum that all selected paths and interfaces support
maxPayloadlen := HerculesMaxPktsize
for _, path := range ptd.paths {
if !path.enabled {
continue;
}
pathMTU := int(path.path.Metadata().MTU)
underlayHeaderLen, scionHeaderLen := getPathHeaderlen(path.path)
if pathMTU == 0 {
@@ -121,7 +124,7 @@ func (ptd *PathsToDestination) choosePaths() bool {
if maxPayloadlen+scionHeaderLen+underlayHeaderLen-14 > path.iface.MTU {
// Packet exceeds the interface MTU
// 14 is the size of the ethernet header, which is not included in the interface's MTU
fmt.Printf("Interface (%v) MTU too low, decreasing payload length", path.iface.Name)
fmt.Printf("Interface (%v) MTU too low, decreasing payload length\n", path.iface.Name)
maxPayloadlen = path.iface.MTU - underlayHeaderLen - scionHeaderLen
}
}