summaryrefslogtreecommitdiff
path: root/built_in.h
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2013-12-12 13:41:51 +0100
committerJesper Dangaard Brouer <brouer@redhat.com>2013-12-12 13:41:51 +0100
commit7d1ba2b499fcd904bdea7a965688ab7ffd3e390e (patch)
tree22e6ce832be46bc0cbffeb8b15d352d4e2b8ba9e /built_in.h
parentc3602a995b21e8133c7f4fd1fb1e7e21b6a844f1 (diff)
trafgen: take advantage of PACKET_QDISC_BYPASS sock option
Since Linux 3.14, the kernel supports a socket option PACKET_QDISC_BYPASS, which trafgen enables by default. That allow us to bypass the kernels normal qdisc (traffic control) layer. An option -q, --qdisc-path is added to allow enabling the qdisc path explicity, useful for testing purposes. This will be avail in kernels >= 3.14 via commit d346a3fae3 (packet: introduce PACKET_QDISC_BYPASS socket option). Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Diffstat (limited to 'built_in.h')
-rw-r--r--built_in.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/built_in.h b/built_in.h
index 6f6625e..20d7317 100644
--- a/built_in.h
+++ b/built_in.h
@@ -370,6 +370,10 @@ static inline u64 cpu_to_le64(u64 val)
# define TP_STATUS_TS_RAW_HARDWARE (1 << 31)
#endif
+#ifndef PACKET_QDISC_BYPASS
+# define PACKET_QDISC_BYPASS 20
+#endif
+
#ifndef POLLRDNORM
# define POLLRDNORM 0x0040
#endif