diff options
author | Eric Dumazet <edumazet@google.com> | 2015-02-22 17:03:41 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-18 14:10:50 +0100 |
commit | 37c63bf5b692b8311722b3b64c9d7fe0022d43bf (patch) | |
tree | e002e5046f3cdeede3139b009baf580c781d428f /net/core | |
parent | 9ae56d8b65097d9f5b95e49663af5f6a479fe839 (diff) | |
download | lwn-37c63bf5b692b8311722b3b64c9d7fe0022d43bf.tar.gz lwn-37c63bf5b692b8311722b3b64c9d7fe0022d43bf.zip |
net: pktgen: disable xmit_clone on virtual devices
[ Upstream commit 52d6c8c6ca125872459054daa70f2f1c698c8e75 ]
Trying to use burst capability (aka xmit_more) on a virtual device
like bonding is not supported.
For example, skb might be queued multiple times on a qdisc, with
various list corruptions.
Fixes: 38b2cf2982dc ("net: pktgen: packet bursting via skb->xmit_more")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core')
-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 9fa25b0ea145..352d183ecba3 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1134,6 +1134,9 @@ static ssize_t pktgen_if_write(struct file *file, return len; i += len; + if ((value > 1) && + (!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING))) + return -ENOTSUPP; pkt_dev->burst = value < 1 ? 1 : value; sprintf(pg_result, "OK: burst=%d", pkt_dev->burst); return count; |