[PKT_SCHED] netem: Orphan SKB when adding to queue.
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>
This commit is contained in:
@@ -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
|
* is marked here since the boot video device will be the only enabled
|
||||||
* video device at this point.
|
* video device at this point.
|
||||||
*/
|
*/
|
||||||
|
#if 0
|
||||||
static void __devinit fixup_video(struct pci_dev *pdev)
|
static void __devinit fixup_video(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
struct pci_dev *bridge;
|
struct pci_dev *bridge;
|
||||||
@@ -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);
|
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)
|
static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end)
|
||||||
{
|
{
|
||||||
|
@@ -170,6 +170,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
|||||||
return NET_XMIT_BYPASS;
|
return NET_XMIT_BYPASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skb_orphan(skb);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we need to duplicate packet, then re-insert at top of the
|
* If we need to duplicate packet, then re-insert at top of the
|
||||||
* qdisc tree, since parent queuer expects that only one
|
* qdisc tree, since parent queuer expects that only one
|
||||||
|
Reference in New Issue
Block a user