[GIT PULL] please pull infiniband.git for-linus branch
Linus, please pull from master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git for-linus This tree is also available from kernel.org mirrors at: git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-linus This will get fixes for two fairly bad ehca bugs introduced in 2.6.23: Joachim Fenkes (1): IB/ehca: SRQ fixes to enable IPoIB CM Stefan Roscher (1): IB/ehca: Fix Small QP regressions drivers/infiniband/hw/ehca/ehca_hca.c | 10 -- drivers/infiniband/hw/ehca/ehca_irq.c | 48 --- drivers/infiniband/hw/ehca/ehca_qp.c | 10 -- drivers/infiniband/hw/ehca/ipz_pt_fn.c |2 +- 4 files changed, 45 insertions(+), 25 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c index fc19ef9..cf22472 100644 --- a/drivers/infiniband/hw/ehca/ehca_hca.c +++ b/drivers/infiniband/hw/ehca/ehca_hca.c @@ -93,9 +93,13 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) props->max_pd = min_t(int, rblock->max_pd, INT_MAX); props->max_ah = min_t(int, rblock->max_ah, INT_MAX); props->max_fmr = min_t(int, rblock->max_mr, INT_MAX); - props->max_srq = 0; - props->max_srq_wr = 0; - props->max_srq_sge = 0; + + if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) { + props->max_srq = props->max_qp; + props->max_srq_wr = props->max_qp_wr; + props->max_srq_sge = 3; + } + props->max_pkeys = 16; props->local_ca_ack_delay = rblock->local_ca_ack_delay; diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index ee06d8b..a925ea5 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c @@ -175,41 +175,55 @@ error_data1: } -static void qp_event_callback(struct ehca_shca *shca, u64 eqe, - enum ib_event_type event_type, int fatal) +static void dispatch_qp_event(struct ehca_shca *shca, struct ehca_qp *qp, + enum ib_event_type event_type) { struct ib_event event; - struct ehca_qp *qp; - u32 token = EHCA_BMASK_GET(EQE_QP_TOKEN, eqe); - - read_lock(&ehca_qp_idr_lock); - qp = idr_find(&ehca_qp_idr, token); - read_unlock(&ehca_qp_idr_lock); - - - if (!qp) - return; - - if (fatal) - ehca_error_data(shca, qp, qp->ipz_qp_handle.handle); event.device = &shca->ib_device; + event.event = event_type; if (qp->ext_type == EQPT_SRQ) { if (!qp->ib_srq.event_handler) return; - event.event = fatal ? IB_EVENT_SRQ_ERR : event_type; event.element.srq = &qp->ib_srq; qp->ib_srq.event_handler(&event, qp->ib_srq.srq_context); } else { if (!qp->ib_qp.event_handler) return; - event.event = event_type; event.element.qp = &qp->ib_qp; qp->ib_qp.event_handler(&event, qp->ib_qp.qp_context); } +} + +static void qp_event_callback(struct ehca_shca *shca, u64 eqe, + enum ib_event_type event_type, int fatal) +{ + struct ehca_qp *qp; + u32 token = EHCA_BMASK_GET(EQE_QP_TOKEN, eqe); + + read_lock(&ehca_qp_idr_lock); + qp = idr_find(&ehca_qp_idr, token); + read_unlock(&ehca_qp_idr_lock); + + if (!qp) + return; + + if (fatal) + ehca_error_data(shca, qp, qp->ipz_qp_handle.handle); + + dispatch_qp_event(shca, qp, fatal && qp->ext_type == EQPT_SRQ ? + IB_EVENT_SRQ_ERR : event_type); + + /* +* eHCA only processes one WQE at a time for SRQ base QPs, +* so the last WQE has been processed as soon as the QP enters +* error state. +*/ + if (fatal && qp->ext_type == EQPT_SRQBASE) + dispatch_qp_event(shca, qp, IB_EVENT_QP_LAST_WQE_REACHED); return; } diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index b178cba..84d435a 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c @@ -600,10 +600,12 @@ static struct ehca_qp *internal_create_qp( if (EHCA_BMASK_GET(HCA_CAP_MINI_QP, shca->hca_cap) && !(context && udata)) { /* no small QP support in userspace ATM */ - ehca_determine_small_queue( - &parms.squeue, max_send_sge, is_llqp); - ehca_determine_small_queue( - &parms.rqueue, max_recv_sge, is_llqp); + if (HAS_SQ(my_qp)) + ehca_determine_small_queue( + &parms.squeue, max_send_sge, is_llq
Re: [GIT PULL] please pull infiniband.git for-linus branch
Hi Roland, On Thursday 16 August 2007 18:19, Roland Dreier wrote: > > Hmm, if these things are appropriate for 2.6.23, maybe my patch > > adding linux/mutex.h to ehca_classes.h can go in too? > > Actually I queued Dotan's patches quite a while ago, although Linus > seems to be ignoring my pull requests. > > I don't see any urgency in adding more similar patches to 2.6.23, > since AFAIK 2.6.23 builds fine, right? Yes, there is no build issue with 2.6.23. We have realized on rhel4.5 that linux/mutex.h needs to be included explicitly. Thus, I'm fine with your decision. > > Also I would prefer to get ehca patches from the ehca people at IBM, > or at least an ack from them. Acked-by: Stefan Roscher <[EMAIL PROTECTED]> regards Stefan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [GIT PULL] please pull infiniband.git for-linus branch
> Hmm, if these things are appropriate for 2.6.23, maybe my patch > adding linux/mutex.h to ehca_classes.h can go in too? Actually I queued Dotan's patches quite a while ago, although Linus seems to be ignoring my pull requests. I don't see any urgency in adding more similar patches to 2.6.23, since AFAIK 2.6.23 builds fine, right? Also I would prefer to get ehca patches from the ehca people at IBM, or at least an ack from them. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [GIT PULL] please pull infiniband.git for-linus branch
> Dotan Barak (3): > IB: Include from > IB: Include and from Hmm, if these things are appropriate for 2.6.23, maybe my patch adding linux/mutex.h to ehca_classes.h can go in too? -- MST - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[GIT PULL] please pull infiniband.git for-linus branch
Linus, please pull from master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git for-linus This tree is also available from kernel.org mirrors at: git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-linus This is basically a resend of the small fixes for 2.6.23 that I've already asked you to pull, with the addition of one patch that deletes a stray semicolon. Dotan Barak (3): IB: Include from IB: Include and from IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c Eli Cohen (1): mlx4_core: Wait 1 second after reset before accessing device Hal Rosenstock (3): IB/mad: Fix error path if response alloc fails in ib_mad_recv_done_handler() IB/mad: Fix memory leak in switch handling in ib_mad_recv_done_handler() IB/mad: agent_send_response() should be void Ilpo Järvinen (1): IB/mlx4: Incorrect semicolon after if statement Jack Morgenstein (1): IPoIB: Fix leak in ipoib_transport_dev_init() error path Moni Shoua (1): IB/core: Ignore membership bit in ib_find_pkey() Raghava Kondapalli (1): IB/srp: Add OUI for new Cisco targets Roland Dreier (2): IB/sa: Don't need to check for default P_Key twice IB/srp: Wrap OUI checking for workarounds in helper functions Sean Hefty (1): IB/mad: Fix address handle leak in mad_rmpp Steve Wise (1): RDMA/cxgb3: Always call low level send function via cxgb3_ofld_send() Vu Pham (1): IB/mlx4: Fix opcode returned in RDMA read completion drivers/infiniband/core/agent.c| 24 + drivers/infiniband/core/agent.h|6 ++-- drivers/infiniband/core/device.c |2 +- drivers/infiniband/core/mad.c | 25 +++-- drivers/infiniband/core/mad_rmpp.c |8 +++--- drivers/infiniband/core/sa_query.c |4 +-- drivers/infiniband/core/umem.c |5 drivers/infiniband/hw/cxgb3/iwch_cm.c | 16 +++--- drivers/infiniband/hw/mlx4/cq.c|2 +- drivers/infiniband/hw/mlx4/mad.c |2 +- drivers/infiniband/ulp/ipoib/ipoib_verbs.c |1 + drivers/infiniband/ulp/srp/ib_srp.c| 31 +++ drivers/net/mlx4/reset.c |3 ++ include/rdma/ib_mad.h |2 + include/rdma/ib_verbs.h|7 + 15 files changed, 77 insertions(+), 61 deletions(-) diff --git a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c index db2633e..ae7c288 100644 --- a/drivers/infiniband/core/agent.c +++ b/drivers/infiniband/core/agent.c @@ -78,15 +78,14 @@ ib_get_agent_port(struct ib_device *device, int port_num) return entry; } -int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, - struct ib_wc *wc, struct ib_device *device, - int port_num, int qpn) +void agent_send_response(struct ib_mad *mad, struct ib_grh *grh, +struct ib_wc *wc, struct ib_device *device, +int port_num, int qpn) { struct ib_agent_port_private *port_priv; struct ib_mad_agent *agent; struct ib_mad_send_buf *send_buf; struct ib_ah *ah; - int ret; struct ib_mad_send_wr_private *mad_send_wr; if (device->node_type == RDMA_NODE_IB_SWITCH) @@ -96,23 +95,21 @@ int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, if (!port_priv) { printk(KERN_ERR SPFX "Unable to find port agent\n"); - return -ENODEV; + return; } agent = port_priv->agent[qpn]; ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); if (IS_ERR(ah)) { - ret = PTR_ERR(ah); - printk(KERN_ERR SPFX "ib_create_ah_from_wc error:%d\n", ret); - return ret; + printk(KERN_ERR SPFX "ib_create_ah_from_wc error\n"); + return; } send_buf = ib_create_send_mad(agent, wc->src_qp, wc->pkey_index, 0, IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, GFP_KERNEL); if (IS_ERR(send_buf)) { - ret = PTR_ERR(send_buf); - printk(KERN_ERR SPFX "ib_create_send_mad error:%d\n", ret); + printk(KERN_ERR SPFX "ib_create_send_mad error\n"); goto err1; } @@ -126,16 +123,15 @@ int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, mad_send_wr->send_wr.wr.ud.port_num = port_num; } - if ((ret = ib_post_send_mad(send_buf, NULL))) { - printk(KERN_ERR SPFX "ib_post_send_mad error:%d\n", ret); + if (ib_post_send_mad(send_buf, NULL)) { + printk(KERN_ERR SPFX "ib_post_send_mad error\n"); goto err2; } - return 0; + return; err2:
[GIT PULL] please pull infiniband.git for-linus branch
Linus, please pull from master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git for-linus This tree is also available from kernel.org mirrors at: git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-linus This will get some small fixes for 2.6.23: Dotan Barak (3): IB: Include from IB: Include and from IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c Eli Cohen (1): mlx4_core: Wait 1 second after reset before accessing device Hal Rosenstock (3): IB/mad: Fix error path if response alloc fails in ib_mad_recv_done_handler() IB/mad: Fix memory leak in switch handling in ib_mad_recv_done_handler() IB/mad: agent_send_response() should be void Jack Morgenstein (1): IPoIB: Fix leak in ipoib_transport_dev_init() error path Moni Shoua (1): IB/core: Ignore membership bit in ib_find_pkey() Raghava Kondapalli (1): IB/srp: Add OUI for new Cisco targets Roland Dreier (2): IB/sa: Don't need to check for default P_Key twice IB/srp: Wrap OUI checking for workarounds in helper functions Sean Hefty (1): IB/mad: Fix address handle leak in mad_rmpp Steve Wise (1): RDMA/cxgb3: Always call low level send function via cxgb3_ofld_send() Vu Pham (1): IB/mlx4: Fix opcode returned in RDMA read completion drivers/infiniband/core/agent.c| 24 + drivers/infiniband/core/agent.h|6 ++-- drivers/infiniband/core/device.c |2 +- drivers/infiniband/core/mad.c | 25 +++-- drivers/infiniband/core/mad_rmpp.c |8 +++--- drivers/infiniband/core/sa_query.c |4 +-- drivers/infiniband/core/umem.c |5 drivers/infiniband/hw/cxgb3/iwch_cm.c | 16 +++--- drivers/infiniband/hw/mlx4/cq.c|2 +- drivers/infiniband/ulp/ipoib/ipoib_verbs.c |1 + drivers/infiniband/ulp/srp/ib_srp.c| 31 +++ drivers/net/mlx4/reset.c |3 ++ include/rdma/ib_mad.h |2 + include/rdma/ib_verbs.h|7 + 14 files changed, 76 insertions(+), 60 deletions(-) diff --git a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c index db2633e..ae7c288 100644 --- a/drivers/infiniband/core/agent.c +++ b/drivers/infiniband/core/agent.c @@ -78,15 +78,14 @@ ib_get_agent_port(struct ib_device *device, int port_num) return entry; } -int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, - struct ib_wc *wc, struct ib_device *device, - int port_num, int qpn) +void agent_send_response(struct ib_mad *mad, struct ib_grh *grh, +struct ib_wc *wc, struct ib_device *device, +int port_num, int qpn) { struct ib_agent_port_private *port_priv; struct ib_mad_agent *agent; struct ib_mad_send_buf *send_buf; struct ib_ah *ah; - int ret; struct ib_mad_send_wr_private *mad_send_wr; if (device->node_type == RDMA_NODE_IB_SWITCH) @@ -96,23 +95,21 @@ int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, if (!port_priv) { printk(KERN_ERR SPFX "Unable to find port agent\n"); - return -ENODEV; + return; } agent = port_priv->agent[qpn]; ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); if (IS_ERR(ah)) { - ret = PTR_ERR(ah); - printk(KERN_ERR SPFX "ib_create_ah_from_wc error:%d\n", ret); - return ret; + printk(KERN_ERR SPFX "ib_create_ah_from_wc error\n"); + return; } send_buf = ib_create_send_mad(agent, wc->src_qp, wc->pkey_index, 0, IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, GFP_KERNEL); if (IS_ERR(send_buf)) { - ret = PTR_ERR(send_buf); - printk(KERN_ERR SPFX "ib_create_send_mad error:%d\n", ret); + printk(KERN_ERR SPFX "ib_create_send_mad error\n"); goto err1; } @@ -126,16 +123,15 @@ int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, mad_send_wr->send_wr.wr.ud.port_num = port_num; } - if ((ret = ib_post_send_mad(send_buf, NULL))) { - printk(KERN_ERR SPFX "ib_post_send_mad error:%d\n", ret); + if (ib_post_send_mad(send_buf, NULL)) { + printk(KERN_ERR SPFX "ib_post_send_mad error\n"); goto err2; } - return 0; + return; err2: ib_free_send_mad(send_buf); err1: ib_destroy_ah(ah); - return ret; } static void agent_send_handler(struct ib_mad_agent *mad_agent, diff --git a/drivers/infiniband/core/agent.h b/drivers/infiniband/core/agent.h index 86d72f