diff options
author | Nick Richardson <richardsonnick@google.com> | 2021-08-03 16:27:35 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-04 12:54:09 +0100 |
commit | c2eecaa193ff1e516a1b389637169ae86a6fa867 (patch) | |
tree | 2f9ed53ade241ca79bada59c7699e4c42e1ef625 | |
parent | 773bda96492153e11d21eb63ac814669b51fc701 (diff) | |
download | linux-c2eecaa193ff1e516a1b389637169ae86a6fa867.tar.gz linux-c2eecaa193ff1e516a1b389637169ae86a6fa867.tar.bz2 linux-c2eecaa193ff1e516a1b389637169ae86a6fa867.zip |
pktgen: Remove redundant clone_skb override
When the netif_receive xmit_mode is set, a line is supposed to set
clone_skb to a default 0 value. This line is made redundant due to a
preceding line that checks if clone_skb is more than zero and returns
-ENOTSUPP.
Overriding clone_skb to 0 does not make any difference to the behavior
because if it was positive we return error. So it can be either 0 or
negative, and in both cases the behavior is the same.
Remove redundant line that sets clone_skb to zero.
Signed-off-by: Nick Richardson <richardsonnick@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/pktgen.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 7e258d255e90..314f97acf39d 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1190,11 +1190,6 @@ static ssize_t pktgen_if_write(struct file *file, * pktgen_xmit() is called */ pkt_dev->last_ok = 1; - - /* override clone_skb if user passed default value - * at module loading time - */ - pkt_dev->clone_skb = 0; } else if (strcmp(f, "queue_xmit") == 0) { pkt_dev->xmit_mode = M_QUEUE_XMIT; pkt_dev->last_ok = 1; |