Since Linux kernel 3.14 there is the option to bypass the kernel
Qdisc. This will speed up the Ethernet IPCP.
Signed-off-by: Sander Vrijders <sander.vrijders@xxxxxxxx>
---
src/ipcpd/eth/eth.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c
index 8175d80..05dd9ac 100644
--- a/src/ipcpd/eth/eth.c
+++ b/src/ipcpd/eth/eth.c
@@ -1199,6 +1199,9 @@ static int eth_ipcp_bootstrap(const struct ipcp_config *
conf)
#endif
#ifndef SHM_RDRB_MULTI_BLOCK
size_t maxsz;
+#endif
+#if defined(HAVE_RAW_SOCKETS)
+ int qdisc_bypass = 1;
#endif
assert(conf);
assert(conf->type == THIS_TYPE);
@@ -1365,6 +1368,11 @@ static int eth_ipcp_bootstrap(const struct ipcp_config *
conf)
return -1;
}
+ if (setsockopt(eth_data.s_fd, SOL_PACKET, PACKET_QDISC_BYPASS,
+ &qdisc_bypass, sizeof(qdisc_bypass))) {
+ log_info("Qdisc bypass not supported.");
+ }
+
if (bind(eth_data.s_fd, (struct sockaddr *) ð_data.device,
sizeof(eth_data.device))) {
log_err("Failed to bind socket to interface");
--
2.19.0