mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 01:54:09 +08:00
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: afb84b6261
("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>
This commit is contained in:
parent
4d95b72f61
commit
f1f00d8ff6
@ -145,6 +145,7 @@ Examples:
|
|||||||
UDPCSUM,
|
UDPCSUM,
|
||||||
IPSEC # IPsec encapsulation (needs CONFIG_XFRM)
|
IPSEC # IPsec encapsulation (needs CONFIG_XFRM)
|
||||||
NODE_ALLOC # node specific memory allocation
|
NODE_ALLOC # node specific memory allocation
|
||||||
|
NO_TIMESTAMP # disable timestamping
|
||||||
|
|
||||||
pgset spi SPI_VALUE Set specific SA used to transform packet.
|
pgset spi SPI_VALUE Set specific SA used to transform packet.
|
||||||
|
|
||||||
@ -287,6 +288,7 @@ flag
|
|||||||
UDPCSUM
|
UDPCSUM
|
||||||
IPSEC
|
IPSEC
|
||||||
NODE_ALLOC
|
NODE_ALLOC
|
||||||
|
NO_TIMESTAMP
|
||||||
|
|
||||||
dst_min
|
dst_min
|
||||||
dst_max
|
dst_max
|
||||||
|
@ -1267,6 +1267,9 @@ static ssize_t pktgen_if_write(struct file *file,
|
|||||||
else if (strcmp(f, "NO_TIMESTAMP") == 0)
|
else if (strcmp(f, "NO_TIMESTAMP") == 0)
|
||||||
pkt_dev->flags |= F_NO_TIMESTAMP;
|
pkt_dev->flags |= F_NO_TIMESTAMP;
|
||||||
|
|
||||||
|
else if (strcmp(f, "!NO_TIMESTAMP") == 0)
|
||||||
|
pkt_dev->flags &= ~F_NO_TIMESTAMP;
|
||||||
|
|
||||||
else {
|
else {
|
||||||
sprintf(pg_result,
|
sprintf(pg_result,
|
||||||
"Flag -:%s:- unknown\nAvailable flags, (prepend ! to un-set flag):\n%s",
|
"Flag -:%s:- unknown\nAvailable flags, (prepend ! to un-set flag):\n%s",
|
||||||
|
Loading…
Reference in New Issue
Block a user