Skip to content

Commit

Permalink
[PKT_SCHED] netem: Orphan SKB when adding to queue.
Browse files Browse the repository at this point in the history
The networking emulator can queue SKBs for a very long
time, so if you're using netem on the sender side for
large bandwidth/delay product testing, the SKB socket
send queue sizes become artificially larger.

Correct this by calling skb_orphan() in netem_enqueue().

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 23, 2006
1 parent 6a43487 commit 4e8a520
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1
* is marked here since the boot video device will be the only enabled
* video device at this point.
*/

#if 0
static void __devinit fixup_video(struct pci_dev *pdev)
{
struct pci_dev *bridge;
Expand Down Expand Up @@ -1663,7 +1663,7 @@ static void __devinit fixup_video(struct pci_dev *pdev)
}
}
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_video);

#endif

static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end)
{
Expand Down
2 changes: 2 additions & 0 deletions net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
return NET_XMIT_BYPASS;
}

skb_orphan(skb);

/*
* If we need to duplicate packet, then re-insert at top of the
* qdisc tree, since parent queuer expects that only one
Expand Down

0 comments on commit 4e8a520

Please sign in to comment.