Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband

+28 -6
+2
drivers/infiniband/core/sa_query.c
··· 956 956 957 957 ib_unregister_event_handler(&sa_dev->event_handler); 958 958 959 + flush_scheduled_work(); 960 + 959 961 for (i = 0; i <= sa_dev->end_port - sa_dev->start_port; ++i) { 960 962 ib_unregister_mad_agent(sa_dev->port[i].agent); 961 963 kref_put(&sa_dev->port[i].sm_ah->ref, free_sm_ah);
+1
drivers/infiniband/core/uverbs_main.c
··· 902 902 unregister_filesystem(&uverbs_event_fs); 903 903 class_destroy(uverbs_class); 904 904 unregister_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES); 905 + flush_scheduled_work(); 905 906 idr_destroy(&ib_uverbs_pd_idr); 906 907 idr_destroy(&ib_uverbs_mr_idr); 907 908 idr_destroy(&ib_uverbs_mw_idr);
+1 -1
drivers/infiniband/hw/mthca/mthca_av.c
··· 184 184 ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff); 185 185 ib_get_cached_gid(&dev->ib_dev, 186 186 be32_to_cpu(ah->av->port_pd) >> 24, 187 - ah->av->gid_index, 187 + ah->av->gid_index % dev->limits.gid_table_len, 188 188 &header->grh.source_gid); 189 189 memcpy(header->grh.destination_gid.raw, 190 190 ah->av->dgid, 16);
+2 -2
drivers/infiniband/ulp/ipoib/ipoib_main.c
··· 505 505 506 506 list_add_tail(&neigh->list, &path->neigh_list); 507 507 508 - if (path->pathrec.dlid) { 508 + if (path->ah) { 509 509 kref_get(&path->ah->ref); 510 510 neigh->ah = path->ah; 511 511 ··· 591 591 return; 592 592 } 593 593 594 - if (path->pathrec.dlid) { 594 + if (path->ah) { 595 595 ipoib_dbg(priv, "Send unicast ARP to %04x\n", 596 596 be16_to_cpu(path->pathrec.dlid)); 597 597
+22 -3
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
··· 97 97 struct ipoib_dev_priv *priv = netdev_priv(dev); 98 98 struct ipoib_neigh *neigh, *tmp; 99 99 unsigned long flags; 100 + int tx_dropped = 0; 100 101 101 102 ipoib_dbg_mcast(netdev_priv(dev), 102 103 "deleting multicast group " IPOIB_GID_FMT "\n", ··· 124 123 if (mcast->ah) 125 124 ipoib_put_ah(mcast->ah); 126 125 127 - while (!skb_queue_empty(&mcast->pkt_queue)) 126 + while (!skb_queue_empty(&mcast->pkt_queue)) { 127 + ++tx_dropped; 128 128 dev_kfree_skb_any(skb_dequeue(&mcast->pkt_queue)); 129 + } 130 + 131 + spin_lock_irqsave(&priv->tx_lock, flags); 132 + priv->stats.tx_dropped += tx_dropped; 133 + spin_unlock_irqrestore(&priv->tx_lock, flags); 129 134 130 135 kfree(mcast); 131 136 } ··· 283 276 } 284 277 285 278 /* actually send any queued packets */ 279 + spin_lock_irq(&priv->tx_lock); 286 280 while (!skb_queue_empty(&mcast->pkt_queue)) { 287 281 struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue); 282 + spin_unlock_irq(&priv->tx_lock); 288 283 289 284 skb->dev = dev; 290 285 ··· 297 288 298 289 if (dev_queue_xmit(skb)) 299 290 ipoib_warn(priv, "dev_queue_xmit failed to requeue packet\n"); 291 + spin_lock_irq(&priv->tx_lock); 300 292 } 293 + spin_unlock_irq(&priv->tx_lock); 301 294 302 295 return 0; 303 296 } ··· 311 300 { 312 301 struct ipoib_mcast *mcast = mcast_ptr; 313 302 struct net_device *dev = mcast->dev; 303 + struct ipoib_dev_priv *priv = netdev_priv(dev); 314 304 315 305 if (!status) 316 306 ipoib_mcast_join_finish(mcast, mcmember); ··· 322 310 IPOIB_GID_ARG(mcast->mcmember.mgid), status); 323 311 324 312 /* Flush out any queued packets */ 325 - while (!skb_queue_empty(&mcast->pkt_queue)) 313 + spin_lock_irq(&priv->tx_lock); 314 + while (!skb_queue_empty(&mcast->pkt_queue)) { 315 + ++priv->stats.tx_dropped; 326 316 dev_kfree_skb_any(skb_dequeue(&mcast->pkt_queue)); 317 + } 318 + spin_unlock_irq(&priv->tx_lock); 327 319 328 320 /* Clear the busy flag so we try again */ 329 321 clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); ··· 703 687 if (!mcast) { 704 688 ipoib_warn(priv, "unable to allocate memory for " 705 689 "multicast structure\n"); 690 + ++priv->stats.tx_dropped; 706 691 dev_kfree_skb_any(skb); 707 692 goto out; 708 693 } ··· 717 700 if (!mcast->ah) { 718 701 if (skb_queue_len(&mcast->pkt_queue) < IPOIB_MAX_MCAST_QUEUE) 719 702 skb_queue_tail(&mcast->pkt_queue, skb); 720 - else 703 + else { 704 + ++priv->stats.tx_dropped; 721 705 dev_kfree_skb_any(skb); 706 + } 722 707 723 708 if (mcast->query) 724 709 ipoib_dbg_mcast(priv, "no address vector, "