[ofa-general] [PATCH 11/11] mlx4: XRC receive-only QPs
Roland Dreier
rdreier at cisco.com
Mon Jun 23 21:44:16 PDT 2008
> +int mlx4_ib_modify_xrc_rcv_qp(struct ib_xrcd *ibxrcd, u32 qp_num,
> + struct ib_qp_attr *attr, int attr_mask)
> +{
> + struct mlx4_ib_dev *dev = to_mdev(ibxrcd->device);
> + struct mlx4_ib_xrcd *xrcd = to_mxrcd(ibxrcd);
> + struct mlx4_qp *mqp;
> + int err;
> +
> + if (!(dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_XRC))
> + return -ENOSYS;
> +
> + mqp = __mlx4_qp_lookup(dev->dev, qp_num);
> + if (unlikely(!mqp)) {
> + printk(KERN_WARNING "mlx4_ib_reg_xrc_rcv_qp: unknown QPN %06x\n",
> + qp_num);
> + return -EINVAL;
> + }
I don't see any locking here... what protects against the QP from being
destroyed out from under you in another thread?
- R.
More information about the general
mailing list