X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/8ceca1e18a46e8f20c9f0c0bf69dd140e0ff6773..d399660214ce5d4d754f8dbd3ec204986500ef20:/ugw/ugw.c diff --git a/ugw/ugw.c b/ugw/ugw.c index 9458e7d..482f4e1 100644 --- a/ugw/ugw.c +++ b/ugw/ugw.c @@ -137,6 +137,11 @@ void init_packet_rx(struct in_ctx *ctx) s = CHECK(socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))); + if (busy_poll_us) { + CHECK(setsockopt(s, SOL_SOCKET, SO_BUSY_POLL, + &busy_poll_us, sizeof(busy_poll_us))); + } + int val = TPACKET_V2; CHECK(setsockopt(s, SOL_PACKET, PACKET_VERSION, &val, sizeof(val))); socklen_t len = sizeof(ctx->hdrlen);