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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma

Pull more rdma fixes from Doug Ledford:
"I think we are getting pretty close to done now. There are four
one-off fixes in this update:

- fix ipoib multicast joins
- fix mlx4 error handling
- fix mlx5 size computation
- fix a thinko in core code"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
IB/mlx5: Fix RC transport send queue overhead computation
IB/ipoib: fix for rare multicast join race condition
IB/core: Fix reading capability mask of the port info class
net/mlx4: fix some error handling in mlx4_multi_func_init()

+27 -16
+2 -3
drivers/infiniband/core/sysfs.c
··· 720 720 721 721 if (get_perf_mad(dev, port_num, IB_PMA_CLASS_PORT_INFO, 722 722 &cpi, 40, sizeof(cpi)) >= 0) { 723 - 724 - if (cpi.capability_mask && IB_PMA_CLASS_CAP_EXT_WIDTH) 723 + if (cpi.capability_mask & IB_PMA_CLASS_CAP_EXT_WIDTH) 725 724 /* We have extended counters */ 726 725 return &pma_group_ext; 727 726 728 - if (cpi.capability_mask && IB_PMA_CLASS_CAP_EXT_WIDTH_NOIETF) 727 + if (cpi.capability_mask & IB_PMA_CLASS_CAP_EXT_WIDTH_NOIETF) 729 728 /* But not the IETF ones */ 730 729 return &pma_group_noietf; 731 730 }
+7 -5
drivers/infiniband/hw/mlx5/qp.c
··· 270 270 /* fall through */ 271 271 case IB_QPT_RC: 272 272 size += sizeof(struct mlx5_wqe_ctrl_seg) + 273 - sizeof(struct mlx5_wqe_atomic_seg) + 274 - sizeof(struct mlx5_wqe_raddr_seg); 273 + max(sizeof(struct mlx5_wqe_atomic_seg) + 274 + sizeof(struct mlx5_wqe_raddr_seg), 275 + sizeof(struct mlx5_wqe_umr_ctrl_seg) + 276 + sizeof(struct mlx5_mkey_seg)); 275 277 break; 276 278 277 279 case IB_QPT_XRC_TGT: ··· 281 279 282 280 case IB_QPT_UC: 283 281 size += sizeof(struct mlx5_wqe_ctrl_seg) + 284 - sizeof(struct mlx5_wqe_raddr_seg) + 285 - sizeof(struct mlx5_wqe_umr_ctrl_seg) + 286 - sizeof(struct mlx5_mkey_seg); 282 + max(sizeof(struct mlx5_wqe_raddr_seg), 283 + sizeof(struct mlx5_wqe_umr_ctrl_seg) + 284 + sizeof(struct mlx5_mkey_seg)); 287 285 break; 288 286 289 287 case IB_QPT_UD:
+17 -7
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
··· 456 456 return status; 457 457 } 458 458 459 - static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast) 459 + /* 460 + * Caller must hold 'priv->lock' 461 + */ 462 + static int ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast) 460 463 { 461 464 struct ipoib_dev_priv *priv = netdev_priv(dev); 462 465 struct ib_sa_multicast *multicast; ··· 468 465 }; 469 466 ib_sa_comp_mask comp_mask; 470 467 int ret = 0; 468 + 469 + if (!priv->broadcast || 470 + !test_bit(IPOIB_FLAG_OPER_UP, &priv->flags)) 471 + return -EINVAL; 471 472 472 473 ipoib_dbg_mcast(priv, "joining MGID %pI6\n", mcast->mcmember.mgid.raw); 473 474 ··· 532 525 rec.join_state = 4; 533 526 #endif 534 527 } 528 + spin_unlock_irq(&priv->lock); 535 529 536 530 multicast = ib_sa_join_multicast(&ipoib_sa_client, priv->ca, priv->port, 537 531 &rec, comp_mask, GFP_KERNEL, 538 532 ipoib_mcast_join_complete, mcast); 533 + spin_lock_irq(&priv->lock); 539 534 if (IS_ERR(multicast)) { 540 535 ret = PTR_ERR(multicast); 541 536 ipoib_warn(priv, "ib_sa_join_multicast failed, status %d\n", ret); 542 - spin_lock_irq(&priv->lock); 543 537 /* Requeue this join task with a backoff delay */ 544 538 __ipoib_mcast_schedule_join_thread(priv, mcast, 1); 545 539 clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); 546 540 spin_unlock_irq(&priv->lock); 547 541 complete(&mcast->done); 542 + spin_lock_irq(&priv->lock); 548 543 } 544 + return 0; 549 545 } 550 546 551 547 void ipoib_mcast_join_task(struct work_struct *work) ··· 630 620 /* Found the next unjoined group */ 631 621 init_completion(&mcast->done); 632 622 set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); 633 - spin_unlock_irq(&priv->lock); 634 - ipoib_mcast_join(dev, mcast); 635 - spin_lock_irq(&priv->lock); 623 + if (ipoib_mcast_join(dev, mcast)) { 624 + spin_unlock_irq(&priv->lock); 625 + return; 626 + } 636 627 } else if (!delay_until || 637 628 time_before(mcast->delay_until, delay_until)) 638 629 delay_until = mcast->delay_until; ··· 652 641 if (mcast) { 653 642 init_completion(&mcast->done); 654 643 set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); 644 + ipoib_mcast_join(dev, mcast); 655 645 } 656 646 spin_unlock_irq(&priv->lock); 657 - if (mcast) 658 - ipoib_mcast_join(dev, mcast); 659 647 } 660 648 661 649 int ipoib_mcast_start_thread(struct net_device *dev)
+1 -1
drivers/net/ethernet/mellanox/mlx4/cmd.c
··· 2429 2429 flush_workqueue(priv->mfunc.master.comm_wq); 2430 2430 destroy_workqueue(priv->mfunc.master.comm_wq); 2431 2431 err_slaves: 2432 - while (--i) { 2432 + while (i--) { 2433 2433 for (port = 1; port <= MLX4_MAX_PORTS; port++) 2434 2434 kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]); 2435 2435 }