diff options
author | Ben Pfaff <blp@nicira.com> | 2009-07-13 11:56:26 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2009-07-13 11:56:26 -0700 |
commit | 00c030a5971ee311a474529407b3751b1fbacbcf (patch) | |
tree | d49562ff65ba9e268ca031105d7398afa213288a /datapath/dp_dev.c | |
parent | 0858ad2b9d2f594f99bb11fc9b331ce8b1de953d (diff) |
Revert "datapath: Don't orphan packets in dp_dev transmit path."
This reverts commit 0858ad2b9d2f594f99bb11fc9b331ce8b1de953d.
Although that commit partially fixed a performance regression
relative to the Linux bridge, it introduced other problems that
were not apparent in the performance testing (e.g.
WARN_ON_ONCE(skb->destructor) now triggers in dp_process_received_packet()).
The fix is not completely obvious, so reverting now to ensure stability
while investigating the problem.
Diffstat (limited to 'datapath/dp_dev.c')
-rw-r--r-- | datapath/dp_dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/datapath/dp_dev.c b/datapath/dp_dev.c index 3902a8c5..5aa32f04 100644 --- a/datapath/dp_dev.c +++ b/datapath/dp_dev.c @@ -86,6 +86,12 @@ static int dp_dev_xmit(struct sk_buff *skb, struct net_device *netdev) struct dp_dev *dp_dev = dp_dev_priv(netdev); struct pcpu_lstats *lb_stats; + /* By orphaning 'skb' we will screw up socket accounting slightly, but + * the effect is limited to the device queue length. If we don't + * do this, then the sk_buff will be destructed eventually, but it is + * harder to predict when. */ + skb_orphan(skb); + /* dp_process_received_packet() needs its own clone. */ skb = skb_share_check(skb, GFP_ATOMIC); if (!skb) |