Skip to content
Snippets Groups Projects
Commit c193cf95 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

xdp-gun: remove dead code

parent 35b7af49
No related branches found
No related tags found
No related merge requests found
......@@ -187,18 +187,13 @@ void *dns_xdp_gun_thread(void *_ctx)
goto end;
}
uint32_t really_sent = 0, retry = 10;
uint32_t really_sent = 0;
ret = knot_xdp_send(xsk, pkts, ctx->at_once, &really_sent);
while (ret == KNOT_NET_ESEND && really_sent < ctx->at_once && --retry > 0) {
uint32_t sent_now = 0;
usleep(10000);
ret = knot_xdp_send(xsk, pkts + really_sent, ctx->at_once - really_sent, &sent_now);
really_sent += sent_now;
}
if (ret != KNOT_EOK) {
printf("thread#%u send_pkts failed: %s\n", ctx->thread_id, knot_strerror(ret));
goto end;
}
assert(really_sent == ctx->at_once);
tot_sent += really_sent;
ret = knot_xdp_send_finish(xsk);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment