Commit 52d6c8c6 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: pktgen: disable xmit_clone on virtual devices

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: 38b2cf29 ("net: pktgen: packet bursting via skb->xmit_more")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 87cda7cb
...@@ -1134,6 +1134,9 @@ static ssize_t pktgen_if_write(struct file *file, ...@@ -1134,6 +1134,9 @@ static ssize_t pktgen_if_write(struct file *file,
return len; return len;
i += len; i += len;
if ((value > 1) &&
(!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)))
return -ENOTSUPP;
pkt_dev->burst = value < 1 ? 1 : value; pkt_dev->burst = value < 1 ? 1 : value;
sprintf(pg_result, "OK: burst=%d", pkt_dev->burst); sprintf(pg_result, "OK: burst=%d", pkt_dev->burst);
return count; return count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment