IB/hfi1, qib, cm, sa: Last set for 4.15 merge window
Subsystems (3)
cover IB/hfi1, qib, cm, sa: Last set for 4.15 merge window
Hi Doug,
Here is the latest set of patches I have that we'd like to land in 4.15. There are some driver fixes, including a qib that is marked as stable. We also have a CM and SA patch thrown in the mix.
As always patches available for browsing at:
https://github.com/ddalessa/kernel/tree/for-4.15
---
Dennis Dalessandro (1):
IB/hfi1: Initialize bth1 in 16B rc ack builder
Don Hiatt (2):
IB/hfi1: Mask the path bits with the LMC for 16B RC Acks IB/CM: Change sgid to IB GID when handling CM request
Jan Sokolowski (1):
IB/hfi1: Use 4096 for default active MTU in query_qp
Mike Marciniszyn (1):
IB/qib: Fix comparison error with qperf compare/swap test
Venkata Sandeep Dhanalakota (1):
IB/SA: Check dlid before SA agent queries for ClassPortInfo
drivers/infiniband/core/cm.c | 38 ++++++++++++++++++++++++++++++++++-- drivers/infiniband/core/sa_query.c | 10 +++++++++ drivers/infiniband/hw/hfi1/rc.c | 10 +++++---- drivers/infiniband/hw/hfi1/verbs.c | 2 +- drivers/infiniband/hw/qib/qib_rc.c | 6 +++--- 5 files changed, 55 insertions(+), 11 deletions(-)
A message that is not in the archive (sent off-list or not yet received): 20171114122859.10579.79788.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
PATCH 1/6 IB/hfi1: Mask the path bits with the LMC for 16B RC Acks
From: Don Hiatt <[email protected]>
16B packets require that the path bits are masked with the LMC. This mask is done correctly in all 16B header creation but was left out for the RC Acknowledge.
--- drivers/infiniband/hw/hfi1/rc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/infiniband/hw/hfi1/rc.c +4 -4
@@ -843,11 +843,11 @@ static inline void hfi1_make_rc_ack_16B(struct rvt_qp *qp,/* Convert dwords to flits */ len = (*hwords + *nwords) >>1 ; -hfi1_make_16b_hdr (hdr, - ppd->lid |rdma_ah_get_path_bits (&qp->remote_ah_attr), +hfi1_make_16b_hdr (hdr, ppd->lid | + (rdma_ah_get_path_bits (&qp->remote_ah_attr) & + ((1 << ppd->lmc) -1 )),opa_get_lid (rdma_ah_get_dlid (&qp->remote_ah_attr), -16B ), - len, pkey, becn,0 , l4, sc5); +16B ), len, pkey, becn,0 , l4, sc5); bth0 = pkey | (OP (ACKNOWLEDGE ) <<24 ); bth0 |= extra_bytes <<20 ;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171114123413.10579.33655.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Re: [for-next, 1/6] IB/hfi1: Mask the path bits with the LMC for 16B RC Acks
Quoted 11 lines · Dennis Dalessandro
From: Don Hiatt <[email protected]>
16B packets require that the path bits are masked with the LMC. This mask is done correctly in all 16B header creation but was left out for the RC Acknowledge.
Reviewed-by Ira Weiny <[email protected]>Signed-off-by Don Hiatt <[email protected]>Signed-off-by Dennis Dalessandro <[email protected]>drivers/infiniband/hw/hfi1/rc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
Applied 1,4,5,6 of this series to for-next
Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/6 IB/hfi1: Initialize bth1 in 16B rc ack builder
In reply to a message not in the archiveIt is possible the bth1 variable could be used uninitialized so going ahead and giving it a default value.
--- drivers/infiniband/hw/hfi1/rc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/infiniband/hw/hfi1/rc.c +1 -1
@@ -814,7 +814,7 @@ static inline void hfi1_make_rc_ack_16B(struct rvt_qp *qp,struct hfi1_pportdata *ppd =ppd_from_ibp (ibp);struct hfi1_16b_header *hdr = &opa_hdr->opah;struct ib_other_headers *ohdr; -u32 bth0, bth1; +u32 bth0, bth1 =0 ;u16 len, pkey;u8 becn = !!is_fecn;u8 l4 =OPA_16B_L4_IB_LOCAL ;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171114123421.10579.19151.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Re: [for-next,2/6] IB/hfi1: Initialize bth1 in 16B rc ack builder
Quoted 8 lines · Dennis Dalessandro
It is possible the bth1 variable could be used uninitialized so going ahead and giving it a default value.
Fixes 5b6cabb0db77 ("IB/hfi1: Add 16B RC/UC support")Reviewed-by Don Hiatt <[email protected]>Signed-off-by Dennis Dalessandro <[email protected]>drivers/infiniband/hw/hfi1/rc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to for-rc
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/6 IB/SA: Check dlid before SA agent queries for ClassPortInfo
In reply to a message not in the archiveFrom: Venkata Sandeep Dhanalakota <[email protected]>
SA queries SM for class port info when there is a LID_CHANGE event.
When a base lid is configured before fm is started ie when smlid is not yet assigned, SA handles the LID_CHANGE event and tries query SM with lid 0. This will cause an hang.
[ 1106.958820] INFO: task kworker/2:0:23 blocked for more than 120 seconds. [ 1106.965082] Tainted: G O 4.12.0+ #1 [ 1106.969602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1106.977227] kworker/2:0 D 0 23 2 0x00000000 [ 1106.977250] Workqueue: infiniband update_ib_cpi [ib_core] [ 1106.977261] Call Trace: [ 1106.977273] __schedule+0x28e/0x860 [ 1106.977285] schedule+0x36/0x80 [ 1106.977298] schedule_timeout+0x1a3/0x2e0 [ 1106.977310] ? radix_tree_iter_tag_clear+0x1b/0x20 [ 1106.977322] ? idr_alloc+0x64/0x90 [ 1106.977334] wait_for_completion+0xe3/0x140 [ 1106.977347] ? wake_up_q+0x80/0x80 [ 1106.977369] update_ib_cpi+0x163/0x210 [ib_core] [ 1106.977381] process_one_work+0x147/0x370 [ 1106.977394] worker_thread+0x4a/0x390 [ 1106.977406] kthread+0x109/0x140 [ 1106.977418] ? process_one_work+0x370/0x370 [ 1106.977430] ? kthread_park+0x60/0x60 [ 1106.977443] ret_from_fork+0x22/0x30
Always ensure a proper smlid is assigned before querying SM for cpi.
--- drivers/infiniband/core/sa_query.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/infiniband/core/sa_query.c +10 -0
@@ -1345,6 +1345,7 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,static int alloc_mad (struct ib_sa_query *query,gfp_t gfp_mask) { +struct rdma_ah_attr ah_attr;unsigned long flags;spin_lock_irqsave (&query->port->ah_lock, flags);
@@ -1356,6 +1357,15 @@ static int alloc_mad(struct ib_sa_query *query, gfp_t gfp_mask) query->sm_ah = query->port->sm_ah;spin_unlock_irqrestore (&query->port->ah_lock, flags); +/* +* Always check if sm_ah has valid dlid assigned, +* before querying for class port info +*/ +if ((rdma_query_ah (query->sm_ah->ah, &ah_attr) <0 ) || + !rdma_ah_get_dlid (&ah_attr)) { +kref_put (&query->sm_ah->ref, free_sm_ah); +return -EAGAIN ; + } query->mad_buf = ib_create_send_mad(query->port->agent, 1, query->sm_ah->pkey_index, 0, IB_MGMT_SA_HDR, IB_MGMT_SA_DATA,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171114123428.10579.94740.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Re: [PATCH for-next 3/6] IB/SA: Check dlid before SA agent queries for ClassPortInfo
Quoted 54 lines · Dennis Dalessandro
From: Venkata Sandeep Dhanalakota <[email protected]>
SA queries SM for class port info when there is a
LID_CHANGEevent.When a base lid is configured before fm is started ie when smlid is not yet assigned, SA handles the
LID_CHANGEevent and tries query SM with lid 0. This will cause an hang.[ 1106.958820] INFO: task kworker/2:0:23 blocked for more than 120 seconds. [ 1106.965082] Tainted: G O 4.12.0+ #1 [ 1106.969602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1106.977227] kworker/2:0 D 0 23 2 0x00000000 [ 1106.977250] Workqueue: infiniband update_ib_cpi [ib_core] [ 1106.977261] Call Trace: [ 1106.977273] __schedule+0x28e/0x860 [ 1106.977285] schedule+0x36/0x80 [ 1106.977298] schedule_timeout+0x1a3/0x2e0 [ 1106.977310] ? radix_tree_iter_tag_clear+0x1b/0x20 [ 1106.977322] ? idr_alloc+0x64/0x90 [ 1106.977334] wait_for_completion+0xe3/0x140 [ 1106.977347] ? wake_up_q+0x80/0x80 [ 1106.977369] update_ib_cpi+0x163/0x210 [ib_core] [ 1106.977381] process_one_work+0x147/0x370 [ 1106.977394] worker_thread+0x4a/0x390 [ 1106.977406] kthread+0x109/0x140 [ 1106.977418] ? process_one_work+0x370/0x370 [ 1106.977430] ? kthread_park+0x60/0x60 [ 1106.977443] ret_from_fork+0x22/0x30Always ensure a proper smlid is assigned before querying SM for cpi.
Fixes ee1c60b1bff ("IB/SA: Modify SA to implicitly cache Class Port info")Reviewed-by Mike Marciniszyn <[email protected]>Reviewed-by Ira Weiny <[email protected]>Signed-off-by Venkata Sandeep Dhanalakota <[email protected]>Signed-off-by Dennis Dalessandro <[email protected]>--- drivers/infiniband/core/sa_query.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)drivers/infiniband/core/sa_query.c +1
-0@@ -1345,6 +1345,7 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,static int alloc_mad (struct ib_sa_query *query,gfp_t gfp_mask) { +struct rdma_ah_attr ah_attr;unsigned long flags;spin_lock_irqsave (&query->port->ah_lock, flags);
drivers/infiniband/core/sa_query.c static int alloc_mad(struct ib_sa_query *query, gfp_t gfp_mask) · line 1365
Quoted 9 lines
drivers/infiniband/core/sa_query.c +6
-0@@ -1356,6 +1357,15 @@ static int alloc_mad(struct ib_sa_query *query, gfp_t gfp_mask) query->sm_ah = query->port->sm_ah;spin_unlock_irqrestore (&query->port->ah_lock, flags); +/* +* Always check if sm_ah has valid dlid assigned, +* before querying for class port info +*/ +if ((rdma_query_ah (query->sm_ah->ah, &ah_attr) <0 ) || + !rdma_ah_get_dlid (&ah_attr)) {
Isn't valid SM LID more complex than just != 0 ?
For IB, invalid SM LID is != 0 and not in multicast LID range (>= 0xC000 which includes the permissive LID). At a minimum (for at least IB), this check should also include the permissive LID.
-- Hal
Quoted 8 lines
drivers/infiniband/core/sa_query.c +3
-1+kref_put (&query->sm_ah->ref, free_sm_ah); +return -EAGAIN ; + } query->mad_buf = ib_create_send_mad(query->port->agent, 1, query->sm_ah->pkey_index, 0, IB_MGMT_SA_HDR, IB_MGMT_SA_DATA, --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 9f775a16-08b4-033b-7003-93a327bf68f8-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
RE: [PATCH for-next 3/6] IB/SA: Check dlid before SA agent queries for ClassPortInfo
SGkgSGFsLA0KDQpUaGUgcGF0Y2ggaW50ZW5kcyB0byBvbmx5IGNoZWNrIGlmIHNtbGlkIGlzIGFz c2lnbmVkIG9yIG5vdC4gSXQgZG9lcyBub3QgaW50ZW5kIHRvIGNoZWNrIGlmIHNtbGlkIGlzIGEg dmFsaWQgbGlkIG9yIG5vdC4gVmFsaWRpdHkgb2YgbGlkIGlzIHRha2VuIGNhcmUgYnkgdGhlIGlu ZGl2aWR1YWwgZHJpdmVycywgZHVyaW5nIGNyZWF0ZV9haCgpLg0KDQpUaGFua3MsDQpTYW5kZWVw DQoNCi0tLS0tT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9tbyANCj4gaW5mbyBhdCAgaHR0cDovL3Zn ZXIua2VybmVsLm9yZy9tYWpvcmRvbW8taW5mby5odG1sDQo+IA0K
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 8C8FAED8CED26F4C8245E7FC6A20F9062BA45FA1-8oqHQFITsIGkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org
Re: [PATCH for-next 3/6] IB/SA: Check dlid before SA agent queries for ClassPortInfo
Quoted 5 lines · Venkata S
Hi Hal,
The patch intends to only check if smlid is assigned or not. It does not intend to check if smlid is a valid lid or not. Validity of lid is taken care by the individual drivers, during
create_ah().
I think that is Hal's point - there are multiple ways to say 'not assigned' for SMLID, including == 0 and == 0xFFFF
It is best to use !valid as a test for an unassigned SM lid.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 1/1 IB/SA: Check dlid before SA agent queries for ClassPortInfo
In reply to a message not in the archiveFrom: Venkata Sandeep Dhanalakota <[email protected]>
SA queries SM for class port info when there is a LID_CHANGE event.
When a base lid is configured before fm is started ie when smlid is not yet assigned, SA handles the LID_CHANGE event and tries query SM with lid 0. This will cause an hang.
[ 1106.958820] INFO: task kworker/2:0:23 blocked for more than 120 seconds. [ 1106.965082] Tainted: G O 4.12.0+ #1 [ 1106.969602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1106.977227] kworker/2:0 D 0 23 2 0x00000000 [ 1106.977250] Workqueue: infiniband update_ib_cpi [ib_core] [ 1106.977261] Call Trace: [ 1106.977273] __schedule+0x28e/0x860 [ 1106.977285] schedule+0x36/0x80 [ 1106.977298] schedule_timeout+0x1a3/0x2e0 [ 1106.977310] ? radix_tree_iter_tag_clear+0x1b/0x20 [ 1106.977322] ? idr_alloc+0x64/0x90 [ 1106.977334] wait_for_completion+0xe3/0x140 [ 1106.977347] ? wake_up_q+0x80/0x80 [ 1106.977369] update_ib_cpi+0x163/0x210 [ib_core] [ 1106.977381] process_one_work+0x147/0x370 [ 1106.977394] worker_thread+0x4a/0x390 [ 1106.977406] kthread+0x109/0x140 [ 1106.977418] ? process_one_work+0x370/0x370 [ 1106.977430] ? kthread_park+0x60/0x60 [ 1106.977443] ret_from_fork+0x22/0x30
Always ensure a proper smlid is assigned before querying SM for cpi.
---
changes since v1:
Add inline function to check for valid lid
--- drivers/infiniband/core/sa_query.c | 10 ++++++++++ include/rdma/opa_addr.h | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 0 deletions(-)
drivers/infiniband/core/sa_query.c +10 -0
@@ -1345,6 +1345,7 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,static int alloc_mad (struct ib_sa_query *query,gfp_t gfp_mask) { +struct rdma_ah_attr ah_attr;unsigned long flags;spin_lock_irqsave (&query->port->ah_lock, flags);
@@ -1356,6 +1357,15 @@ static int alloc_mad(struct ib_sa_query *query, gfp_t gfp_mask) query->sm_ah = query->port->sm_ah;spin_unlock_irqrestore (&query->port->ah_lock, flags); +/* +* Always check if sm_ah has valid dlid assigned, +* before querying for class port info +*/ +if ((rdma_query_ah (query->sm_ah->ah, &ah_attr) <0 ) || + !rdma_is_valid_unicast_lid (&ah_attr)) { +kref_put (&query->sm_ah->ref, free_sm_ah); +return -EAGAIN ; + } query->mad_buf = ib_create_send_mad(query->port->agent, 1, query->sm_ah->pkey_index, 0, IB_MGMT_SA_HDR, IB_MGMT_SA_DATA,
include/rdma/opa_addr.h +16 -0
@@ -114,4 +114,20 @@ static inline u32 opa_get_mcast_base(u32 nr_top_bits) return (be32_to_cpu(OPA_LID_PERMISSIVE) << (32 - nr_top_bits)); } +/* Check for a valid unicast LID for non-SM traffic types */ +static inline bool rdma_is_valid_unicast_lid (struct rdma_ah_attr *attr) +{ +if (attr->type ==RDMA_AH_ATTR_TYPE_IB ) { +if (!rdma_ah_get_dlid (attr) || +rdma_ah_get_dlid (attr) >= +be32_to_cpu (IB_MULTICAST_LID_BASE )) +return false; + }else if (attr->type ==RDMA_AH_ATTR_TYPE_OPA ) { +if (!rdma_ah_get_dlid (attr) || +rdma_ah_get_dlid (attr) >= +opa_get_mcast_base (OPA_MCAST_NR )) +return false; + } +return true; +}#endif /* OPA_ADDR_H */
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171219032656.13381.35960.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Re: [PATCH v2 for-next] IB/SA: Check dlid before SA agent queries for ClassPortInfo
Quoted 30 lines · Dennis Dalessandro
From: Venkata Sandeep Dhanalakota <[email protected]>
SA queries SM for class port info when there is a
LID_CHANGEevent.When a base lid is configured before fm is started ie when smlid is not yet assigned, SA handles the
LID_CHANGEevent and tries query SM with lid 0. This will cause an hang.[ 1106.958820] INFO: task kworker/2:0:23 blocked for more than 120 seconds. [ 1106.965082] Tainted: G O 4.12.0+ #1 [ 1106.969602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1106.977227] kworker/2:0 D 0 23 2 0x00000000 [ 1106.977250] Workqueue: infiniband update_ib_cpi [ib_core] [ 1106.977261] Call Trace: [ 1106.977273] __schedule+0x28e/0x860 [ 1106.977285] schedule+0x36/0x80 [ 1106.977298] schedule_timeout+0x1a3/0x2e0 [ 1106.977310] ? radix_tree_iter_tag_clear+0x1b/0x20 [ 1106.977322] ? idr_alloc+0x64/0x90 [ 1106.977334] wait_for_completion+0xe3/0x140 [ 1106.977347] ? wake_up_q+0x80/0x80 [ 1106.977369] update_ib_cpi+0x163/0x210 [ib_core] [ 1106.977381] process_one_work+0x147/0x370 [ 1106.977394] worker_thread+0x4a/0x390 [ 1106.977406] kthread+0x109/0x140 [ 1106.977418] ? process_one_work+0x370/0x370 [ 1106.977430] ? kthread_park+0x60/0x60 [ 1106.977443] ret_from_fork+0x22/0x30
Quoted 1 line
Always ensure a proper smlid is assigned before querying SM for cpi.
Shouldn't we do something about this long hang as well?
Quoted 4 lines
Fixes ee1c60b1bff ("IB/SA: Modify SA to implicitly cache Class Port info")Reviewed-by Ira Weiny <[email protected]>Signed-off-by Venkata Sandeep Dhanalakota <[email protected]>Signed-off-by Dennis Dalessandro <[email protected]>
Otherwise seems like a reasonable step to me..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 for-next] IB/SA: Check dlid before SA agent queries for ClassPortInfo
In reply to a message not in the archiveQuoted 30 lines · Dennis Dalessandro
From: Venkata Sandeep Dhanalakota <[email protected]>
SA queries SM for class port info when there is a
LID_CHANGEevent.When a base lid is configured before fm is started ie when smlid is not yet assigned, SA handles the
LID_CHANGEevent and tries query SM with lid 0. This will cause an hang.[ 1106.958820] INFO: task kworker/2:0:23 blocked for more than 120 seconds. [ 1106.965082] Tainted: G O 4.12.0+ #1 [ 1106.969602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1106.977227] kworker/2:0 D 0 23 2 0x00000000 [ 1106.977250] Workqueue: infiniband update_ib_cpi [ib_core] [ 1106.977261] Call Trace: [ 1106.977273] __schedule+0x28e/0x860 [ 1106.977285] schedule+0x36/0x80 [ 1106.977298] schedule_timeout+0x1a3/0x2e0 [ 1106.977310] ? radix_tree_iter_tag_clear+0x1b/0x20 [ 1106.977322] ? idr_alloc+0x64/0x90 [ 1106.977334] wait_for_completion+0xe3/0x140 [ 1106.977347] ? wake_up_q+0x80/0x80 [ 1106.977369] update_ib_cpi+0x163/0x210 [ib_core] [ 1106.977381] process_one_work+0x147/0x370 [ 1106.977394] worker_thread+0x4a/0x390 [ 1106.977406] kthread+0x109/0x140 [ 1106.977418] ? process_one_work+0x370/0x370 [ 1106.977430] ? kthread_park+0x60/0x60 [ 1106.977443] ret_from_fork+0x22/0x30
Quoted 6 lines
Always ensure a proper smlid is assigned before querying SM for cpi.
Fixes ee1c60b1bff ("IB/SA: Modify SA to implicitly cache Class Port info")Reviewed-by Ira Weiny <[email protected]>Signed-off-by Venkata Sandeep Dhanalakota <[email protected]>Signed-off-by Dennis Dalessandro <[email protected]>
Took it to for-next
Although I am unclear why a bad SM lid should cause a hang? Doesn't like seem like a bug unto itself?
Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): bbf566a9-0d8d-c6f8-da54-8244cebdfea8-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
RE: Re: [PATCH v2 for-next] IB/SA: Check dlid before SA agent queries for ClassPortInfo
Hi Jason,
Yes it is a bug to hang on bad SM lid. While root causing the hang, I thought it is better to add some logic that will prevent sending the packets with bad dlid in first place.
Thank you,
Sandeep
Quoted 26 lines · Dennis Dalessandro
From: Venkata Sandeep Dhanalakota <[email protected]>
SA queries SM for class port info when there is a
LID_CHANGEevent.When a base lid is configured before fm is started ie when smlid is not yet assigned, SA handles the
LID_CHANGEevent and tries query SM with lid 0. This will cause an hang.[ 1106.958820] INFO: task kworker/2:0:23 blocked for more than 120 seconds. [ 1106.965082] Tainted: G O 4.12.0+ #1 [ 1106.969602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1106.977227] kworker/2:0 D 0 23 2 0x00000000 [ 1106.977250] Workqueue: infiniband update_ib_cpi [ib_core] [ 1106.977261] Call Trace: [ 1106.977273] __schedule+0x28e/0x860 [ 1106.977285] schedule+0x36/0x80 [ 1106.977298] schedule_timeout+0x1a3/0x2e0 [ 1106.977310] ? radix_tree_iter_tag_clear+0x1b/0x20 [ 1106.977322] ? idr_alloc+0x64/0x90 [ 1106.977334] wait_for_completion+0xe3/0x140 [ 1106.977347] ? wake_up_q+0x80/0x80 [ 1106.977369] update_ib_cpi+0x163/0x210 [ib_core] [ 1106.977381] process_one_work+0x147/0x370 [ 1106.977394] worker_thread+0x4a/0x390 [ 1106.977406] kthread+0x109/0x140 [ 1106.977418] ? process_one_work+0x370/0x370 [ 1106.977430] ? kthread_park+0x60/0x60 [ 1106.977443] ret_from_fork+0x22/0x30
Quoted 8 lines
Always ensure a proper smlid is assigned before querying SM for cpi.
Fixes ee1c60b1bff ("IB/SA: Modify SA to implicitly cache Class Portinfo")
Reviewed-by Ira Weiny <[email protected]>Signed-off-by Venkata Sandeep DhanalakotaSigned-off-by Dennis Dalessandro <[email protected]>
Took it to for-next
Although I am unclear why a bad SM lid should cause a hang? Doesn't like seem like a bug unto itself?
Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 4/6 IB/CM: Change sgid to IB GID when handling CM request
In reply to a message not in the archiveFrom: Don Hiatt <[email protected]>
ULPs do not understand OPA GIDs and will reject CM requests if the sgid does not match the local_gid. In order to fix this behavior we convert the OPA GID back to an IB GID.
--- drivers/infiniband/core/cm.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-)
drivers/infiniband/core/cm.c +36 -2
@@ -1560,6 +1560,37 @@ static u16 cm_get_bth_pkey(struct cm_work *work)return pkey; } +/** +* Convert OPA SGID to IB SGID +* ULPs (such as IPoIB) do not understand OPA GIDs and will +* reject them as the local_gid will not match the sgid. Therefore, +* change the pathrec's SGID to an IB SGID. +* +* @work: Work completion +* @path: Path record +*/ +static void cm_opa_to_ib_sgid (struct cm_work *work, +struct sa_path_rec *path) +{ +struct ib_device *dev = work->port->cm_dev->ib_device; +struct ib_gid_attr gid_attr; +u8 port_num = work->port->port_num; + +if (rdma_cap_opa_ah (dev, port_num) && + (ib_is_opa_gid (&path->sgid))) { +union ib_gid sgid; + +if (ib_get_cached_gid (dev, port_num,0 , + &sgid, &gid_attr)) { +dev_warn (&dev->dev, +"Error updating sgid in CM request\n" ); +return ; + } + + path->sgid = sgid; + } +} +static void cm_format_req_event (struct cm_work *work,struct cm_id_private *cm_id_priv,struct ib_cm_id *listen_id)
@@ -1573,10 +1604,13 @@ static void cm_format_req_event(struct cm_work *work, param->bth_pkey =cm_get_bth_pkey (work); param->port = cm_id_priv->av.port->port_num; param->primary_path = &work->path[0 ]; -if (req_msg->alt_local_lid) +cm_opa_to_ib_sgid (work, param->primary_path); +if (cm_req_has_alt_path (req_msg)) { param->alternate_path = &work->path[1 ]; -else +cm_opa_to_ib_sgid (work, param->alternate_path); + }else { param->alternate_path =NULL ; + } param->remote_ca_guid = req_msg->local_ca_guid; param->remote_qkey =be32_to_cpu (req_msg->local_qkey); param->remote_qpn =be32_to_cpu (cm_req_get_local_qpn (req_msg));
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171114123436.10579.95655.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
RE: [PATCH for-next 4/6] IB/CM: Change sgid to IB GID when handling CM request
SGkgRGVubmlzLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IGxpbnV4 LXJkbWEtb3duZXJAdmdlci5rZXJuZWwub3JnIFttYWlsdG86bGludXgtcmRtYS0NCj4gb3duZXJA dmdlci5rZXJuZWwub3JnXSBPbiBCZWhhbGYgT2YgRGVubmlzIERhbGVzc2FuZHJvDQo+IFNlbnQ6 IFR1ZXNkYXksIE5vdmVtYmVyIDE0LCAyMDE3IDY6MzUgQU0NCj4gVG86IGRsZWRmb3JkQHJlZGhh dC5jb20NCj4gQ2M6IGxpbn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k7DQo+ICAJcGFyYW0tPnJlbW90ZV9xcG4gPSBiZTMyX3RvX2NwdShjbV9yZXFf Z2V0X2xvY2FsX3FwbihyZXFfbXNnKSk7DQo+IA0KPiAtLQ0KPiBUbyB1bnN1YnNjcmliZSBmcm9t IHRoaXMgbGlzdDogc2VuZCB0aGUgbGluZSAidW5zdWJzY3JpYmUgbGludXgtcmRtYSIgaW4gdGhl IGJvZHkNCj4gb2YgYSBtZXNzYWdlIHRvIG1ham9yZG9tb0B2Z2VyLmtlcm5lbC5vcmcgTW9yZSBt YWpvcmRvbW8gaW5mbyBhdA0KPiBodHRwOi8vdmdlci5rZXJuZWwub3JnL21ham9yZG9tby1pbmZv Lmh0bWwNCg==
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): VI1PR0502MB3008698B4478B2973FE1FA27D1280-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/[email protected]
Re: [PATCH for-next 4/6] IB/CM: Change sgid to IB GID when handling CM request
Hi Parav,
Quoted 34 lines · Parav Pandit
Hi Dennis,
Quoted 32 lines
-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Dennis Dalessandro
Sent: Tuesday, November 14, 2017 6:35 AM
To: [email protected]
Cc: [email protected]; Don Hiatt <[email protected]>; Ira Weiny <[email protected]>
Subject: [PATCH for-next 4/6] IB/CM: Change sgid to IB GID when handling CM
requestFrom: Don Hiatt <[email protected]>
ULPs do not understand OPA GIDs and will reject CM requests if the sgid does not match the
local_gid. In order to fix this behavior we convert the OPA GID back to an IB GID.Reviewed-by Ira Weiny <[email protected]>Signed-off-by Don Hiatt <[email protected]>Signed-off-by Dennis Dalessandro <[email protected]>--- drivers/infiniband/core/cm.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-)drivers/infiniband/core/cm.c index renamed from drivers/infiniband/core/cm.c +0
-05927ee4..f9f6f5e 100644
drivers/infiniband/core/cm.c +0
-0@@ -1560,6 +1560,37 @@ static u16 cm_get_bth_pkey(struct cm_work *work)return pkey; }
Quoted 9 lines
drivers/infiniband/core/cm.c static u16 cm_get_bth_pkey(struct cm_work *work) · line 1568
Quoted 6 lines
drivers/infiniband/core/cm.c +6
-0+/** +* Convert OPA SGID to IB SGID +* ULPs (such as IPoIB) do not understand OPA GIDs and will +* reject them as the local_gid will not match the sgid. Therefore, +* change the pathrec's SGID to an IB SGID. +* Address and other conversions are in
ib_sa.hsuch aspath_conv_opa_to_ib(). Dopath_conv_opa_to_ibfunction also need such opa to ib gid conversion? Can you placecm_opa_to_ib_sgidfunction incore/addr.cas it deals with addresses.
Since this function is only used by the CM (and is only necessary because the responder is not performing a path record query itself, while the requester has already done query for us) there is no point in moving it to core/addr.c. Further, if we do move the function there, we will have to include all the required include files (pathrec, wc, helper functions) . Given the limited applicability of this function I prefer to keep it as a static function as it is.
Quoted 1 line
While replying back to CM request, is it ok to reply back with IB GID and reverse conversion not needed or it replies with OPA GID?
Yes, it is okay to reply back with an IB GID and we do not need the reverse conversion (effectively they are the same thing as the requester in this case has already done a pathrec query and does nothing with the reply, and, even if it does the requester already has the IB gid and will know how to resolve it).
Quoted 8 lines
Quoted 8 lines
drivers/infiniband/core/cm.c +8
-0+* @work: Work completion +* @path: Path record +*/ +static void cm_opa_to_ib_sgid (struct cm_work *work, +struct sa_path_rec *path) +{ +struct ib_device *dev = work->port->cm_dev->ib_device; +struct ib_gid_attr gid_attr;
Quoted 8 lines
drivers/infiniband/core/cm.c static u16 cm_get_bth_pkey(struct cm_work *work) · line 1583
Quoted 7 lines
drivers/infiniband/core/cm.c +7
-0+u8 port_num = work->port->port_num; + +if (rdma_cap_opa_ah (dev, port_num) && + (ib_is_opa_gid (&path->sgid))) { +union ib_gid sgid; + + if (ib_get_cached_gid(dev, port_num, 0,Only gid 0 needs conversion?
Yes, because gid 1 is the OPA gid (per the OPA spec there is only one gid per port so gid 1 is a caching point for the opa gid).
Quoted 2 lines
drivers/infiniband/core/cm.c static u16 cm_get_bth_pkey(struct cm_work *work) · line 1584
Quoted 1 line
drivers/infiniband/core/cm.c +1
-0+ &sgid, &gid_attr)) {Since gid attribute is not used here and applicable to RoCE and its optional, can you pass NULL and avoid
gid_attr?
Will do.
Quoted 30 lines
Quoted 30 lines
drivers/infiniband/core/cm.c +14
-2+dev_warn (&dev->dev, +"Error updating sgid in CM request\n" ); +return ; + } + + path->sgid = sgid; + } +} +static void cm_format_req_event (struct cm_work *work,struct cm_id_private *cm_id_priv,struct ib_cm_id *listen_id)@@ -1573,10 +1604,13 @@ static void cm_format_req_event(struct cm_work *work, param->bth_pkey =cm_get_bth_pkey (work); param->port = cm_id_priv->av.port->port_num; param->primary_path = &work->path[0 ]; -if (req_msg->alt_local_lid) +cm_opa_to_ib_sgid (work, param->primary_path); +if (cm_req_has_alt_path (req_msg)) { param->alternate_path = &work->path[1 ]; -else +cm_opa_to_ib_sgid (work, param->alternate_path); + }else { param->alternate_path =NULL ; + } param->remote_ca_guid = req_msg->local_ca_guid; param->remote_qkey =be32_to_cpu (req_msg->local_qkey);param->remote_qpn = be32_to_cpu(cm_req_get_local_qpn(req_msg));
Quoted 4 lines
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 3d9177ff-b546-15aa-b237-e776e82dac1d-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
RE: [PATCH for-next 4/6] IB/CM: Change sgid to IB GID when handling CM request
SGkgRG9uLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IERvbiBIaWF0 dCBbbWFpbHRvOmRvbi5o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ZzZ2lkLCAmZ2lkX2F0 dHIpKSB7DQo+ID4gU2luY2UgZ2lkIGF0dHJpYnV0ZSBpcyBub3QgdXNlZCBoZXJlIGFuZCBhcHBs aWNhYmxlIHRvIFJvQ0UgYW5kIGl0cyBvcHRpb25hbCwgY2FuDQo+IHlvdSBwYXNzIE5VTEwgYW5k IGF2b2lkIGdpZF9hdHRyPw0KPiBXaWxsIGRvLg0KT2suIFRoYW5rcy4NCg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 5/6 IB/hfi1: Use 4096 for default active MTU in query_qp
In reply to a message not in the archiveFrom: Jan Sokolowski <[email protected]>
Currently, if a port is queried that has an invalid Maximum Transmission Unit, driver reports default MTU of 2048. This in incorrect.
Use default value of 4096 if invalid.
--- drivers/infiniband/hw/hfi1/verbs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/infiniband/hw/hfi1/verbs.c +1 -1
@@ -1486,7 +1486,7 @@ static int query_port(struct rvt_dev_info *rdi, u8 port_num, props->max_mtu =mtu_to_enum ((!valid_ib_mtu (hfi1_max_mtu) ?4096 : hfi1_max_mtu),IB_MTU_4096 ); props->active_mtu = !valid_ib_mtu (ppd->ibmtu) ? props->max_mtu : -mtu_to_enum (ppd->ibmtu,IB_MTU_2048 ); +mtu_to_enum (ppd->ibmtu,IB_MTU_4096 );/* * sm_lid of 0xFFFF needs special handling so that it can
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Dennis Dalessandro
Hi Doug,
Here is the latest set of patches I have that we'd like to land in 4.15. There are some driver fixes, including a qib that is marked as stable. We also have a CM and SA patch thrown in the mix.
Quoted 7 lines
As always patches available for browsing at:
https://github.com/ddalessa/kernel/tree/for-4.15---
Dennis Dalessandro (1):
IB/hfi1: Initialize bth1 in 16B rc ack builder
This is probably the only one that really needs to go for the rc. The rest can push off till 4.16 I think. This is trivial and prevents use of an uninitialized variable.
Quoted 3 lines
Don Hiatt (2):
IB/hfi1: Mask the path bits with the LMC for 16B RC Acks IB/CM: Change sgid to IB GID when handling CM request
These two fix problems introduced in 4.13
Quoted 2 lines
Jan Sokolowski (1):
IB/hfi1: Use 4096 for default active MTU inquery_qp
This is not a critical bug fix.
Quoted 2 lines
Mike Marciniszyn (1):
IB/qib: Fix comparison error with qperf compare/swap test
This one is an older bug in qib.
Quoted 2 lines
Venkata Sandeep Dhanalakota (1):
IB/SA: Check dlid before SA agent queries for ClassPortInfo
Still under discussion/rework.
Jason, if you want to pull:
https://patchwork.kernel.org/patch/10057487/
for the -rc I can submit a v2 of the other 5 once Sandeep's rework is ready.
-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 0b5b45ef-9a05-7c89-7926-27d097bae68e-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
SGkgRGVubmlzLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IGxpbnV4 LXJkbWEtb3duZXJAdmdlci5rZXJuZWwub3JnIFttYWlsdG86bGludXgtcmRtYS0NCj4gb3duZXJA dmdlci5rZXJuZWwub3JnXSBPbiBCZWhhbGYgT2YgRGVubmlzIERhbGVzc2FuZHJvDQo+IFNlbnQ6 IFdlZG5lc2RheSwgTm92ZW1iZXIgMjksIDIwMTcgMTI6NDMgUE0NCj4gVG86IGRsZWRmb3JkQHJl ZGhhdC5jb207IEphc29uIEd1bnRob3JwZSA8amdnQHppZXBlLmNhPg0KPiBDYzogTWlrZSBNYXJj aW5pc3p5biA8bWlrZS5tYXJjaW5pc3p5bkBpbnRlbC5jb20+OyBKYW4gU29rb2xvd3NraQ0KPiA8 amFuLnNva29sb3dza2lAaW50ZWwuY29tPjsgbGludXgtcmRtYUB2Z2Vy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F0YSBTYW5kZWVwIERoYW5hbGFrb3RhICgxKToNCj4gPiAg ICAgICAgSUIvU0E6IENoZWNrIGRsaWQgYmVmb3JlIFNBIGFnZW50IHF1ZXJpZXMgZm9yIENsYXNz UG9ydEluZm8NCj4gDQo+IFN0aWxsIHVuZGVyIGRpc2N1c3Npb24vcmV3b3JrLg0KPiANCj4gSmFz b24sIGlmIHlvdSB3YW50IHRvIHB1bGw6DQo+IGh0dHBzOi8vcGF0Y2h3b3JrLmtlcm5lbC5vcmcv cGF0Y2gvMTAwNTc0ODcvDQo+IGZvciB0aGUgLXJjIEkgY2FuIHN1Ym1pdCBhIHYyIG9mIHRoZSBv dGhlciA1IG9uY2UgU2FuZGVlcCdzIHJld29yayBpcyByZWFkeS4NCj4gDQo+IC1EZW5ueQ0KPiAN Cj4gDQo+IC0tDQo+IFRvIHVuc3Vic2NyaWJlIGZyb20gdGhpcyBsaXN0OiBzZW5kIHRoZSBsaW5l ICJ1bnN1YnNjcmliZSBsaW51eC1yZG1hIiBpbiB0aGUgYm9keQ0KPiBvZiBhIG1lc3NhZ2UgdG8g bWFqb3Jkb21vQHZnZXIua2VybmVsLm9yZyBNb3JlIG1ham9yZG9tbyBpbmZvIGF0DQo+IGh0dHA6 Ly92Z2VyLmtlcm5lbC5vcmcvbWFqb3Jkb21vLWluZm8uaHRtbA0K
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): VI1PR0502MB3008FD5232D8F5CECAD4BB9AD13B0-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/[email protected]
Quoted 29 lines · Parav Pandit
Hi Dennis,
Quoted 27 lines
-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Dennis Dalessandro
Sent: Wednesday, November 29, 2017 12:43 PM
To: [email protected]; Jason Gunthorpe <jgg-uk2M96/[email protected]>
Cc: Mike Marciniszyn <[email protected]>; Jan Sokolowski <[email protected]>; [email protected]; Michael J. Ruhl <[email protected]>; Venkata Sandeep Dhanalakota <[email protected]>; Don Hiatt <[email protected]>; Ira Weiny <[email protected]>
Subject: Re: [PATCH for-next 0/6] IB/hfi1, qib, cm, sa: Last set for 4.15 merge
windowQuoted 13 lines · Dennis Dalessandro
Hi Doug,
Here is the latest set of patches I have that we'd like to land in 4.15. There are some driver fixes, including a qib that is marked as stable. We also have a CM and SA patch thrown in the mix.
As always patches available for browsing at:
https://github.com/ddalessa/kernel/tree/for-4.15---
Dennis Dalessandro (1):
IB/hfi1: Initialize bth1 in 16B rc ack builder
Quoted 9 lines
Quoted 6 lines
This is probably the only one that really needs to go for the rc. The rest can push off till 4.16 I think. This is trivial and prevents use of an uninitialized variable.
Quoted 3 lines
Don Hiatt (2):
IB/hfi1: Mask the path bits with the LMC for 16B RC Acks IB/CM: Change sgid to IB GID when handling CM requestThere are couple of queries and inputs to amend above patch of IB/CM. Did you get a chance to address them?
Hi Parva,
Sorry, I totally missed your comments. I'll look at the archive and address them.
Thanks,
don
Quoted 18 lines
Quoted 18 lines
These two fix problems introduced in 4.13
Quoted 2 lines
Jan Sokolowski (1):
IB/hfi1: Use 4096 for default active MTU inquery_qpThis is not a critical bug fix.
Quoted 2 lines
Mike Marciniszyn (1):
IB/qib: Fix comparison error with qperf compare/swap testThis one is an older bug in qib.
Quoted 2 lines
Venkata Sandeep Dhanalakota (1):
IB/SA: Check dlid before SA agent queries for ClassPortInfoStill under discussion/rework.
Jason, if you want to pull:
https://patchwork.kernel.org/patch/10057487/
for the -rc I can submit a v2 of the other 5 once Sandeep's rework is ready.
Quoted 7 lines
Quoted 7 lines
-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Dennis Dalessandro
Jason, if you want to pull:
https://patchwork.kernel.org/patch/10057487/
for the -rc I can submit a v2 of the other 5 once Sandeep's rework is ready.
Okay thanks, patchworks reflects this now.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 6/6 IB/qib: Fix comparison error with qperf compare/swap test
In reply to Dennis DalessandroFrom: Mike Marciniszyn <[email protected]>
This failure exists with qib:
ver_rc_compare_swap:
mismatch, sequence 2, expected 123456789abcdef, got 0
The request builder was using the incorrect inlines to build the request header resulting in incorrect data in the atomic header.
Fix by using the appropriate inlines to create the request.
--- drivers/infiniband/hw/qib/qib_rc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/qib/qib_rc.c +3 -3
@@ -434,13 +434,13 @@ int qib_make_rc_req(struct rvt_qp *qp, unsigned long *flags) qp->s_state =OP (COMPARE_SWAP );put_ib_ateth_swap (wqe->atomic_wr.swap, &ohdr->u.atomic_eth); -put_ib_ateth_swap (wqe->atomic_wr.compare_add, - &ohdr->u.atomic_eth); +put_ib_ateth_compare (wqe->atomic_wr.compare_add, + &ohdr->u.atomic_eth); }else { qp->s_state =OP (FETCH_ADD );put_ib_ateth_swap (wqe->atomic_wr.compare_add, &ohdr->u.atomic_eth); -put_ib_ateth_swap (0 , &ohdr->u.atomic_eth); +put_ib_ateth_compare (0 , &ohdr->u.atomic_eth); }put_ib_ateth_vaddr (wqe->atomic_wr.remote_addr, &ohdr->u.atomic_eth);