diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2015-05-07 16:34:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-10 04:26:06 +0200 |
commit | f1f00d8ff60ca056db3805406507483eeb3794d7 (patch) | |
tree | 1c0f1ad1ada5811164ac0e6a7dafa4c11f502187 /net/core/pktgen.c | |
parent | Merge branch 'netns-scalability' (diff) | |
download | linux-f1f00d8ff60ca056db3805406507483eeb3794d7.tar.xz linux-f1f00d8ff60ca056db3805406507483eeb3794d7.zip |
pktgen: adjust flag NO_TIMESTAMP to be more pktgen compliant
Allow flag NO_TIMESTAMP to turn timestamping on again, like other flags,
with a negation of the flag like !NO_TIMESTAMP.
Also document the option flag NO_TIMESTAMP.
Fixes: afb84b626184 ("pktgen: add flag NO_TIMESTAMP to disable timestamping")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 508155b283dd..43bb21507373 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1267,6 +1267,9 @@ static ssize_t pktgen_if_write(struct file *file, else if (strcmp(f, "NO_TIMESTAMP") == 0) pkt_dev->flags |= F_NO_TIMESTAMP; + else if (strcmp(f, "!NO_TIMESTAMP") == 0) + pkt_dev->flags &= ~F_NO_TIMESTAMP; + else { sprintf(pg_result, "Flag -:%s:- unknown\nAvailable flags, (prepend ! to un-set flag):\n%s", |