Skip to content

Commit 57a5749

Browse files
0x7f454c46davem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d2ee797 commit 57a5749

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

net/core/pktgen.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,9 +1284,12 @@ static ssize_t pktgen_if_write(struct file *file,
12841284
else if (strcmp(f, "!SVID_RND") == 0)
12851285
pkt_dev->flags &= ~F_SVID_RND;
12861286

1287-
else if (strcmp(f, "FLOW_SEQ") == 0)
1287+
else if (strcmp(f, "FLOW_SEQ") == 0 || strcmp(f, "!FLOW_RND") == 0)
12881288
pkt_dev->flags |= F_FLOW_SEQ;
12891289

1290+
else if (strcmp(f, "FLOW_RND") == 0 || strcmp(f, "!FLOW_SEQ") == 0)
1291+
pkt_dev->flags &= ~F_FLOW_SEQ;
1292+
12901293
else if (strcmp(f, "QUEUE_MAP_RND") == 0)
12911294
pkt_dev->flags |= F_QUEUE_MAP_RND;
12921295

@@ -1301,6 +1304,9 @@ static ssize_t pktgen_if_write(struct file *file,
13011304
#ifdef CONFIG_XFRM
13021305
else if (strcmp(f, "IPSEC") == 0)
13031306
pkt_dev->flags |= F_IPSEC_ON;
1307+
1308+
else if (strcmp(f, "!IPSEC") == 0)
1309+
pkt_dev->flags &= ~F_IPSEC_ON;
13041310
#endif
13051311

13061312
else if (strcmp(f, "!IPV6") == 0)

0 commit comments

Comments
 (0)