]> Git Repo - linux.git/commitdiff
Merge branches 'core', 'cxgb4', 'ipath', 'iser', 'lockdep', 'mlx4', 'nes', 'ocrdma...
authorRoland Dreier <[email protected]>
Mon, 21 May 2012 16:00:47 +0000 (09:00 -0700)
committerRoland Dreier <[email protected]>
Mon, 21 May 2012 16:00:47 +0000 (09:00 -0700)
1  2  3  4  5  6  7  8  9  10 
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/verbs.c
drivers/infiniband/hw/mlx4/qp.c
include/rdma/ib_verbs.h

index 4d27e4c3fe34badbe941e735edaf9d8fb33b61f2,4d27e4c3fe34badbe941e735edaf9d8fb33b61f2,4d27e4c3fe34badbe941e735edaf9d8fb33b61f2,4d27e4c3fe34badbe941e735edaf9d8fb33b61f2,ad750f3c6ca09b817fd5b9480df16ba80fc2c6ad,4d27e4c3fe34badbe941e735edaf9d8fb33b61f2,4d27e4c3fe34badbe941e735edaf9d8fb33b61f2,4d27e4c3fe34badbe941e735edaf9d8fb33b61f2,4d27e4c3fe34badbe941e735edaf9d8fb33b61f2,7d801e6252f10520304600a71bb1dfbb6a4dc0bd..f9d0d7c413a25b9e15775acf12ae20335140a2f7
          
          #include "uverbs.h"
          
---- -----static struct lock_class_key pd_lock_key;
---- -----static struct lock_class_key mr_lock_key;
---- -----static struct lock_class_key cq_lock_key;
---- -----static struct lock_class_key qp_lock_key;
---- -----static struct lock_class_key ah_lock_key;
---- -----static struct lock_class_key srq_lock_key;
---- -----static struct lock_class_key xrcd_lock_key;
++++ +++++struct uverbs_lock_class {
++++ +++++      struct lock_class_key   key;
++++ +++++      char                    name[16];
++++ +++++};
++++ +++++
++++ +++++static struct uverbs_lock_class pd_lock_class = { .name = "PD-uobj" };
++++ +++++static struct uverbs_lock_class mr_lock_class = { .name = "MR-uobj" };
++++ +++++static struct uverbs_lock_class cq_lock_class = { .name = "CQ-uobj" };
++++ +++++static struct uverbs_lock_class qp_lock_class = { .name = "QP-uobj" };
++++ +++++static struct uverbs_lock_class ah_lock_class = { .name = "AH-uobj" };
++++ +++++static struct uverbs_lock_class srq_lock_class        = { .name = "SRQ-uobj" };
++++ +++++static struct uverbs_lock_class xrcd_lock_class = { .name = "XRCD-uobj" };
          
          #define INIT_UDATA(udata, ibuf, obuf, ilen, olen)                     \
                do {                                                            \
           */
          
          static void init_uobj(struct ib_uobject *uobj, u64 user_handle,
---- -----                    struct ib_ucontext *context, struct lock_class_key *key)
++++ +++++                    struct ib_ucontext *context, struct uverbs_lock_class *c)
          {
                uobj->user_handle = user_handle;
                uobj->context     = context;
                kref_init(&uobj->ref);
                init_rwsem(&uobj->mutex);
---- -----      lockdep_set_class(&uobj->mutex, key);
++++ +++++      lockdep_set_class_and_name(&uobj->mutex, &c->key, c->name);
                uobj->live        = 0;
          }
          
@@@@@@@@@@@ -522,7 -522,7 -522,7 -522,7 -527,7 -522,7 -522,7 -522,7 -522,7 -522,7 +527,7 @@@@@@@@@@@ ssize_t ib_uverbs_alloc_pd(struct ib_uv
                if (!uobj)
                        return -ENOMEM;
          
---- -----      init_uobj(uobj, 0, file->ucontext, &pd_lock_key);
++++ +++++      init_uobj(uobj, 0, file->ucontext, &pd_lock_class);
                down_write(&uobj->mutex);
          
                pd = file->device->ib_dev->alloc_pd(file->device->ib_dev,
@@@@@@@@@@@ -750,7 -750,7 -750,7 -750,7 -755,7 -750,7 -750,7 -750,7 -750,7 -750,7 +755,7 @@@@@@@@@@@ ssize_t ib_uverbs_open_xrcd(struct ib_u
                        goto err_tree_mutex_unlock;
                }
          
---- -----      init_uobj(&obj->uobject, 0, file->ucontext, &xrcd_lock_key);
++++ +++++      init_uobj(&obj->uobject, 0, file->ucontext, &xrcd_lock_class);
          
                down_write(&obj->uobject.mutex);
          
@@@@@@@@@@@ -947,7 -947,7 -947,7 -947,7 -952,7 -947,7 -947,7 -947,7 -947,7 -947,7 +952,7 @@@@@@@@@@@ ssize_t ib_uverbs_reg_mr(struct ib_uver
                if (!uobj)
                        return -ENOMEM;
          
---- -----      init_uobj(uobj, 0, file->ucontext, &mr_lock_key);
++++ +++++      init_uobj(uobj, 0, file->ucontext, &mr_lock_class);
                down_write(&uobj->mutex);
          
                pd = idr_read_pd(cmd.pd_handle, file->ucontext);
@@@@@@@@@@@ -1115,7 -1115,7 -1115,7 -1115,7 -1120,7 -1115,7 -1115,7 -1115,7 -1115,7 -1115,7 +1120,7 @@@@@@@@@@@ ssize_t ib_uverbs_create_cq(struct ib_u
                if (!obj)
                        return -ENOMEM;
          
---- -----      init_uobj(&obj->uobject, cmd.user_handle, file->ucontext, &cq_lock_key);
++++ +++++      init_uobj(&obj->uobject, cmd.user_handle, file->ucontext, &cq_lock_class);
                down_write(&obj->uobject.mutex);
          
                if (cmd.comp_channel >= 0) {
@@@@@@@@@@@ -1399,6 -1399,6 -1399,6 -1399,6 -1404,6 -1399,6 -1399,6 -1399,6 -1399,6 -1399,9 +1404,9 @@@@@@@@@@@ ssize_t ib_uverbs_create_qp(struct ib_u
                if (copy_from_user(&cmd, buf, sizeof cmd))
                        return -EFAULT;
          
+++++++++       if (cmd.qp_type == IB_QPT_RAW_PACKET && !capable(CAP_NET_RAW))
+++++++++               return -EPERM;
+++++++++ 
                INIT_UDATA(&udata, buf + sizeof cmd,
                           (unsigned long) cmd.response + sizeof resp,
                           in_len - sizeof cmd, out_len - sizeof resp);
                if (!obj)
                        return -ENOMEM;
          
---- -----      init_uobj(&obj->uevent.uobject, cmd.user_handle, file->ucontext, &qp_lock_key);
++++ +++++      init_uobj(&obj->uevent.uobject, cmd.user_handle, file->ucontext, &qp_lock_class);
                down_write(&obj->uevent.uobject.mutex);
          
                if (cmd.qp_type == IB_QPT_XRC_TGT) {
                        }
                        device = xrcd->device;
                } else {
---- -----              pd  = idr_read_pd(cmd.pd_handle, file->ucontext);
---- -----              scq = idr_read_cq(cmd.send_cq_handle, file->ucontext, 0);
---- -----              if (!pd || !scq) {
---- -----                      ret = -EINVAL;
---- -----                      goto err_put;
---- -----              }
---- -----
                        if (cmd.qp_type == IB_QPT_XRC_INI) {
                                cmd.max_recv_wr = cmd.max_recv_sge = 0;
                        } else {
                                                goto err_put;
                                        }
                                }
---- -----                      rcq = (cmd.recv_cq_handle == cmd.send_cq_handle) ?
---- -----                             scq : idr_read_cq(cmd.recv_cq_handle, file->ucontext, 1);
---- -----                      if (!rcq) {
---- -----                              ret = -EINVAL;
---- -----                              goto err_put;
++++ +++++
++++ +++++                      if (cmd.recv_cq_handle != cmd.send_cq_handle) {
++++ +++++                              rcq = idr_read_cq(cmd.recv_cq_handle, file->ucontext, 0);
++++ +++++                              if (!rcq) {
++++ +++++                                      ret = -EINVAL;
++++ +++++                                      goto err_put;
++++ +++++                              }
                                }
                        }
++++ +++++
++++ +++++              scq = idr_read_cq(cmd.send_cq_handle, file->ucontext, !!rcq);
++++ +++++              rcq = rcq ?: scq;
++++ +++++              pd  = idr_read_pd(cmd.pd_handle, file->ucontext);
++++ +++++              if (!pd || !scq) {
++++ +++++                      ret = -EINVAL;
++++ +++++                      goto err_put;
++++ +++++              }
++++ +++++
                        device = pd->device;
                }
          
@@@@@@@@@@@ -1585,7 -1585,7 -1585,7 -1585,7 -1594,7 -1585,7 -1585,7 -1585,7 -1585,7 -1588,7 +1597,7 @@@@@@@@@@@ ssize_t ib_uverbs_open_qp(struct ib_uve
                if (!obj)
                        return -ENOMEM;
          
---- -----      init_uobj(&obj->uevent.uobject, cmd.user_handle, file->ucontext, &qp_lock_key);
++++ +++++      init_uobj(&obj->uevent.uobject, cmd.user_handle, file->ucontext, &qp_lock_class);
                down_write(&obj->uevent.uobject.mutex);
          
                xrcd = idr_read_xrcd(cmd.pd_handle, file->ucontext, &xrcd_uobj);
@@@@@@@@@@@ -2272,7 -2272,7 -2272,7 -2272,7 -2281,7 -2272,7 -2272,7 -2272,7 -2272,7 -2275,7 +2284,7 @@@@@@@@@@@ ssize_t ib_uverbs_create_ah(struct ib_u
                if (!uobj)
                        return -ENOMEM;
          
---- -----      init_uobj(uobj, cmd.user_handle, file->ucontext, &ah_lock_key);
++++ +++++      init_uobj(uobj, cmd.user_handle, file->ucontext, &ah_lock_class);
                down_write(&uobj->mutex);
          
                pd = idr_read_pd(cmd.pd_handle, file->ucontext);
@@@@@@@@@@@ -2476,30 -2476,30 -2476,30 -2476,30 -2485,30 -2476,30 -2476,30 -2476,30 -2476,30 -2479,30 +2488,30 @@@@@@@@@@@ static int __uverbs_create_xsrq(struct 
                if (!obj)
                        return -ENOMEM;
          
---- -----      init_uobj(&obj->uevent.uobject, cmd->user_handle, file->ucontext, &srq_lock_key);
++++ +++++      init_uobj(&obj->uevent.uobject, cmd->user_handle, file->ucontext, &srq_lock_class);
                down_write(&obj->uevent.uobject.mutex);
          
---- -----      pd  = idr_read_pd(cmd->pd_handle, file->ucontext);
---- -----      if (!pd) {
---- -----              ret = -EINVAL;
---- -----              goto err;
---- -----      }
---- -----
                if (cmd->srq_type == IB_SRQT_XRC) {
---- -----              attr.ext.xrc.cq  = idr_read_cq(cmd->cq_handle, file->ucontext, 0);
---- -----              if (!attr.ext.xrc.cq) {
---- -----                      ret = -EINVAL;
---- -----                      goto err_put_pd;
---- -----              }
---- -----
                        attr.ext.xrc.xrcd  = idr_read_xrcd(cmd->xrcd_handle, file->ucontext, &xrcd_uobj);
                        if (!attr.ext.xrc.xrcd) {
                                ret = -EINVAL;
---- -----                      goto err_put_cq;
++++ +++++                      goto err;
                        }
          
                        obj->uxrcd = container_of(xrcd_uobj, struct ib_uxrcd_object, uobject);
                        atomic_inc(&obj->uxrcd->refcnt);
++++ +++++
++++ +++++              attr.ext.xrc.cq  = idr_read_cq(cmd->cq_handle, file->ucontext, 0);
++++ +++++              if (!attr.ext.xrc.cq) {
++++ +++++                      ret = -EINVAL;
++++ +++++                      goto err_put_xrcd;
++++ +++++              }
++++ +++++      }
++++ +++++
++++ +++++      pd  = idr_read_pd(cmd->pd_handle, file->ucontext);
++++ +++++      if (!pd) {
++++ +++++              ret = -EINVAL;
++++ +++++              goto err_put_cq;
                }
          
                attr.event_handler  = ib_uverbs_srq_event_handler;
                ib_destroy_srq(srq);
          
          err_put:
---- -----      if (cmd->srq_type == IB_SRQT_XRC) {
---- -----              atomic_dec(&obj->uxrcd->refcnt);
---- -----              put_uobj_read(xrcd_uobj);
---- -----      }
++++ +++++      put_pd_read(pd);
          
          err_put_cq:
                if (cmd->srq_type == IB_SRQT_XRC)
                        put_cq_read(attr.ext.xrc.cq);
          
---- -----err_put_pd:
---- -----      put_pd_read(pd);
++++ +++++err_put_xrcd:
++++ +++++      if (cmd->srq_type == IB_SRQT_XRC) {
++++ +++++              atomic_dec(&obj->uxrcd->refcnt);
++++ +++++              put_uobj_read(xrcd_uobj);
++++ +++++      }
          
          err:
                put_uobj_write(&obj->uevent.uobject);
index c5b94d647e1ed02d1e306ab46bde53d251a6e9c8,575b78045aafd1b5a861f9fad753f0108dd7e5d0,575b78045aafd1b5a861f9fad753f0108dd7e5d0,575b78045aafd1b5a861f9fad753f0108dd7e5d0,575b78045aafd1b5a861f9fad753f0108dd7e5d0,575b78045aafd1b5a861f9fad753f0108dd7e5d0,575b78045aafd1b5a861f9fad753f0108dd7e5d0,575b78045aafd1b5a861f9fad753f0108dd7e5d0,575b78045aafd1b5a861f9fad753f0108dd7e5d0,140f9a5d492fdfb371c8d50045e0d6642d0e3099..30f199e8579f4c9d6ea6885093c93c95b35c6c62
@@@@@@@@@@@ -479,6 -479,6 -479,6 -479,6 -479,6 -479,6 -479,6 -479,6 -479,6 -479,7 +479,7 @@@@@@@@@@@ static const struct 
                                        [IB_QPT_UD]  = (IB_QP_PKEY_INDEX                |
                                                        IB_QP_PORT                      |
                                                        IB_QP_QKEY),
+++++++++                               [IB_QPT_RAW_PACKET] = IB_QP_PORT,
                                        [IB_QPT_UC]  = (IB_QP_PKEY_INDEX                |
                                                        IB_QP_PORT                      |
                                                        IB_QP_ACCESS_FLAGS),
@@@@@@@@@@@ -1183,33 -1183,23 -1183,23 -1183,23 -1183,23 -1183,23 -1183,23 -1183,23 -1183,23 -1184,23 +1184,33 @@@@@@@@@@@ EXPORT_SYMBOL(ib_dealloc_fmr)
          
          int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
          {
 +++++++++      int ret;
 +++++++++
                if (!qp->device->attach_mcast)
                        return -ENOSYS;
                if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
                        return -EINVAL;
          
 ---------      return qp->device->attach_mcast(qp, gid, lid);
 +++++++++      ret = qp->device->attach_mcast(qp, gid, lid);
 +++++++++      if (!ret)
 +++++++++              atomic_inc(&qp->usecnt);
 +++++++++      return ret;
          }
          EXPORT_SYMBOL(ib_attach_mcast);
          
          int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
          {
 +++++++++      int ret;
 +++++++++
                if (!qp->device->detach_mcast)
                        return -ENOSYS;
                if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
                        return -EINVAL;
          
 ---------      return qp->device->detach_mcast(qp, gid, lid);
 +++++++++      ret = qp->device->detach_mcast(qp, gid, lid);
 +++++++++      if (!ret)
 +++++++++              atomic_dec(&qp->usecnt);
 +++++++++      return ret;
          }
          EXPORT_SYMBOL(ib_detach_mcast);
          
index 3a78489666277eeb97a77ce65c5fa9ff804b5339,3a78489666277eeb97a77ce65c5fa9ff804b5339,3a78489666277eeb97a77ce65c5fa9ff804b5339,3a78489666277eeb97a77ce65c5fa9ff804b5339,3a78489666277eeb97a77ce65c5fa9ff804b5339,1fca0afd14e3b8817282e2ff630d5749188ea7b0,3a78489666277eeb97a77ce65c5fa9ff804b5339,3a78489666277eeb97a77ce65c5fa9ff804b5339,3a78489666277eeb97a77ce65c5fa9ff804b5339,4649d83203dfb2f062b920a558b2297e56dfa957..ceb33327091a8244a8d16d73766c5c2eab3840c1
@@@@@@@@@@@ -84,6 -84,6 -84,6 -84,6 -84,6 -84,6 -84,6 -84,6 -84,6 -84,11 +84,11 @@@@@@@@@@@ enum 
                MLX4_IB_CACHE_LINE_SIZE = 64,
          };
          
+++++++++ enum {
+++++++++       MLX4_RAW_QP_MTU         = 7,
+++++++++       MLX4_RAW_QP_MSGMAX      = 31,
+++++++++ };
+++++++++ 
          static const __be32 mlx4_ib_opcode[] = {
                [IB_WR_SEND]                            = cpu_to_be32(MLX4_OPCODE_SEND),
                [IB_WR_LSO]                             = cpu_to_be32(MLX4_OPCODE_LSO),
@@@@@@@@@@@ -256,7 -256,7 -256,7 -256,7 -256,7 -256,7 -256,7 -256,7 -256,7 -261,7 +261,7 @@@@@@@@@@@ static void mlx4_ib_qp_event(struct mlx
                                event.event = IB_EVENT_QP_ACCESS_ERR;
                                break;
                        default:
----- ----                      printk(KERN_WARNING "mlx4_ib: Unexpected event type %d "
+++++ ++++                      pr_warn("Unexpected event type %d "
                                       "on QP %06x\n", type, qp->qpn);
                                return;
                        }
@@@@@@@@@@@ -573,7 -573,7 -573,7 -573,7 -573,7 -573,7 -573,7 -573,7 -573,7 -578,12 +578,12 @@@@@@@@@@@ static int create_qp_common(struct mlx4
                if (sqpn) {
                        qpn = sqpn;
                } else {
---------               err = mlx4_qp_reserve_range(dev->dev, 1, 1, &qpn);
+++++++++               /* Raw packet QPNs must be aligned to 8 bits. If not, the WQE
+++++++++                * BlueFlame setup flow wrongly causes VLAN insertion. */
+++++++++               if (init_attr->qp_type == IB_QPT_RAW_PACKET)
+++++++++                       err = mlx4_qp_reserve_range(dev->dev, 1, 1 << 8, &qpn);
+++++++++               else
+++++++++                       err = mlx4_qp_reserve_range(dev->dev, 1, 1, &qpn);
                        if (err)
                                goto err_wrid;
                }
@@@@@@@@@@@ -715,7 -715,7 -715,7 -715,7 -715,7 -715,7 -715,7 -715,7 -715,7 -725,7 +725,7 @@@@@@@@@@@ static void destroy_qp_common(struct ml
                if (qp->state != IB_QPS_RESET)
                        if (mlx4_qp_modify(dev->dev, NULL, to_mlx4_state(qp->state),
                                           MLX4_QP_STATE_RST, NULL, 0, 0, &qp->mqp))
----- ----                      printk(KERN_WARNING "mlx4_ib: modify QP %06x to RESET failed.\n",
+++++ ++++                      pr_warn("modify QP %06x to RESET failed.\n",
                                       qp->mqp.qpn);
          
                get_cqs(qp, &send_cq, &recv_cq);
@@@@@@@@@@@ -791,6 -791,6 -791,6 -791,6 -791,6 -791,6 -791,6 -791,6 -791,6 -801,7 +801,7 @@@@@@@@@@@ struct ib_qp *mlx4_ib_create_qp(struct 
                case IB_QPT_RC:
                case IB_QPT_UC:
                case IB_QPT_UD:
+++++++++       case IB_QPT_RAW_PACKET:
                {
                        qp = kzalloc(sizeof *qp, GFP_KERNEL);
                        if (!qp)
@@@@@@@@@@@ -872,7 -872,7 -872,7 -872,7 -872,7 -872,7 -872,7 -872,7 -872,7 -883,8 +883,8 @@@@@@@@@@@ static int to_mlx4_st(enum ib_qp_type t
                case IB_QPT_XRC_INI:
                case IB_QPT_XRC_TGT:    return MLX4_QP_ST_XRC;
                case IB_QPT_SMI:
---------       case IB_QPT_GSI:        return MLX4_QP_ST_MLX;
+++++++++       case IB_QPT_GSI:
+++++++++       case IB_QPT_RAW_PACKET: return MLX4_QP_ST_MLX;
                default:                return -1;
                }
          }
@@@@@@@@@@@ -946,7 -946,7 -946,7 -946,7 -946,7 -946,7 -946,7 -946,7 -946,7 -958,7 +958,7 @@@@@@@@@@@ static int mlx4_set_path(struct mlx4_ib
          
                if (ah->ah_flags & IB_AH_GRH) {
                        if (ah->grh.sgid_index >= dev->dev->caps.gid_table_len[port]) {
----- ----                      printk(KERN_ERR "sgid_index (%u) too large. max is %d\n",
+++++ ++++                      pr_err("sgid_index (%u) too large. max is %d\n",
                                       ah->grh.sgid_index, dev->dev->caps.gid_table_len[port] - 1);
                                return -1;
                        }
@@@@@@@@@@@ -1042,6 -1042,6 -1042,6 -1042,6 -1042,6 -1042,6 -1042,6 -1042,6 -1042,6 -1054,8 +1054,8 @@@@@@@@@@@ static int __mlx4_ib_modify_qp(struct i
          
                if (ibqp->qp_type == IB_QPT_GSI || ibqp->qp_type == IB_QPT_SMI)
                        context->mtu_msgmax = (IB_MTU_4096 << 5) | 11;
+++++++++       else if (ibqp->qp_type == IB_QPT_RAW_PACKET)
+++++++++               context->mtu_msgmax = (MLX4_RAW_QP_MTU << 5) | MLX4_RAW_QP_MSGMAX;
                else if (ibqp->qp_type == IB_QPT_UD) {
                        if (qp->flags & MLX4_IB_QP_LSO)
                                context->mtu_msgmax = (IB_MTU_4096 << 5) |
                                context->mtu_msgmax = (IB_MTU_4096 << 5) | 12;
                } else if (attr_mask & IB_QP_PATH_MTU) {
                        if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
----- ----                      printk(KERN_ERR "path MTU (%u) is invalid\n",
+++++ ++++                      pr_err("path MTU (%u) is invalid\n",
                                       attr->path_mtu);
                                goto out;
                        }
                if (cur_state == IB_QPS_INIT &&
                    new_state == IB_QPS_RTR  &&
                    (ibqp->qp_type == IB_QPT_GSI || ibqp->qp_type == IB_QPT_SMI ||
---------            ibqp->qp_type == IB_QPT_UD)) {
+++++++++            ibqp->qp_type == IB_QPT_UD ||
+++++++++            ibqp->qp_type == IB_QPT_RAW_PACKET)) {
                        context->pri_path.sched_queue = (qp->port - 1) << 6;
                        if (is_qp0(dev, qp))
                                context->pri_path.sched_queue |= MLX4_IB_DEFAULT_QP0_SCHED_QUEUE;
                if (is_qp0(dev, qp)) {
                        if (cur_state != IB_QPS_RTR && new_state == IB_QPS_RTR)
                                if (mlx4_INIT_PORT(dev->dev, qp->port))
----- ----                              printk(KERN_WARNING "INIT_PORT failed for port %d\n",
+++++ ++++                              pr_warn("INIT_PORT failed for port %d\n",
                                               qp->port);
          
                        if (cur_state != IB_QPS_RESET && cur_state != IB_QPS_ERR &&
@@@@@@@@@@@ -1319,6 -1319,6 -1319,6 -1319,6 -1319,6 -1319,6 -1319,6 -1319,6 -1319,6 -1334,11 +1334,11 @@@@@@@@@@@ int mlx4_ib_modify_qp(struct ib_qp *ibq
                        goto out;
                }
          
+++++++++       if ((attr_mask & IB_QP_PORT) && (ibqp->qp_type == IB_QPT_RAW_PACKET) &&
+++++++++           (rdma_port_get_link_layer(&dev->ib_dev, attr->port_num) !=
+++++++++            IB_LINK_LAYER_ETHERNET))
+++++++++               goto out;
+++++++++ 
                if (attr_mask & IB_QP_PKEY_INDEX) {
                        int p = attr_mask & IB_QP_PORT ? attr->port_num : qp->port;
                        if (attr->pkey_index >= dev->dev->caps.pkey_table_len[p])
@@@@@@@@@@@ -1424,6 -1424,6 -1424,6 -1424,6 -1424,6 -1424,9 -1424,6 -1424,6 -1424,6 -1444,6 +1444,9 @@@@@@@@@@@ static int build_mlx_header(struct mlx4
          
                if (is_eth) {
                        u8 *smac;
+++++ ++++              u16 pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13;
+++++ ++++
+++++ ++++              mlx->sched_prio = cpu_to_be16(pcp);
          
                        memcpy(sqp->ud_header.eth.dmac_h, ah->av.eth.mac, 6);
                        /* FIXME: cache smac value? */
                        if (!is_vlan) {
                                sqp->ud_header.eth.type = cpu_to_be16(MLX4_IB_IBOE_ETHERTYPE);
                        } else {
----- ----                      u16 pcp;
----- ----
                                sqp->ud_header.vlan.type = cpu_to_be16(MLX4_IB_IBOE_ETHERTYPE);
----- ----                      pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13;
                                sqp->ud_header.vlan.tag = cpu_to_be16(vlan | pcp);
                        }
                } else {
                header_size = ib_ud_header_pack(&sqp->ud_header, sqp->header_buf);
          
                if (0) {
----- ----              printk(KERN_ERR "built UD header of size %d:\n", header_size);
+++++ ++++              pr_err("built UD header of size %d:\n", header_size);
                        for (i = 0; i < header_size / 4; ++i) {
                                if (i % 8 == 0)
----- ----                              printk("  [%02x] ", i * 4);
----- ----                      printk(" %08x",
----- ----                             be32_to_cpu(((__be32 *) sqp->header_buf)[i]));
+++++ ++++                              pr_err("  [%02x] ", i * 4);
+++++ ++++                      pr_cont(" %08x",
+++++ ++++                              be32_to_cpu(((__be32 *) sqp->header_buf)[i]));
                                if ((i + 1) % 8 == 0)
----- ----                              printk("\n");
+++++ ++++                              pr_cont("\n");
                        }
----- ----              printk("\n");
+++++ ++++              pr_err("\n");
                }
          
                /*
diff --combined include/rdma/ib_verbs.h
index c84d1016618eac270320eb1bf1f39b501f3647d1,c3cca5a4dacdb3bc9a0a04518db43b68664cc132,c3cca5a4dacdb3bc9a0a04518db43b68664cc132,c3cca5a4dacdb3bc9a0a04518db43b68664cc132,c3cca5a4dacdb3bc9a0a04518db43b68664cc132,c3cca5a4dacdb3bc9a0a04518db43b68664cc132,c3cca5a4dacdb3bc9a0a04518db43b68664cc132,c3cca5a4dacdb3bc9a0a04518db43b68664cc132,c3cca5a4dacdb3bc9a0a04518db43b68664cc132,a3fa3232b8a08d47f2752cde9f74f728ae4d998c..07996af8265a524b60a356faa4f59cf5cf712de1
@@@@@@@@@@@ -605,7 -605,7 -605,7 -605,7 -605,7 -605,7 -605,7 -605,7 -605,7 -605,7 +605,7 @@@@@@@@@@@ enum ib_qp_type 
                IB_QPT_UD,
                IB_QPT_RAW_IPV6,
                IB_QPT_RAW_ETHERTYPE,
---------       /* Save 8 for RAW_PACKET */
+++++++++       IB_QPT_RAW_PACKET = 8,
                IB_QPT_XRC_INI = 9,
                IB_QPT_XRC_TGT,
                IB_QPT_MAX
@@@@@@@@@@@ -964,7 -964,7 -964,7 -964,7 -964,7 -964,7 -964,7 -964,7 -964,7 -964,7 +964,7 @@@@@@@@@@@ struct ib_qp 
                struct ib_srq          *srq;
                struct ib_xrcd         *xrcd; /* XRC TGT QPs only */
                struct list_head        xrcd_list;
 ---------      atomic_t                usecnt; /* count times opened */
 +++++++++      atomic_t                usecnt; /* count times opened, mcast attaches */
                struct list_head        open_list;
                struct ib_qp           *real_qp;
                struct ib_uobject      *uobject;
This page took 0.108662 seconds and 4 git commands to generate.