summaryrefslogtreecommitdiffstats
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
authorDmitry Safonov <dima@arista.com>2018-01-18 19:31:34 +0100
committerDavid S. Miller <davem@davemloft.net>2018-01-24 21:03:36 +0100
commit57a5749b0fa3639a228d7c0ac080ee1704abe8fd (patch)
treed95146a3aa8cce05fb91fc05f32fb651ab40c224 /net/core/pktgen.c
parentDocumentation/pktgen: Clearify how-to use pktgen samples (diff)
downloadlinux-57a5749b0fa3639a228d7c0ac080ee1704abe8fd.tar.xz
linux-57a5749b0fa3639a228d7c0ac080ee1704abe8fd.zip
pktgen: Add missing !flag parameters
o FLOW_SEQ now can be disabled with pgset "flag !FLOW_SEQ" o FLOW_SEQ and FLOW_RND are antonyms, as it's shown by pktgen_if_show() o IPSEC now may be disabled Note, that IPV6 is enabled with dst6/src6 parameters, not with a flag parameter. Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r--net/core/pktgen.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 4fcfcb14e7c6..20f1c873a1ed 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1284,9 +1284,12 @@ static ssize_t pktgen_if_write(struct file *file,
else if (strcmp(f, "!SVID_RND") == 0)
pkt_dev->flags &= ~F_SVID_RND;
- else if (strcmp(f, "FLOW_SEQ") == 0)
+ else if (strcmp(f, "FLOW_SEQ") == 0 || strcmp(f, "!FLOW_RND") == 0)
pkt_dev->flags |= F_FLOW_SEQ;
+ else if (strcmp(f, "FLOW_RND") == 0 || strcmp(f, "!FLOW_SEQ") == 0)
+ pkt_dev->flags &= ~F_FLOW_SEQ;
+
else if (strcmp(f, "QUEUE_MAP_RND") == 0)
pkt_dev->flags |= F_QUEUE_MAP_RND;
@@ -1301,6 +1304,9 @@ static ssize_t pktgen_if_write(struct file *file,
#ifdef CONFIG_XFRM
else if (strcmp(f, "IPSEC") == 0)
pkt_dev->flags |= F_IPSEC_ON;
+
+ else if (strcmp(f, "!IPSEC") == 0)
+ pkt_dev->flags &= ~F_IPSEC_ON;
#endif
else if (strcmp(f, "!IPV6") == 0)