Skip to content

Commit 8fae438

Browse files
committed
xdp-forward: add state update on packet egress
Signed-off-by: Luis Jira <[email protected]>
1 parent c19baac commit 8fae438

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

xdp-forward/xdp_forward.bpf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static int xdp_timer_cb(struct bpf_map *map, __u64 *key, struct bpf_timer *timer
9494

9595
bpf_printk("xdp_timer_cb: Sending to ifindex %d\n", tgt_ifindex);
9696
xdp_packet_send(pkt, tgt_ifindex, 0);
97+
state->outstanding_bytes += pkt->len;
9798
}
9899

99100
xdp_packet_flush();

0 commit comments

Comments
 (0)