From: Ben Pfaff Date: Mon, 13 Jul 2009 18:56:26 +0000 (-0700) Subject: Revert "datapath: Don't orphan packets in dp_dev transmit path." X-Git-Tag: v0.90.3~3^2~17 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=00c030a5971ee311a474529407b3751b1fbacbcf;p=sliver-openvswitch.git 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. --- diff --git a/datapath/dp_dev.c b/datapath/dp_dev.c index 3902a8c5f..5aa32f048 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)