From 33e89097c05cb0bb1816a15aa5ef4740d03eb90a Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Fri, 12 Oct 2018 17:17:10 +0200 Subject: ipcpd: Make Qdisc bypass configurable This will make bypassing the qdisc configurable, as it might be handy for getting fast data rates but is generally needed. Signed-off-by: Sander Vrijders Signed-off-by: Dimitri Staessens --- src/ipcpd/eth/eth.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ipcpd/eth/eth.c') diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c index e7a1580c..3a749cf7 100644 --- a/src/ipcpd/eth/eth.c +++ b/src/ipcpd/eth/eth.c @@ -1231,7 +1231,9 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf) size_t maxsz; #endif #if defined(HAVE_RAW_SOCKETS) + #if defined(IPCP_ETH_QDISC_BYPASS) int qdisc_bypass = 1; + #endif /* ENABLE_QDISC_BYPASS */ int flags; #endif assert(conf); @@ -1415,10 +1417,12 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf) goto fail_device; } + #if defined(IPCP_ETH_QDISC_BYPASS) if (setsockopt(eth_data.s_fd, SOL_PACKET, PACKET_QDISC_BYPASS, &qdisc_bypass, sizeof(qdisc_bypass))) { log_info("Qdisc bypass not supported."); } + #endif if (bind(eth_data.s_fd, (struct sockaddr *) ð_data.device, sizeof(eth_data.device))) { -- cgit v1.2.3