IB/hfi1: First round of fixes for 4.7
Subsystems (3)
cover IB/hfi1: First round of fixes for 4.7
These patches do some clean ups and fix issues which may not be appropriate for an RC so we are targeting these for 4.7. The current patch series applies on top of the "Important bug fixes for 4.6 RC" patch set submitted just prior to this.
Patches can be viewed in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.7.
---
Dean Luick (13):
IB/hfi1: Fix sysfs file offset usage
IB/hfi1: Fix i2c resource reservation checks IB/hfi1: Fix QOS num_vl bit width
IB/hfi1: Remove invalid QOS check
IB/hfi1: Fix QOS rule mappings
IB/hfi1: Correctly obtain the full service class IB/hfi1: Simplify init_qpmap_table()
IB/hfi1: Guard against concurrent I2C access across all chains IB/hfi1: Fix double QSFP resource acquire on cache refresh IB/hfi1: Extract RSM map table init from QOS IB/hfi1: Move QOS decision logic into its own function IB/hfi1: Create a routine to set a receive side mapping rule IB/hfi1: Add RSM rule for user FECN handling
Easwar Hariharan (2):
IB/hfi1: Always turn on CDRs for low power QSFP modules IB/hfi1: Remove module presence check outside pre-LNI checks
Jianxin Xiong (1):
IB/hfi1: Reduce kernel context pio buffer allocation
Jubin John (1):
IB/hfi1: Change default number of user contexts
Mike Marciniszyn (2):
IB/hfi1: Remove unreachable code
IB/hfi1: Use global defines for upper bits in opcode
Sebastian Sanchez (2):
IB/hfi1: Adjust default MTU to be 10KB IB/hfi1: Check P_KEY for all sent packets from user mode
drivers/infiniband/sw/rdmavt/qp.c | 6 drivers/staging/rdma/hfi1/affinity.c | 93 +++-- drivers/staging/rdma/hfi1/affinity.h | 19 + drivers/staging/rdma/hfi1/chip.c | 485 +++++++++++++++++++--------- drivers/staging/rdma/hfi1/chip.h | 1 drivers/staging/rdma/hfi1/chip_registers.h | 1 drivers/staging/rdma/hfi1/diag.c | 3 drivers/staging/rdma/hfi1/driver.c | 3 drivers/staging/rdma/hfi1/firmware.c | 9 - drivers/staging/rdma/hfi1/hfi.h | 11 - drivers/staging/rdma/hfi1/init.c | 1 drivers/staging/rdma/hfi1/pio.c | 52 ++- drivers/staging/rdma/hfi1/pio.h | 4 drivers/staging/rdma/hfi1/platform.c | 99 +++--- drivers/staging/rdma/hfi1/qp.c | 6 drivers/staging/rdma/hfi1/qsfp.c | 58 ++- drivers/staging/rdma/hfi1/qsfp.h | 15 - drivers/staging/rdma/hfi1/rc.c | 2 drivers/staging/rdma/hfi1/sysfs.c | 4 drivers/staging/rdma/hfi1/user_sdma.c | 7 drivers/staging/rdma/hfi1/verbs.c | 108 ++++-- drivers/staging/rdma/hfi1/verbs.h | 3 22 files changed, 639 insertions(+), 351 deletions(-)
Signature · 5 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
A message that is not in the archive (sent off-list or not yet received): 20160412174746.24485.92280.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
PATCH 1/21 IB/hfi1: Fix sysfs file offset usage
From: Dean Luick <[email protected]>
Two sysfs files do not pay attention to the file offset when reading data. Fix that.
--- drivers/staging/rdma/hfi1/sysfs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rdma/hfi1/sysfs.c +2 -2
@@ -84,7 +84,7 @@ static ssize_t read_cc_table_bin(struct file *filp, struct kobject *kobj,rcu_read_unlock ();return -EINVAL ; } -memcpy (buf, &cc_state->cct, count); +memcpy (buf, (void *)&cc_state->cct + pos, count);rcu_read_unlock ();return count;
@@ -131,7 +131,7 @@ static ssize_t read_cc_setting_bin(struct file *filp, struct kobject *kobj,rcu_read_unlock ();return -EINVAL ; } -memcpy (buf, &cc_state->cong_setting, count); +memcpy (buf, (void *)&cc_state->cong_setting + pos, count);rcu_read_unlock ();return count;
--
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/21 IB/hfi1: Fix i2c resource reservation checks
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
The i2c and qsfp read/write routines should check for the resource reservation of the incoming argument target rather than the implicit target of the hardware HFI.
--- drivers/staging/rdma/hfi1/qsfp.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rdma/hfi1/qsfp.c +4 -4
@@ -96,7 +96,7 @@ int i2c_write(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, int offset, {int ret; -if (!check_chip_resource (ppd->dd,qsfp_resource (ppd->dd), __func__)) +if (!check_chip_resource (ppd->dd,i2c_target (target), __func__))return -EACCES ;/* make sure the TWSI bus is in a sane state */
@@ -162,7 +162,7 @@ int i2c_read(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, int offset, {int ret; -if (!check_chip_resource (ppd->dd,qsfp_resource (ppd->dd), __func__)) +if (!check_chip_resource (ppd->dd,i2c_target (target), __func__))return -EACCES ;/* make sure the TWSI bus is in a sane state */
@@ -192,7 +192,7 @@ int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,int ret;u8 page; -if (!check_chip_resource (ppd->dd,qsfp_resource (ppd->dd), __func__)) +if (!check_chip_resource (ppd->dd,i2c_target (target), __func__))return -EACCES ;/* make sure the TWSI bus is in a sane state */
@@ -276,7 +276,7 @@ int qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,int ret;u8 page; -if (!check_chip_resource (ppd->dd,qsfp_resource (ppd->dd), __func__)) +if (!check_chip_resource (ppd->dd,i2c_target (target), __func__))return -EACCES ;/* make sure the TWSI bus is in a sane state */
--
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/21 IB/hfi1: Fix QOS num_vl bit width
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
The bit width for num_vls, n, needs to be calculated based on the pow2 rounded up of the number of vls. Otherwise num_vls of 3, 5, 6, and 7 will have misplaced QOS RSM map entries.
--- drivers/staging/rdma/hfi1/chip.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rdma/hfi1/chip.c +1 -1
@@ -13508,7 +13508,7 @@ static void init_qos(struct hfi1_devdata *dd, u32 first_ctxt) goto bail; qpns_per_vl =__roundup_pow_of_two (max_by_vl);/* determine bits vl */ - n =ilog2 (num_vls); + n =ilog2 (__roundup_pow_of_two (num_vls));/* determine bits for qpn */ m =ilog2 (qpns_per_vl);if ((m + n) >7 )
--
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/21 IB/hfi1: Remove invalid QOS check
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
Remove an invalid compare of the number of QOS RSM map table entries against the number of physical receive contexts. The RSM map table has its own size and has no relation to the number of physical receive contexts.
--- drivers/staging/rdma/hfi1/chip.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/staging/rdma/hfi1/chip.c +0 -2
@@ -13513,8 +13513,6 @@ static void init_qos(struct hfi1_devdata *dd, u32 first_ctxt) m =ilog2 (qpns_per_vl);if ((m + n) >7 ) goto bail; -if (num_vls * qpns_per_vl > dd->chip_rcv_contexts) - goto bail; rsmmap =kmalloc_array (NUM_MAP_REGS ,sizeof (u64),GFP_KERNEL );if (!rsmmap) goto bail;
--
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/21 IB/hfi1: Fix QOS rule mappings
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
The QOS RSM rule mappings are off by one, referencing a kernel receive context that does not exist.
Correctly start the QOS RSM map entries at FIRST_KERNEL_CONTEXT rather than MIN_KERNEL_KCTXTS. Remove the cruft that hid this.
Change the QP map table so all traffic not caught by QOS RSM goes to the control context rather than the first QOS context.
Correct comments to match the actual code operation and intent.
--- drivers/staging/rdma/hfi1/chip.c | 48 +++++++++++++++++--------------------- 1 files changed, 21 insertions(+), 27 deletions(-)
drivers/staging/rdma/hfi1/chip.c +21 -27
@@ -12675,20 +12675,20 @@ static int set_up_context_variables(struct hfi1_devdata *dd)unsigned ngroups;/* -* Kernel contexts: (to be fixed later): -* - min or 2 or 1 context/numa +* Kernel receive contexts: +* - min of 2 or 1 context/numa (excluding control context) * - Context 0 - control context (VL15/multicast/error) -* - Context 1 - default context +* - Context 1 - first kernel context +* - Context 2 - second kernel context +* ... */ if (n_krcvqs)/* -* Don't count context 0 in n_krcvqs since -* is isn't used for normal verbs traffic. -* -* krcvqs will reflect number of kernel -* receive contexts above 0. +* n_krcvqs is the sum of module parameter kernel receive +* contexts, krcvqs[]. It does not include the control +* context, so add that. */ - num_kernel_contexts = n_krcvqs +MIN_KERNEL_KCTXTS -1 ; + num_kernel_contexts = n_krcvqs +1 ;else num_kernel_contexts =num_online_nodes () +1 ; num_kernel_contexts =
@@ -13473,22 +13473,17 @@ static void init_qpmap_table(struct hfi1_devdata *dd,/** * init_qos - init RX qos * @dd - device data -* @first_context -* -* This routine initializes Rule 0 and the -* RSM map table to implement qos. * -* If all of the limit tests succeed, -* qos is applied based on the array -* interpretation of krcvqs where -* entry 0 is VL0. +* This routine initializes Rule 0 and the RSM map table to implement +* quality of service (qos). * -* The number of vl bits (n) and the number of qpn -* bits (m) are computed to feed both the RSM map table -* and the single rule. +* If all of the limit tests succeed, qos is applied based on the array +* interpretation of krcvqs where entry 0 is VL0. * +* The number of vl bits (n) and the number of qpn bits (m) are computed to +* feed both the RSM map table and the single rule. */ -static void init_qos (struct hfi1_devdata *dd,u32 first_ctxt) +static void init_qos (struct hfi1_devdata *dd) {u8 max_by_vl =0 ;unsigned qpns_per_vl, ctxt, i, qpn, n =1 , m;
@@ -13518,7 +13513,7 @@ static void init_qos(struct hfi1_devdata *dd, u32 first_ctxt) goto bail;memset (rsmmap, rxcontext,NUM_MAP_REGS *sizeof (u64));/* init the local copy of the table */ -for (i =0 , ctxt = first_ctxt; i < num_vls; i++) { +for (i =0 , ctxt =FIRST_KERNEL_KCTXT ; i < num_vls; i++) {unsigned tctxt; for (qpn = 0, tctxt = ctxt;
@@ -13546,7 +13541,7 @@ static void init_qos(struct hfi1_devdata *dd, u32 first_ctxt)/* add rule0 */ write_csr (dd,RCV_RSM_CFG /* + (8 * 0) */ ,RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_MASK << -RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_SHIFT | +RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_SHIFT |2ull <<RCV_RSM_CFG_PACKET_TYPE_SHIFT ); write_csr(dd, RCV_RSM_SELECT /* + (8 * 0) */, LRH_BTH_MATCH_OFFSET << RCV_RSM_SELECT_FIELD1_OFFSET_SHIFT |
@@ -13563,8 +13558,8 @@ static void init_qos(struct hfi1_devdata *dd, u32 first_ctxt)/* Enable RSM */ add_rcvctrl (dd,RCV_CTRL_RCV_RSM_ENABLE_SMASK );kfree (rsmmap); -/* map everything else to first context */ -init_qpmap_table (dd,FIRST_KERNEL_KCTXT ,MIN_KERNEL_KCTXTS -1 ); +/* map everything else to the mcast/err/vl15 context */ +init_qpmap_table (dd,HFI1_CTRL_CTXT ,HFI1_CTRL_CTXT ); dd->qos_shift = n +1 ;return ; bail:
@@ -13577,8 +13572,7 @@ static void init_rxe(struct hfi1_devdata *dd)/* enable all receive errors */ write_csr (dd,RCV_ERR_MASK , ~0ull );/* setup QPN map table - start where VL15 context leaves off */ -init_qos (dd, dd->n_krcv_queues >MIN_KERNEL_KCTXTS ? -MIN_KERNEL_KCTXTS :0 ); +init_qos (dd);/* * make sure RcvCtrl.RcvWcb <= PCIe Device Control * Register Max_Payload_Size (PCI_EXP_DEVCTL in Linux PCIe config
--
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/21 IB/hfi1: Correctly obtain the full service class
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
The function hdr2sc was using an unshifted mask to obtain the 5th bit of the service class. Correct the issue by using the shifted mask.
--- drivers/staging/rdma/hfi1/hfi.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rdma/hfi1/hfi.h +1 -1
@@ -1258,7 +1258,7 @@ void receive_interrupt_work(struct work_struct *work);static inline int hdr2sc (struct hfi1_message_header *hdr,u64 rhf) {return ((be16_to_cpu (hdr->lrh[0 ]) >>12 ) &0xf ) | - ((!!(rhf &RHF_DC_INFO_MASK )) <<4 ); + ((!!(rhf &RHF_DC_INFO_SMASK )) <<4 ); }static inline u16 generate_jkey (kuid_t uid)
--
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 7/21 IB/hfi1: Simplify init_qpmap_table()
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
Make init_qpmap_table() easier to understand by simplifying the loop indexing and writing each register when it is "full", removing the need for a follow-on register write.
--- drivers/staging/rdma/hfi1/chip.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
drivers/staging/rdma/hfi1/chip.c +2 -5
@@ -13451,20 +13451,17 @@ static void init_qpmap_table(struct hfi1_devdata *dd,int i;u64 ctxt = first_ctxt; -for (i =0 ; i <256 ;) { +for (i =0 ; i <256 ; i++) { reg |= ctxt << (8 * (i %8 )); - i++; ctxt++;if (ctxt > last_ctxt) ctxt = first_ctxt; -if (i %8 ==0 ) { +if (i %8 ==7 ) {write_csr (dd, regno, reg); reg =0 ; regno +=8 ; } } -if (i %8 ) -write_csr (dd, regno, reg);add_rcvctrl (dd,RCV_CTRL_RCV_QP_MAP_ENABLE_SMASK |RCV_CTRL_RCV_BYPASS_ENABLE_SMASK );
--
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 8/21 IB/hfi1: Adjust default MTU to be 10KB
In reply to a message not in the archiveFrom: Sebastian Sanchez <[email protected]>
Increasing the default MTU size to 10KB improves performance for PSM. Change the default MTU to 10KB but constrain Verbs MTU to 8KB. Also update default MTU module parameter description to be HFI1_DEFAULT_MAX_MTU.
--- drivers/staging/rdma/hfi1/driver.c | 3 ++- drivers/staging/rdma/hfi1/hfi.h | 4 ++-- drivers/staging/rdma/hfi1/qp.c | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-)
drivers/staging/rdma/hfi1/driver.c +2 -1
@@ -75,7 +75,8 @@ DEFINE_MUTEX(hfi1_mutex); /* general driver use */unsigned int hfi1_max_mtu =HFI1_DEFAULT_MAX_MTU ;module_param_named (max_mtu, hfi1_max_mtu, uint,S_IRUGO ); -MODULE_PARM_DESC (max_mtu,"Set max MTU bytes, default is 8192" ); +MODULE_PARM_DESC (max_mtu,"Set max MTU bytes, default is " __stringify( +HFI1_DEFAULT_MAX_MTU ));unsigned int hfi1_cu =1 ;module_param_named (cu, hfi1_cu, uint,S_IRUGO );
drivers/staging/rdma/hfi1/hfi.h +2 -2
@@ -455,9 +455,9 @@ struct rvt_sge_state;#define HLS_UP (HLS_UP_INIT | HLS_UP_ARMED | HLS_UP_ACTIVE)/* use this MTU size if none other is given */ -#define HFI1_DEFAULT_ACTIVE_MTU 8192 +#define HFI1_DEFAULT_ACTIVE_MTU 10240/* use this MTU size as the default maximum */ -#define HFI1_DEFAULT_MAX_MTU 8192 +#define HFI1_DEFAULT_MAX_MTU 10240/* default partition key */ #define DEFAULT_PKEY 0xffff
drivers/staging/rdma/hfi1/qp.c +5 -1
@@ -167,8 +167,12 @@ static inline int opa_mtu_enum_to_int(int mtu)*/ static inline int verbs_mtu_enum_to_int (struct ib_device *dev,enum ib_mtu mtu) { -int val =opa_mtu_enum_to_int ((int )mtu); +int val; +/* Constraining 10KB packets to 8KB packets */ +if (mtu == (enum ib_mtu )OPA_MTU_10240 ) + mtu =OPA_MTU_8192 ; + val =opa_mtu_enum_to_int ((int )mtu);if (val >0 )return val;return ib_mtu_enum_to_int (mtu);
--
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): 20160412181708.21853.23423.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Re: [PATCH] [PATCH 08/21] IB/hfi1: Adjust default MTU to be 10KB
Sorry about the messed up subject for this patch. stg mail went out to lunch and I tried to send by hand. Patchworks doesn't seem to care so I don't think I need to re-send anything.
-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
Re: [PATCH] [PATCH 08/21] IB/hfi1: Adjust default MTU to be 10KB
In reply to a message not in the archiveQuoted 54 lines · Dennis Dalessandro
From: Sebastian Sanchez <[email protected]>
Increasing the default MTU size to 10KB improves performance for PSM. Change the default MTU to 10KB but constrain Verbs MTU to 8KB. Also update default MTU module parameter description to be
HFI1_DEFAULT_MAX_MTU.Reviewed-by Dean Luick <[email protected]>Reviewed-by Mitko Haralanov <[email protected]>Reviewed-by Mike Marciniszyn <[email protected]>Reviewed-by Jubin John <[email protected]>Signed-off-by Sebastian Sanchez <[email protected]>Signed-off-by Dennis Dalessandro <[email protected]>--- drivers/staging/rdma/hfi1/driver.c | 3 ++- drivers/staging/rdma/hfi1/hfi.h | 4 ++-- drivers/staging/rdma/hfi1/qp.c | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-)drivers/staging/rdma/hfi1/driver.c +2
-1@@ -75,7 +75,8 @@ DEFINE_MUTEX(hfi1_mutex); /* general driver use */unsigned int hfi1_max_mtu =HFI1_DEFAULT_MAX_MTU ;module_param_named (max_mtu, hfi1_max_mtu, uint,S_IRUGO ); -MODULE_PARM_DESC (max_mtu,"Set max MTU bytes, default is 8192" ); +MODULE_PARM_DESC (max_mtu,"Set max MTU bytes, default is " __stringify( +HFI1_DEFAULT_MAX_MTU ));unsigned int hfi1_cu =1 ;module_param_named (cu, hfi1_cu, uint,S_IRUGO );drivers/staging/rdma/hfi1/hfi.h +2
-2@@ -455,9 +455,9 @@ struct rvt_sge_state;#define HLS_UP (HLS_UP_INIT | HLS_UP_ARMED | HLS_UP_ACTIVE)/* use this MTU size if none other is given */ -#define HFI1_DEFAULT_ACTIVE_MTU 8192 +#define HFI1_DEFAULT_ACTIVE_MTU 10240/* use this MTU size as the default maximum */ -#define HFI1_DEFAULT_MAX_MTU 8192 +#define HFI1_DEFAULT_MAX_MTU 10240/* default partition key */ #define DEFAULT_PKEY 0xffffdrivers/staging/rdma/hfi1/qp.c +0
-0
drivers/staging/rdma/hfi1/qp.c static inline int opa_mtu_enum_to_int(int mtu) · line 175
Quoted 10 lines
drivers/staging/rdma/hfi1/qp.c +5
-1@@ -167,8 +167,12 @@ static inline int opa_mtu_enum_to_int(int mtu)*/ static inline int verbs_mtu_enum_to_int (struct ib_device *dev,enum ib_mtu mtu) { -int val =opa_mtu_enum_to_int ((int )mtu); +int val; +/* Constraining 10KB packets to 8KB packets */ +if (mtu == (enum ib_mtu )OPA_MTU_10240 ) + mtu =OPA_MTU_8192 ; + val =opa_mtu_enum_to_int ((int )mtu);
Just spotted my attention,
Curious names, castings and type conversions.
Quoted 8 lines
drivers/staging/rdma/hfi1/qp.c +0
-1if (val >0 )return val;return ib_mtu_enum_to_int (mtu); --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): 20160418070708.GJ6349-2ukJVAZIZ/[email protected]
Re: [PATCH] [PATCH 08/21] IB/hfi1: Adjust default MTU to be 10KB
Quoted 11 lines · Leon Romanovsky
Quoted 11 lines
drivers/staging/rdma/hfi1/qp.c +1
-1@@ -167,8 +167,12 @@ static inline int opa_mtu_enum_to_int(int mtu)*/ static inline int verbs_mtu_enum_to_int (struct ib_device *dev,enum ib_mtu mtu) { -int val =opa_mtu_enum_to_int ((int )mtu); +int val;
Quoted 8 lines
drivers/staging/rdma/hfi1/qp.c static inline int opa_mtu_enum_to_int(int mtu) · line 175
Quoted 4 lines
drivers/staging/rdma/hfi1/qp.c +4
-0+/* Constraining 10KB packets to 8KB packets */ +if (mtu == (enum ib_mtu )OPA_MTU_10240 ) + mtu =OPA_MTU_8192 ; + val =opa_mtu_enum_to_int ((int )mtu);Just spotted my attention,
Curious names, castings and type conversions.
Is there a question being implied here? I'm not clear on what kind of response you are looking for here.
-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): 20160418120335.GB17987-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org
Re: [PATCH] [PATCH 08/21] IB/hfi1: Adjust default MTU to be 10KB
Quoted 22 lines · Dennis Dalessandro
Quoted 10 lines · Leon Romanovsky
Quoted 10 lines
drivers/staging/rdma/hfi1/qp.c +0
-1@@ -167,8 +167,12 @@ static inline int opa_mtu_enum_to_int(int mtu)*/ static inline int verbs_mtu_enum_to_int (struct ib_device *dev,enum ib_mtu mtu) { -int val =opa_mtu_enum_to_int ((int )mtu);Quoted 9 lines
drivers/staging/rdma/hfi1/qp.c static inline int opa_mtu_enum_to_int(int mtu) · line 175
Quoted 5 lines
drivers/staging/rdma/hfi1/qp.c +5
-0+int val; +/* Constraining 10KB packets to 8KB packets */ +if (mtu == (enum ib_mtu )OPA_MTU_10240 ) + mtu =OPA_MTU_8192 ; + val =opa_mtu_enum_to_int ((int )mtu);Just spotted my attention,
Curious names, castings and type conversions.
Quoted 2 lines
Is there a question being implied here? I'm not clear on what kind of response you are looking for here.
No, there is no question here.
mtu is type of "enum ib_mtu", which is converted to int and supplied to function which has opa_mtu_ENUM_to_int name. From the name of that function looks that the parameter supplied should be ENUM, but it is not the case.
Quoted 2 lines
-Denny
A message that is not in the archive (sent off-list or not yet received): 20160418123032.GM6349-2ukJVAZIZ/[email protected]
Re: [PATCH] [PATCH 08/21] IB/hfi1: Adjust default MTU to be 10KB
Quoted 2 lines · Leon Romanovsky
From the name of that function looks that the parameter supplied should be ENUM, but it is not the case.
The implicit question might, perhaps, be "why?" :)
Signature · 1 line
dwmw2
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH] [PATCH 08/21] IB/hfi1: Adjust default MTU to be 10KB
Quoted 5 lines · David Woodhouse
Quoted 2 lines · Leon Romanovsky
From the name of that function looks that the parameter supplied should be ENUM, but it is not the case.
The implicit question might, perhaps, be "why?" :)
OPA defines MTU values which are not "ib_mtu" enumerations. This code is processing 2 different "types" of enumerations. The IB compatible ones as well as new ones which are specific to OPA.
The OPA enums are not defined as a type but perhaps they should be?
From include/rdma/opa_port_info.h:
enum {
OPA_MTU_8192 = 6,
OPA_MTU_10240 = 7,
};Also I just noticed this comment for the function which is no longer appropriate:
...
* The actual flag used to determine "8k MTU" will change and is currently
* unknown.
...
We should remove the comment.
Ira
--
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 9/21 IB/hfi1: Check P_KEY for all sent packets from user mode
In reply to a message not in the archiveFrom: Sebastian Sanchez <[email protected]>
Add the P_KEY check for user-context mechanism for both PIO and SDMA. For PIO, the SendCtxtCheckEnable.DisallowKDETHPackets is set by default. When the P_KEY is set, SendCtxtCheckEnable.DisallowKDETHPackets is cleared. For SDMA, a software check was included. This change requires user processes to set the P_KEY before sending any packets, otherwise, the sent packet will fail. The original submission didn't have this check but it's required.
--- drivers/staging/rdma/hfi1/chip.c | 1 drivers/staging/rdma/hfi1/hfi.h | 4 + drivers/staging/rdma/hfi1/user_sdma.c | 7 ++ drivers/staging/rdma/hfi1/verbs.c | 106 ++++++++++++++++++++------------- 4 files changed, 77 insertions(+), 41 deletions(-)
drivers/staging/rdma/hfi1/chip.c +1 -0
@@ -13751,6 +13751,7 @@ int hfi1_set_ctxt_pkey(struct hfi1_devdata *dd, unsigned ctxt, u16 pkey)write_kctxt_csr (dd, sctxt,SEND_CTXT_CHECK_PARTITION_KEY , reg); reg =read_kctxt_csr (dd, sctxt,SEND_CTXT_CHECK_ENABLE ); reg |=SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK ; + reg &= ~SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK ;write_kctxt_csr (dd, sctxt,SEND_CTXT_CHECK_ENABLE , reg); done:return ret;
drivers/staging/rdma/hfi1/hfi.h +4 -0
@@ -1333,6 +1333,9 @@ void process_becn(struct hfi1_pportdata *ppd, u8 sl, u16 rlid, u32 lqpn,void return_cnp (struct hfi1_ibport *ibp,struct rvt_qp *qp,u32 remote_qpn,u32 pkey,u32 slid,u32 dlid,u8 sc5,const struct ib_grh *old_grh); +#define PKEY_CHECK_INVALID -1 +int egress_pkey_check (struct hfi1_pportdata *ppd,__be16 *lrh,__be32 *bth, +u8 sc5,int8_t s_pkey_index);#define PACKET_EGRESS_TIMEOUT 350static inline void pause_for_credit_return (struct hfi1_devdata *dd)
@@ -1776,6 +1779,7 @@ extern struct mutex hfi1_mutex;#define HFI1_PKT_USER_SC_INTEGRITY \ (SEND_CTXT_CHECK_ENABLE_DISALLOW_NON_KDETH_PACKETS_SMASK \ + | SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK \ | SEND_CTXT_CHECK_ENABLE_DISALLOW_BYPASS_SMASK \ | SEND_CTXT_CHECK_ENABLE_DISALLOW_GRH_SMASK)
drivers/staging/rdma/hfi1/user_sdma.c +7 -0
@@ -600,6 +600,13 @@ int hfi1_user_sdma_process_request(struct file *fp, struct iovec *iovec, goto free_req; } +/* Checking P_KEY for requests from user-space */ +if (egress_pkey_check (dd->pport, req->hdr.lrh, req->hdr.bth, sc, +PKEY_CHECK_INVALID )) { + ret = -EINVAL ; + goto free_req; + } +/* * Also should check the BTH.lnh. If it says the next header is GRH then * the RXE parsing will be off and will land in the middle of the KDETH
drivers/staging/rdma/hfi1/verbs.c +65 -41
152 lines not on this page · raw message
--
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 10/21 IB/hfi1: Always turn on CDRs for low power QSFP modules
In reply to a message not in the archiveFrom: Easwar Hariharan <[email protected]>
Clock and data recovery mechanisms (CDRs) in active QSFP modules can be turned on or off to improve the bit error rate observed on the channel. Signal integrity and bit error rate requirements require us to always turn on any CDRs present in low power cables (power dissipation 2.5W or lower). However, we adhere to the platform designer's settings (provided in the platform configuration) for higher power cables (dissipation 3.5W or higher) if the platform designer has determined that the platform requires the CDRs to be turned on (or off) and is capable of supplying and cooling the higher power modules.
This patch also introduces the get_qsfp_power_class function to centralize the bit twiddling required to determine the QSFP power class across the code. Reusing this function improves the readability of code that depends on knowing the power class of the cable, such as the active and optical channel tuning algorithm.
--- drivers/staging/rdma/hfi1/chip.c | 49 +++------------------------------ drivers/staging/rdma/hfi1/chip.h | 1 - drivers/staging/rdma/hfi1/hfi.h | 1 - drivers/staging/rdma/hfi1/init.c | 1 - drivers/staging/rdma/hfi1/platform.c | 51 +++++++++++++++++++--------------- drivers/staging/rdma/hfi1/qsfp.c | 38 +++++++++++++++++++++++-- drivers/staging/rdma/hfi1/qsfp.h | 15 +++++----- 7 files changed, 74 insertions(+), 82 deletions(-)
drivers/staging/rdma/hfi1/chip.c +4 -45
@@ -6199,18 +6199,13 @@ static void hreq_response(struct hfi1_devdata *dd, u8 return_code, u16 rsp_data)/* * Handle host requests from the 8051. -* -* This is a work-queue function outside of the interrupt. */ -void handle_8051_request (struct work_struct *work) +static void handle_8051_request (struct hfi1_pportdata *ppd) { - struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, - dc_host_req_work);struct hfi1_devdata *dd = ppd->dd;u64 reg;u16 data =0 ; -u8 type, i, lanes, *cache = ppd->qsfp_info.cache; -u8 cdr_ctrl_byte = cache[QSFP_CDR_CTRL_BYTE_OFFS ]; +u8 type; reg =read_csr (dd,DC_DC8051_CFG_EXT_DEV_1 );if ((reg &DC_DC8051_CFG_EXT_DEV_1_REQ_NEW_SMASK ) ==0 )
@@ -6231,46 +6226,11 @@ void handle_8051_request(struct work_struct *work)case HREQ_READ_CONFIG :case HREQ_SET_TX_EQ_ABS :case HREQ_SET_TX_EQ_REL : +case HREQ_ENABLE :dd_dev_info (dd,"8051 request: request 0x%x not supported\n" , type);hreq_response (dd,HREQ_NOT_SUPPORTED ,0 );break ; - -case HREQ_ENABLE : - lanes = data &0xF ; -for (i =0 ; lanes; lanes >>=1 , i++) { -if (!(lanes &1 )) -continue ; -if (data &0x200 ) { -/* enable TX CDR */ -if (cache[QSFP_MOD_PWR_OFFS ] &0x8 && - cache[QSFP_CDR_INFO_OFFS ] &0x80 ) - cdr_ctrl_byte |= (1 << (i +4 )); - }else { -/* disable TX CDR */ -if (cache[QSFP_MOD_PWR_OFFS ] &0x8 && - cache[QSFP_CDR_INFO_OFFS ] &0x80 ) - cdr_ctrl_byte &= ~(1 << (i +4 )); - } - -if (data &0x800 ) { -/* enable RX CDR */ -if (cache[QSFP_MOD_PWR_OFFS ] &0x4 && - cache[QSFP_CDR_INFO_OFFS ] &0x40 ) - cdr_ctrl_byte |= (1 << i); - }else { -/* disable RX CDR */ -if (cache[QSFP_MOD_PWR_OFFS ] &0x4 && - cache[QSFP_CDR_INFO_OFFS ] &0x40 ) - cdr_ctrl_byte &= ~(1 << i); - } - } -one_qsfp_write (ppd, dd->hfi1_id,QSFP_CDR_CTRL_BYTE_OFFS , - &cdr_ctrl_byte,1 ); -hreq_response (dd,HREQ_SUCCESS , data); -refresh_qsfp_cache (ppd, &ppd->qsfp_info); -break ; -case HREQ_CONFIG_DONE :hreq_response (dd,HREQ_SUCCESS ,0 );break ;
@@ -6278,7 +6238,6 @@ void handle_8051_request(struct work_struct *work)case HREQ_INTERFACE_TEST :hreq_response (dd,HREQ_SUCCESS , data);break ; -default :dd_dev_err (dd,"8051 request: unknown request 0x%x\n" , type);hreq_response (dd,HREQ_NOT_SUPPORTED ,0 );
@@ -7534,7 +7493,7 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg) host_msg &= ~(u64 )LINKUP_ACHIEVED ; }if (host_msg &EXT_DEVICE_CFG_REQ ) { -queue_work (ppd->hfi1_wq, &ppd->dc_host_req_work); +handle_8051_request (ppd); host_msg &= ~(u64 )EXT_DEVICE_CFG_REQ ; }if (host_msg &VERIFY_CAP_FRAME ) {
drivers/staging/rdma/hfi1/chip.h +0 -1
@@ -691,7 +691,6 @@ void handle_verify_cap(struct work_struct *work);void handle_freeze (struct work_struct *work);void handle_link_up (struct work_struct *work);void handle_link_down (struct work_struct *work); -void handle_8051_request (struct work_struct *work);void handle_link_downgrade (struct work_struct *work);void handle_link_bounce (struct work_struct *work);void handle_sma_message (struct work_struct *work);
drivers/staging/rdma/hfi1/hfi.h +0 -1
@@ -606,7 +606,6 @@ struct hfi1_pportdata {struct work_struct link_vc_work;struct work_struct link_up_work;struct work_struct link_down_work; -struct work_struct dc_host_req_work;struct work_struct sma_message_work;struct work_struct freeze_work;struct work_struct link_downgrade_work;
drivers/staging/rdma/hfi1/init.c +0 -1
@@ -496,7 +496,6 @@ void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd,INIT_WORK (&ppd->link_vc_work, handle_verify_cap);INIT_WORK (&ppd->link_up_work, handle_link_up);INIT_WORK (&ppd->link_down_work, handle_link_down); -INIT_WORK (&ppd->dc_host_req_work, handle_8051_request);INIT_WORK (&ppd->freeze_work, handle_freeze);INIT_WORK (&ppd->link_downgrade_work, handle_link_downgrade);INIT_WORK (&ppd->sma_message_work, handle_sma_message);
drivers/staging/rdma/hfi1/platform.c +28 -23
106 lines not on this page · raw message
drivers/staging/rdma/hfi1/qsfp.c +35 -3
@@ -466,7 +466,28 @@ const char * const hfi1_qsfp_devtech[16] = {#define QSFP_DUMP_CHUNK 16/* Holds longest string */ #define QSFP_DEFAULT_HDR_CNT 224 -static const char *pwr_codes ="1.5W2.0W2.5W3.5W" ; +#define QSFP_PWR (pbyte) (((pbyte) >> 6) & 3) +#define QSFP_HIGH_PWR (pbyte) ((pbyte) & 3) +/* For use with QSFP_HIGH_PWR macro */ +#define QSFP_HIGH_PWR_UNUSED 0/* Bits [1:0] = 00 implies low power module */ + +/* +* Takes power class byte [Page 00 Byte 129] in SFF 8636 +* Returns power class as integer (1 through 7, per SFF 8636 rev 2.4) +*/ +int get_qsfp_power_class (u8 power_byte) +{ +if (QSFP_HIGH_PWR (power_byte) ==QSFP_HIGH_PWR_UNUSED ) +/* power classes count from 1, their bit encodings from 0 */ +return (QSFP_PWR (power_byte) +1 ); +/* +* 00 in the high power classes stands for unused, bringing +* balance to the off-by-1 offset above, we add 4 here to +* account for the difference between the low and high power +* groups +*/ +return (QSFP_HIGH_PWR (power_byte) +4 ); +}int qsfp_mod_present (struct hfi1_pportdata *ppd) {
@@ -537,6 +558,16 @@ set_zeroes:return ret; } +static const char *pwr_codes[8 ] = {"N/AW" , +"1.5W" , +"2.0W" , +"2.5W" , +"3.5W" , +"4.0W" , +"4.5W" , +"5.0W" + }; +int qsfp_dump (struct hfi1_pportdata *ppd,char *buf,int len) {u8 *cache = &ppd->qsfp_info.cache[0 ];
@@ -546,6 +577,7 @@ int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len)int bidx =0 ;u8 *atten = &cache[QSFP_ATTEN_OFFS ];u8 *vendor_oui = &cache[QSFP_VOUI_OFFS ]; +u8 power_byte =0 ; sofar =0 ; lenstr[0 ] =' ' ;
@@ -555,9 +587,9 @@ int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len)if (QSFP_IS_CU (cache[QSFP_MOD_TECH_OFFS ]))sprintf (lenstr,"%dM " , cache[QSFP_MOD_LEN_OFFS ]); + power_byte = cache[QSFP_MOD_PWR_OFFS ]; sofar +=scnprintf (buf + sofar, len - sofar,"PWR:%.3sW\n" , - pwr_codes + - (QSFP_PWR (cache[QSFP_MOD_PWR_OFFS ]) *4 )); + pwr_codes[get_qsfp_power_class (power_byte)]); sofar += scnprintf(buf + sofar, len - sofar, "TECH:%s%s\n", lenstr,
drivers/staging/rdma/hfi1/qsfp.h +7 -8
@@ -82,8 +82,9 @@/* Byte 128 is Identifier: must be 0x0c for QSFP, or 0x0d for QSFP+ */ #define QSFP_MOD_ID_OFFS 128/* -* Byte 129 is "Extended Identifier". We only care about D7,D6: Power class -* 0:1.5W, 1:2.0W, 2:2.5W, 3:3.5W +* Byte 129 is "Extended Identifier". +* For bits [7:6]: 0:1.5W, 1:2.0W, 2:2.5W, 3:3.5W +* For bits [1:0]: 0:Unused, 1:4W, 2:4.5W, 3:5W */ #define QSFP_MOD_PWR_OFFS 129/* Byte 130 is Connector type. Not Intel req'd */
@@ -190,6 +191,9 @@ extern const char *const hfi1_qsfp_devtech[16];#define QSFP_HIGH_BIAS_WARNING 0x22#define QSFP_LOW_BIAS_WARNING 0x11 +#define QSFP_ATTEN_SDR (attenarray) (attenarray[0]) +#define QSFP_ATTEN_DDR (attenarray) (attenarray[1]) +/* * struct qsfp_data encapsulates state of QSFP device for one port. * it will be part of port-specific data if a board supports QSFP.
@@ -201,12 +205,6 @@ extern const char *const hfi1_qsfp_devtech[16];* and let the qsfp_lock arbitrate access to common resources. * */ - -#define QSFP_PWR (pbyte) (((pbyte) >> 6) & 3) -#define QSFP_HIGH_PWR (pbyte) (((pbyte) & 3) | 4) -#define QSFP_ATTEN_SDR (attenarray) (attenarray[0]) -#define QSFP_ATTEN_DDR (attenarray) (attenarray[1]) -struct qsfp_data {/* Helps to find our way */ struct hfi1_pportdata *ppd;
@@ -223,6 +221,7 @@ struct qsfp_data {int refresh_qsfp_cache (struct hfi1_pportdata *ppd,struct qsfp_data *cp); +int get_qsfp_power_class (u8 power_byte);int qsfp_mod_present (struct hfi1_pportdata *ppd);int get_cable_info (struct hfi1_devdata *dd,u32 port_num,u32 addr,u32 len,u8 *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
PATCH 11/21 IB/hfi1: Remove module presence check outside pre-LNI checks
In reply to a message not in the archiveFrom: Easwar Hariharan <[email protected]>
The pre-LNI SerDes and channel tuning algorithm already checks for module presence assertion for the relevant port types. The extraneous check removed in this patch blocks link up for port types for which the module presence assertion is not relevant.
--- drivers/staging/rdma/hfi1/chip.c | 20 ++++++-------------- drivers/staging/rdma/hfi1/platform.c | 8 ++++++-- 2 files changed, 12 insertions(+), 16 deletions(-)
drivers/staging/rdma/hfi1/chip.c +6 -14
@@ -6849,7 +6849,7 @@ void handle_link_down(struct work_struct *work)* If there is no cable attached, turn the DC off. Otherwise, * start the link bring up. */ -if (!qsfp_mod_present (ppd)) { +if (ppd->port_type ==PORT_TYPE_QSFP && !qsfp_mod_present (ppd)) {dc_shutdown (ppd->dd); }else {tune_serdes (ppd);
@@ -9008,9 +9008,9 @@ set_local_link_attributes_fail: }/* -* Call this to start the link. Schedule a retry if the cable is not -* present or if unable to start polling. Do not do anything if the -* link is disabled. Returns 0 if link is disabled or moved to polling +* Call this to start the link. +* Do not do anything if the link is disabled. +* Returns 0 if link is disabled, moved to polling, or the driver is not ready. */ int start_link (struct hfi1_pportdata *ppd) {
@@ -9027,15 +9027,7 @@ int start_link(struct hfi1_pportdata *ppd)return 0 ; } -if (qsfp_mod_present (ppd) || loopback ==LOOPBACK_SERDES || - loopback ==LOOPBACK_LCB || - ppd->dd->icode ==ICODE_FUNCTIONAL_SIMULATOR ) -return set_link_state (ppd,HLS_DN_POLL ); - -dd_dev_info (ppd->dd, -"%s: stopping link start because no cable is present\n" , - __func__); -return -EAGAIN ; +return set_link_state (ppd,HLS_DN_POLL ); }static void wait_for_qsfp_init (struct hfi1_pportdata *ppd)
@@ -9206,7 +9198,7 @@ static int handle_qsfp_error_conditions(struct hfi1_pportdata *ppd,return 0 ; } -/* This routine will only be scheduled if the QSFP module is present */ +/* This routine will only be scheduled if the QSFP module present is asserted */ void qsfp_event (struct work_struct *work) {struct qsfp_data *qd;
drivers/staging/rdma/hfi1/platform.c +6 -2
@@ -838,9 +838,11 @@ void tune_serdes(struct hfi1_pportdata *ppd) total_atten = platform_atten + remote_atten; tuning_method =OPA_PASSIVE_TUNING ; - }else + }else { ppd->offline_disabled_reason =HFI1_ODR_MASK (OPA_LINKDOWN_REASON_CHASSIS_CONFIG ); + goto bail; + }break ;case PORT_TYPE_QSFP :if (qsfp_mod_present (ppd)) {
@@ -869,10 +871,12 @@ void tune_serdes(struct hfi1_pportdata *ppd) __func__); goto bail; } - }else + }else { ppd->offline_disabled_reason =HFI1_ODR_MASK (OPA_LINKDOWN_REASON_LOCAL_MEDIA_NOT_INSTALLED ); + goto bail; + }break ;default :dd_dev_info (ppd->dd,"%s: Unknown port type\n" , __func__);
--
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 12/21 IB/hfi1: Guard against concurrent I2C access across all chains
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
The discrete ASIC board design makes the two I2C chains not independent of each other. That is, only one chain can safely be accessed at a time. For discrete ASIC devices, adjust the resource locking so that access to one I2C chain will lock both of the chains.
--- drivers/staging/rdma/hfi1/firmware.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
drivers/staging/rdma/hfi1/firmware.c +8 -1
@@ -1413,8 +1413,15 @@ static int __acquire_chip_resource(struct hfi1_devdata *dd, u32 resource)if (resource &CR_DYN_MASK ) {/* a dynamic resource is in use if either HFI has set the bit */ - all_bits =resource_mask (0 , resource) | +if (dd->pcidev->device ==PCI_DEVICE_ID_INTEL0 && + (resource & (CR_I2C1 |CR_I2C2 ))) { +/* discrete devices must serialize across both chains */ + all_bits =resource_mask (0 ,CR_I2C1 |CR_I2C2 ) | +resource_mask (1 ,CR_I2C1 |CR_I2C2 ); + }else { + all_bits =resource_mask (0 , resource) |resource_mask (1 , resource); + } my_bit =resource_mask (dd->hfi1_id, resource); }else {/* non-dynamic resources are not split between HFIs */
--
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 13/21 IB/hfi1: Fix double QSFP resource acquire on cache refresh
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
The function refresh_qsfp_cache() acquires the i2c chain resource, but one caller already holds the resource. Change the acquire so all calls to refresh_qsfp_cache() are covered by the acquire and remove the acquire within refresh_qsfp_cache().
--- drivers/staging/rdma/hfi1/platform.c | 40 +++++++++++++++++----------------- drivers/staging/rdma/hfi1/qsfp.c | 12 +++------- 2 files changed, 23 insertions(+), 29 deletions(-)
drivers/staging/rdma/hfi1/platform.c +20 -20
@@ -603,6 +603,7 @@ static void apply_tunings( "Applying TX settings"); } +/* Must be holding the QSFP i2c resource */ static int tune_active_qsfp (struct hfi1_pportdata *ppd,u32 *ptr_tx_preset,u32 *ptr_rx_preset,u32 *ptr_total_atten) {
@@ -610,26 +611,19 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset,u16 lss = ppd->link_speed_supported, lse = ppd->link_speed_enabled;u8 *cache = ppd->qsfp_info.cache; - ret =acquire_chip_resource (ppd->dd,qsfp_resource (ppd->dd),QSFP_WAIT ); -if (ret) { -dd_dev_err (ppd->dd,"%s: hfi%d: cannot lock i2c chain\n" , - __func__, (int )ppd->dd->hfi1_id); -return ret; - } - ppd->qsfp_info.limiting_active =1 ; ret =set_qsfp_tx (ppd,0 );if (ret) - goto bail_unlock; +return ret; ret =qual_power (ppd);if (ret) - goto bail_unlock; +return ret; ret =qual_bitrate (ppd);if (ret) - goto bail_unlock; +return ret;if (ppd->qsfp_info.reset_needed) {reset_qsfp (ppd);
@@ -641,7 +635,7 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset, ret =set_qsfp_high_power (ppd);if (ret) - goto bail_unlock; +return ret;if (cache[QSFP_EQ_INFO_OFFS ] &0x4 ) { ret = get_platform_config_field(
@@ -651,7 +645,7 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset, ptr_tx_preset, 4);if (ret) { *ptr_tx_preset =OPA_INVALID_INDEX ; - goto bail_unlock; +return ret; } }else { ret = get_platform_config_field(
@@ -661,7 +655,7 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset, ptr_tx_preset, 4);if (ret) { *ptr_tx_preset =OPA_INVALID_INDEX ; - goto bail_unlock; +return ret; } }
@@ -670,7 +664,7 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset, PORT_TABLE_RX_PRESET_IDX, ptr_rx_preset, 4);if (ret) { *ptr_rx_preset =OPA_INVALID_INDEX ; - goto bail_unlock; +return ret; }if ((lss &OPA_LINK_SPEED_25G ) && (lse &OPA_LINK_SPEED_25G ))
@@ -690,8 +684,6 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset, ret =set_qsfp_tx (ppd,1 ); -bail_unlock: -release_chip_resource (ppd->dd,qsfp_resource (ppd->dd));return ret; }
@@ -846,6 +838,14 @@ void tune_serdes(struct hfi1_pportdata *ppd)break ;case PORT_TYPE_QSFP :if (qsfp_mod_present (ppd)) { + ret =acquire_chip_resource (ppd->dd, +qsfp_resource (ppd->dd), +QSFP_WAIT ); +if (ret) { +dd_dev_err (ppd->dd,"%s: hfi%d: cannot lock i2c chain\n" , + __func__, (int )ppd->dd->hfi1_id); + goto bail; + }refresh_qsfp_cache (ppd, &ppd->qsfp_info);if (ppd->qsfp_info.cache_valid) {
@@ -860,17 +860,17 @@ void tune_serdes(struct hfi1_pportdata *ppd)* update the cache to reflect the changes */ refresh_qsfp_cache (ppd, &ppd->qsfp_info); -if (ret) - goto bail; - limiting_active = ppd->qsfp_info.limiting_active; }else {dd_dev_err (dd,"%s: Reading QSFP memory failed\n" , __func__); - goto bail; + ret = -EINVAL ;/* a fail indication */ } +release_chip_resource (ppd->dd,qsfp_resource (ppd->dd)); +if (ret) + goto bail; }else { ppd->offline_disabled_reason = HFI1_ODR_MASK(
drivers/staging/rdma/hfi1/qsfp.c +3 -9
@@ -355,6 +355,8 @@ int one_qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp,* The calls to qsfp_{read,write} in this function correctly handle the * address map difference between this mapping and the mapping implemented * by those functions +* +* The caller must be holding the QSFP i2c chain resource. */ int refresh_qsfp_cache (struct hfi1_pportdata *ppd,struct qsfp_data *cp) {
@@ -371,13 +373,9 @@ int refresh_qsfp_cache(struct hfi1_pportdata *ppd, struct qsfp_data *cp)if (!qsfp_mod_present (ppd)) { ret = -ENODEV ; - goto bail_no_release; + goto bail; } - ret =acquire_chip_resource (ppd->dd,qsfp_resource (ppd->dd),QSFP_WAIT ); -if (ret) - goto bail_no_release; - ret =qsfp_read (ppd, target,0 , cache,QSFP_PAGESIZE );if (ret !=QSFP_PAGESIZE ) { dd_dev_info(ppd->dd,
@@ -440,8 +438,6 @@ int refresh_qsfp_cache(struct hfi1_pportdata *ppd, struct qsfp_data *cp) } } -release_chip_resource (ppd->dd,qsfp_resource (ppd->dd)); -spin_lock_irqsave (&ppd->qsfp_info.qsfp_lock, flags); ppd->qsfp_info.cache_valid =1 ; ppd->qsfp_info.cache_refresh_required =0 ;
@@ -450,8 +446,6 @@ int refresh_qsfp_cache(struct hfi1_pportdata *ppd, struct qsfp_data *cp)return 0 ; bail: -release_chip_resource (ppd->dd,qsfp_resource (ppd->dd)); -bail_no_release:memset (cache,0 , (QSFP_MAX_NUM_PAGES *128 ));return ret; }
--
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 14/21 IB/hfi1: Remove unreachable code
In reply to a message not in the archiveFrom: Mike Marciniszyn <[email protected]>
Remove unreachable code from RC ack handling to fix an smatch error.
--- drivers/staging/rdma/hfi1/rc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rdma/hfi1/rc.c +1 -1
@@ -1497,7 +1497,7 @@ reserved:/* Ignore reserved NAK codes. */ goto bail_stop; } -return ret; +/* cannot be reached */ bail_stop:hfi1_stop_rc_timers (qp);return ret;
--
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 15/21 IB/hfi1: Use global defines for upper bits in opcode
In reply to a message not in the archiveFrom: Mike Marciniszyn <[email protected]>
The awkward coding for setting the allowed_ops field was tripping an smatch warning.
This patch uses the more appropriate defines from include/rdma to avoid the issue.
As part of the patch remove a mask that was duplicated in rdmavt include files and use that mask as appropriate.
--- drivers/infiniband/sw/rdmavt/qp.c | 6 +++--- drivers/staging/rdma/hfi1/verbs.c | 2 +- drivers/staging/rdma/hfi1/verbs.h | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-)
drivers/infiniband/sw/rdmavt/qp.c +3 -3
@@ -829,13 +829,13 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,case IB_QPT_SMI :case IB_QPT_GSI :case IB_QPT_UD : - qp->allowed_ops =IB_OPCODE_UD_SEND_ONLY &RVT_OPCODE_QP_MASK ; + qp->allowed_ops =IB_OPCODE_UD ;break ;case IB_QPT_RC : - qp->allowed_ops =IB_OPCODE_RC_SEND_ONLY &RVT_OPCODE_QP_MASK ; + qp->allowed_ops =IB_OPCODE_RC ;break ;case IB_QPT_UC : - qp->allowed_ops =IB_OPCODE_UC_SEND_ONLY &RVT_OPCODE_QP_MASK ; + qp->allowed_ops =IB_OPCODE_UC ;break ;default : ret =ERR_PTR (-EINVAL );
drivers/staging/rdma/hfi1/verbs.c +1 -1
@@ -545,7 +545,7 @@ static inline int qp_ok(int opcode, struct hfi1_packet *packet)if (!(ib_rvt_state_ops[packet->qp->state] &RVT_PROCESS_RECV_OK )) goto dropit; -if (((opcode &OPCODE_QP_MASK ) == packet->qp->allowed_ops) || +if (((opcode &RVT_OPCODE_QP_MASK ) == packet->qp->allowed_ops) || (opcode ==IB_OPCODE_CNP ))return 1 ; dropit:
drivers/staging/rdma/hfi1/verbs.h +0 -3
@@ -335,9 +335,6 @@ int hfi1_process_mad(struct ib_device *ibdev, int mad_flags, u8 port,#endif #define PSN_MODIFY_MASK 0xFFFFFF -/* Number of bits to pay attention to in the opcode for checking qp type */ -#define OPCODE_QP_MASK 0xE0 -/* * Compare the lower 24 bits of the msn values. * Returns an integer <, ==, or > than zero.
--
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 16/21 IB/hfi1: Change default number of user contexts
In reply to a message not in the archiveFrom: Jubin John <[email protected]>
Change the default number of user contexts to the number of real (non-HT) cpu cores in order to reduce the division of hfi1 hardware contexts in the case of high core counts with hyper-threading enabled.
--- drivers/staging/rdma/hfi1/affinity.c | 93 +++++++++++++++++----------------- drivers/staging/rdma/hfi1/affinity.h | 19 +++++++ drivers/staging/rdma/hfi1/chip.c | 26 +++++++--- 3 files changed, 84 insertions(+), 54 deletions(-)
drivers/staging/rdma/hfi1/affinity.c +47 -46
@@ -53,20 +53,6 @@#include "sdma.h" #include "trace.h" -struct cpu_mask_set { -struct cpumask mask; -struct cpumask used; -uint gen; -}; - -struct hfi1_affinity { -struct cpu_mask_set def_intr; -struct cpu_mask_set rcv_intr; -struct cpu_mask_set proc; -/* spin lock to protect affinity struct */ -spinlock_t lock; -}; -/* Name of IRQ types, indexed by enum irq_type */ static const char *const irq_type_names[] = {"SDMA" ,
@@ -82,6 +68,48 @@ static inline void init_cpu_mask_set(struct cpu_mask_set *set) set->gen =0 ; } +/* Initialize non-HT cpu cores mask */ +int init_real_cpu_mask (struct hfi1_devdata *dd) +{ +struct hfi1_affinity *info; +int possible, curr_cpu, i, ht; + + info =kzalloc (sizeof (*info),GFP_KERNEL ); +if (!info) +return -ENOMEM ; + +cpumask_clear (&info->real_cpu_mask); + +/* Start with cpu online mask as the real cpu mask */ +cpumask_copy (&info->real_cpu_mask, cpu_online_mask); + +/* +* Remove HT cores from the real cpu mask. Do this in two steps below. +*/ + possible =cpumask_weight (&info->real_cpu_mask); + ht =cpumask_weight (topology_sibling_cpumask ( +cpumask_first (&info->real_cpu_mask))); +/* +* Step 1. Skip over the first N HT siblings and use them as the +* "real" cores. Assumes that HT cores are not enumerated in +* succession (except in the single core case). +*/ + curr_cpu =cpumask_first (&info->real_cpu_mask); +for (i =0 ; i < possible / ht; i++) + curr_cpu =cpumask_next (curr_cpu, &info->real_cpu_mask); +/* +* Step 2. Remove the remaining HT siblings. Use cpumask_next() to +* skip any gaps. +*/ +for (; i < possible; i++) { +cpumask_clear_cpu (curr_cpu, &info->real_cpu_mask); + curr_cpu =cpumask_next (curr_cpu, &info->real_cpu_mask); + } + + dd->affinity = info; +return 0 ; +} +/* * Interrupt affinity. *
@@ -93,20 +121,17 @@ static inline void init_cpu_mask_set(struct cpu_mask_set *set)* to the node relative 1 as necessary. * */ -int hfi1_dev_affinity_init (struct hfi1_devdata *dd) +void hfi1_dev_affinity_init (struct hfi1_devdata *dd) {int node =pcibus_to_node (dd->pcidev->bus); -struct hfi1_affinity *info; +struct hfi1_affinity *info = dd->affinity;const struct cpumask *local_mask; -int curr_cpu, possible, i, ht; +int curr_cpu, possible, i;if (node <0 ) node =numa_node_id (); dd->node = node; - info =kzalloc (sizeof (*info),GFP_KERNEL ); -if (!info) -return -ENOMEM ;spin_lock_init (&info->lock);init_cpu_mask_set (&info->def_intr);
@@ -116,30 +141,8 @@ int hfi1_dev_affinity_init(struct hfi1_devdata *dd) local_mask =cpumask_of_node (dd->node);if (cpumask_first (local_mask) >= nr_cpu_ids) local_mask =topology_core_cpumask (0 ); -/* use local mask as default */ -cpumask_copy (&info->def_intr.mask, local_mask); -/* -* Remove HT cores from the default mask. Do this in two steps below. -*/ - possible =cpumask_weight (&info->def_intr.mask); - ht =cpumask_weight (topology_sibling_cpumask ( -cpumask_first (&info->def_intr.mask))); -/* -* Step 1. Skip over the first N HT siblings and use them as the -* "real" cores. Assumes that HT cores are not enumerated in -* succession (except in the single core case). -*/ - curr_cpu =cpumask_first (&info->def_intr.mask); -for (i =0 ; i < possible / ht; i++) - curr_cpu =cpumask_next (curr_cpu, &info->def_intr.mask); -/* -* Step 2. Remove the remaining HT siblings. Use cpumask_next() to -* skip any gaps. -*/ -for (; i < possible; i++) { -cpumask_clear_cpu (curr_cpu, &info->def_intr.mask); - curr_cpu =cpumask_next (curr_cpu, &info->def_intr.mask); - } +/* Use the "real" cpu mask of this node as the default */ +cpumask_and (&info->def_intr.mask, &info->real_cpu_mask, local_mask);/* fill in the receive list */ possible =cpumask_weight (&info->def_intr.mask);
@@ -167,8 +170,6 @@ int hfi1_dev_affinity_init(struct hfi1_devdata *dd) }cpumask_copy (&info->proc.mask, cpu_online_mask); - dd->affinity = info; -return 0 ; }void hfi1_dev_affinity_free (struct hfi1_devdata *dd)
drivers/staging/rdma/hfi1/affinity.h +18 -1
@@ -64,10 +64,27 @@ enum affinity_flags { AFF_IRQ_LOCAL }; +struct cpu_mask_set { +struct cpumask mask; +struct cpumask used; +uint gen; +}; + +struct hfi1_affinity { +struct cpu_mask_set def_intr; +struct cpu_mask_set rcv_intr; +struct cpu_mask_set proc; +struct cpumask real_cpu_mask; +/* spin lock to protect affinity struct */ +spinlock_t lock; +}; +struct hfi1_msix_entry ; +/* Initialize non-HT cpu cores mask */ +int init_real_cpu_mask (struct hfi1_devdata *);/* Initialize driver affinity data */ -int hfi1_dev_affinity_init (struct hfi1_devdata *); +void hfi1_dev_affinity_init (struct hfi1_devdata *);/* Free driver affinity data */ void hfi1_dev_affinity_free (struct hfi1_devdata *);/*
drivers/staging/rdma/hfi1/chip.c +19 -7
@@ -12656,12 +12656,13 @@ static int set_up_context_variables(struct hfi1_devdata *dd) num_kernel_contexts = dd->chip_send_contexts - num_vls -1 ; }/* -* User contexts: (to be fixed later) -* - default to 1 user context per CPU if num_user_contexts is -* negative +* User contexts: +* - default to 1 user context per real (non-HT) CPU core if +* num_user_contexts is negative */ if (num_user_contexts <0 ) - num_user_contexts =num_online_cpus (); + num_user_contexts = +cpumask_weight (&dd->affinity->real_cpu_mask); total_contexts = num_kernel_contexts + num_user_contexts;
@@ -14089,6 +14090,19 @@ struct hfi1_devdata *hfi1_init_dd(struct pci_dev *pdev, (dd->revision >>CCE_REVISION_SW_SHIFT ) & CCE_REVISION_SW_MASK); +/* +* The real cpu mask is part of the affinity struct but has to be +* initialized earlier than the rest of the affinity struct because it +* is needed to calculate the number of user contexts in +* set_up_context_variables(). However, hfi1_dev_affinity_init(), +* which initializes the rest of the affinity struct members, +* depends on set_up_context_variables() for the number of kernel +* contexts, so it cannot be called before set_up_context_variables(). +*/ + ret =init_real_cpu_mask (dd); +if (ret) + goto bail_cleanup; + ret =set_up_context_variables (dd);if (ret) goto bail_cleanup;
@@ -14102,9 +14116,7 @@ struct hfi1_devdata *hfi1_init_dd(struct pci_dev *pdev,/* set up KDETH QP prefix in both RX and TX CSRs */ init_kdeth_qp (dd); - ret =hfi1_dev_affinity_init (dd); -if (ret) - goto bail_cleanup; +hfi1_dev_affinity_init (dd);/* send contexts must be set up before receive contexts */ ret =init_send_contexts (dd);
--
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 17/21 IB/hfi1: Reduce kernel context pio buffer allocation
In reply to a message not in the archiveFrom: Jianxin Xiong <[email protected]>
The pio buffers were pooled evenly among all kernel contexts and user contexts. However, the demand from kernel contexts is much lower than user contexts. This patch reduces the allocation for kernel contexts and thus makes more credits available for PSM, helping performance. This is especially useful on high core-count systems where large numbers of contexts are used.
A new context type SC_VL15 is added to distinguish the context used for VL15 from other kernel contexts. The reason is that VL15 needs to support 2KB sized packet while other kernel contexts need only support packets up to the size determined by "piothreshold", which has a default value of 256.
The new allocation method allows triple buffering of largest pio packets configured for these contexts. This is sufficient to maintain verbs performance. The largest pio packet size is 2048B for VL15 and "piothreshold" for other kernel contexts. A cap is applied to "piothreshold" to avoid excessive buffer allocation.
The special case that SDMA is disable is handled differently. In that case, the original pooling allocation is used to better support the much higher pio traffic.
Notice that if adaptive pio is disabled (piothreshold==0), the pio buffer size doesn't matter for non-VL15 kernel send contexts when SDMA is enabled because pio is not used at all on these contexts and thus the new allocation is still valid. If SDMA is disabled then pooling allocation is used as mentioned in previous paragraph.
Adjustment is also made to the calculation of the credit return threshold for the kernel contexts. Instead of purely based on the MTU size, a percentage based threshold is also considered and the smaller one of the two is chosen. This is necessary to ensure that with the reduced buffer allocation credits are returned in time to avoid unnecessary stall in the send path.
--- drivers/staging/rdma/hfi1/chip.c | 27 +++++++++++--------- drivers/staging/rdma/hfi1/diag.c | 3 +- drivers/staging/rdma/hfi1/pio.c | 52 ++++++++++++++++++++++++++++++-------- drivers/staging/rdma/hfi1/pio.h | 4 ++- 4 files changed, 61 insertions(+), 25 deletions(-)
drivers/staging/rdma/hfi1/chip.c +15 -12
@@ -5661,7 +5661,7 @@ static int sc_to_vl(struct hfi1_devdata *dd, int sw_index) sci = &dd->send_contexts[sw_index];/* there is no information for user (PSM) and ack contexts */ -if (sci->type !=SC_KERNEL ) +if ((sci->type !=SC_KERNEL ) && (sci->type !=SC_VL15 ))return -1 ; sc = sci->sc;
@@ -9627,6 +9627,7 @@ static void set_send_length(struct hfi1_pportdata *ppd) & SEND_LEN_CHECK1_LEN_VL15_MASK) <<SEND_LEN_CHECK1_LEN_VL15_SHIFT ;int i; +u32 thres;for (i =0 ; i < ppd->vls_supported; i++) {if (dd->vld[i].mtu > maxvlmtu)
@@ -9645,16 +9646,17 @@ static void set_send_length(struct hfi1_pportdata *ppd)/* adjust kernel credit return thresholds based on new MTUs */ /* all kernel receive contexts have the same hdrqentsize */ for (i =0 ; i < ppd->vls_supported; i++) { -sc_set_cr_threshold (dd->vld[i].sc, -sc_mtu_to_threshold (dd->vld[i].sc, - dd->vld[i].mtu, - dd->rcd[0 ]-> - rcvhdrqentsize)); - } -sc_set_cr_threshold (dd->vld[15 ].sc, -sc_mtu_to_threshold (dd->vld[15 ].sc, - dd->vld[15 ].mtu, + thres =min (sc_percent_to_threshold (dd->vld[i].sc,50 ), +sc_mtu_to_threshold (dd->vld[i].sc, + dd->vld[i].mtu, dd->rcd[0 ]->rcvhdrqentsize)); +sc_set_cr_threshold (dd->vld[i].sc, thres); + } + thres =min (sc_percent_to_threshold (dd->vld[15 ].sc,50 ), +sc_mtu_to_threshold (dd->vld[15 ].sc, + dd->vld[15 ].mtu, + dd->rcd[0 ]->rcvhdrqentsize)); +sc_set_cr_threshold (dd->vld[15 ].sc, thres);/* Adjust maximum MTU for the port in DC */ dcmtu = maxvlmtu == 10240 ? DCC_CFG_PORT_MTU_CAP_10240 :
@@ -12728,12 +12730,13 @@ static int set_up_context_variables(struct hfi1_devdata *dd) dd->num_send_contexts = ret;dd_dev_info ( dd, -"send contexts: chip %d, used %d (kernel %d, ack %d, user %d)\n" , +"send contexts: chip %d, used %d (kernel %d, ack %d, user %d, vl15 %d)\n" , dd->chip_send_contexts, dd->num_send_contexts, dd->sc_sizes[SC_KERNEL ].count, dd->sc_sizes[SC_ACK ].count, - dd->sc_sizes[SC_USER ].count); + dd->sc_sizes[SC_USER ].count, + dd->sc_sizes[SC_VL15 ].count); ret =0 ;/* success */ }
drivers/staging/rdma/hfi1/diag.c +2 -1
@@ -413,7 +413,8 @@ static ssize_t diagpkt_send(struct diag_pkt *dp) goto bail; }/* can only use kernel contexts */ -if (dd->send_contexts[dp->sw_index].type !=SC_KERNEL ) { +if (dd->send_contexts[dp->sw_index].type !=SC_KERNEL && + dd->send_contexts[dp->sw_index].type !=SC_VL15 ) { ret = -EINVAL ; goto bail; }
drivers/staging/rdma/hfi1/pio.c +41 -11
119 lines not on this page · raw message
drivers/staging/rdma/hfi1/pio.h +3 -1
@@ -51,7 +51,8 @@#define SC_KERNEL 0#define SC_ACK 1#define SC_USER 2 -#define SC_MAX 3 +#define SC_VL15 3 +#define SC_MAX 4/* invalid send context index */ #define INVALID_SCI 0xff
@@ -293,6 +294,7 @@ void sc_group_release_update(struct hfi1_devdata *dd, u32 hw_context);void sc_add_credit_return_intr (struct send_context *sc);void sc_del_credit_return_intr (struct send_context *sc);void sc_set_cr_threshold (struct send_context *sc,u32 new_threshold); +u32 sc_percent_to_threshold (struct send_context *sc,u32 percent);u32 sc_mtu_to_threshold (struct send_context *sc,u32 mtu,u32 hdrqentsize);void hfi1_sc_wantpiobuf_intr (struct send_context *sc,u32 needint);void sc_wait (struct hfi1_devdata *dd);
--
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 18/21 IB/hfi1: Extract RSM map table init from QOS
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
Refactor the allocation, tracking, and writing of the RSM map table into its own set of routines. This will allow the map table to be passed to multiple users to fill in as needed. Start with the original user, QOS.
--- drivers/staging/rdma/hfi1/chip.c | 91 ++++++++++++++++++++++------ drivers/staging/rdma/hfi1/chip_registers.h | 1 2 files changed, 71 insertions(+), 21 deletions(-)
drivers/staging/rdma/hfi1/chip.c +70 -21
@@ -123,6 +123,8 @@ struct flag_table {#define MIN_KERNEL_KCTXTS 2#define FIRST_KERNEL_KCTXT 1 +/* sizes for both the QP and RSM map tables */ +#define NUM_MAP_ENTRIES 256#define NUM_MAP_REGS 32/* Bit offset into the GUID which carries HFI id information */
@@ -13422,9 +13424,52 @@ static void init_qpmap_table(struct hfi1_devdata *dd, | RCV_CTRL_RCV_BYPASS_ENABLE_SMASK); } +struct rsm_map_table { +u64 map[NUM_MAP_REGS ]; +unsigned int used; +}; + +/* +* Return an initialized RMT map table for users to fill in. OK if it +* returns NULL, indicating no table. +*/ +static struct rsm_map_table *alloc_rsm_map_table (struct hfi1_devdata *dd) +{ +struct rsm_map_table *rmt; +u8 rxcontext =is_ax (dd) ?0 :0xff ;/* 0 is default if a0 ver. */ + + rmt =kmalloc (sizeof (*rmt),GFP_KERNEL ); +if (rmt) { +memset (rmt->map, rxcontext,sizeof (rmt->map)); + rmt->used =0 ; + } + +return rmt; +} + +/* +* Write the final RMT map table to the chip and free the table. OK if +* table is NULL. +*/ +static void complete_rsm_map_table (struct hfi1_devdata *dd, +struct rsm_map_table *rmt) +{ +int i; + +if (rmt) { +/* write table to chip */ +for (i =0 ; i <NUM_MAP_REGS ; i++) +write_csr (dd,RCV_RSM_MAP_TABLE + (8 * i), rmt->map[i]); + +/* enable RSM */ +add_rcvctrl (dd,RCV_CTRL_RCV_RSM_ENABLE_SMASK ); + } +} +/** * init_qos - init RX qos * @dd - device data +* @rmt - RSM map table * * This routine initializes Rule 0 and the RSM map table to implement * quality of service (qos).
@@ -13435,16 +13480,16 @@ static void init_qpmap_table(struct hfi1_devdata *dd,* The number of vl bits (n) and the number of qpn bits (m) are computed to * feed both the RSM map table and the single rule. */ -static void init_qos (struct hfi1_devdata *dd) +static void init_qos (struct hfi1_devdata *dd,struct rsm_map_table *rmt) {u8 max_by_vl =0 ;unsigned qpns_per_vl, ctxt, i, qpn, n =1 , m; -u64 *rsmmap; +unsigned int rmt_entries;u64 reg; -u8 rxcontext =is_ax (dd) ?0 :0xff ;/* 0 is default if a0 ver. */ /* validate */ -if (dd->n_krcv_queues <=MIN_KERNEL_KCTXTS || +if (!rmt || + dd->n_krcv_queues <=MIN_KERNEL_KCTXTS || num_vls ==1 || krcvqsset <=1 ) goto bail;
@@ -13460,11 +13505,11 @@ static void init_qos(struct hfi1_devdata *dd) m =ilog2 (qpns_per_vl);if ((m + n) >7 ) goto bail; - rsmmap =kmalloc_array (NUM_MAP_REGS ,sizeof (u64),GFP_KERNEL ); -if (!rsmmap) +/* enough room in the map table? */ + rmt_entries =1 << (m + n); +if (rmt->used + rmt_entries >=NUM_MAP_ENTRIES ) goto bail; -memset (rsmmap, rxcontext,NUM_MAP_REGS *sizeof (u64)); -/* init the local copy of the table */ +/* add qos entries to the the RSM map table */ for (i =0 , ctxt =FIRST_KERNEL_KCTXT ; i < num_vls; i++) {unsigned tctxt;
@@ -13472,26 +13517,24 @@ static void init_qos(struct hfi1_devdata *dd) krcvqs[i] && qpn < qpns_per_vl; qpn++) {unsigned idx, regoff, regidx; -/* generate index <= 128 */ - idx = (qpn << n) ^ i; +/* generate the index the hardware will produce */ + idx = rmt->used + ((qpn << n) ^ i); regoff = (idx %8 ) *8 ; regidx = idx /8 ; - reg = rsmmap[regidx]; -/* replace 0xff with context number */ +/* replace default with context number */ + reg = rmt->map[regidx]; reg &= ~(RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK << regoff); reg |= (u64)(tctxt++) << regoff; - rsmmap[regidx] = reg; + rmt->map[regidx] = reg;if (tctxt == ctxt + krcvqs[i]) tctxt = ctxt; } ctxt += krcvqs[i]; } -/* flush cached copies to chip */ -for (i =0 ; i <NUM_MAP_REGS ; i++) -write_csr (dd,RCV_RSM_MAP_TABLE + (8 * i), rsmmap[i]);/* add rule0 */ write_csr (dd,RCV_RSM_CFG /* + (8 * 0) */ , + (u64 )rmt->used <<RCV_RSM_CFG_OFFSET_SHIFT |RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_MASK <<RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_SHIFT |2ull <<RCV_RSM_CFG_PACKET_TYPE_SHIFT );
@@ -13507,9 +13550,8 @@ static void init_qos(struct hfi1_devdata *dd)LRH_BTH_VALUE <<RCV_RSM_MATCH_VALUE1_SHIFT |LRH_SC_MASK <<RCV_RSM_MATCH_MASK2_SHIFT | LRH_SC_VALUE << RCV_RSM_MATCH_VALUE2_SHIFT); -/* Enable RSM */ -add_rcvctrl (dd,RCV_CTRL_RCV_RSM_ENABLE_SMASK ); -kfree (rsmmap); +/* mark RSM map entries as used */ + rmt->used += rmt_entries;/* map everything else to the mcast/err/vl15 context */ init_qpmap_table (dd,HFI1_CTRL_CTXT ,HFI1_CTRL_CTXT ); dd->qos_shift = n +1 ;
@@ -13521,10 +13563,17 @@ bail:static void init_rxe (struct hfi1_devdata *dd) { +struct rsm_map_table *rmt; +/* enable all receive errors */ write_csr (dd,RCV_ERR_MASK , ~0ull ); -/* setup QPN map table - start where VL15 context leaves off */ -init_qos (dd); + + rmt =alloc_rsm_map_table (dd); +/* set up QOS, including the QPN map table */ +init_qos (dd, rmt); +complete_rsm_map_table (dd, rmt); +kfree (rmt); +/* * make sure RcvCtrl.RcvWcb <= PCIe Device Control * Register Max_Payload_Size (PCI_EXP_DEVCTL in Linux PCIe config
drivers/staging/rdma/hfi1/chip_registers.h +1 -0
@@ -771,6 +771,7 @@#define RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_MASK 0x1ull#define RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_SHIFT 0#define RCV_RSM_CFG_PACKET_TYPE_SHIFT 60 +#define RCV_RSM_CFG_OFFSET_SHIFT 32#define RCV_RSM_MAP_TABLE (RXE + 0x000000000900)#define RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK 0xFFull#define RCV_RSM_MATCH (RXE + 0x000000000800)
--
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 19/21 IB/hfi1: Move QOS decision logic into its own function
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
The decision to use QOS affects other resource allocation. Move the QOS decision logic into its own function so it can be called by other interested parties.
--- drivers/staging/rdma/hfi1/chip.c | 67 ++++++++++++++++++++++++++++---------- 1 files changed, 50 insertions(+), 17 deletions(-)
drivers/staging/rdma/hfi1/chip.c +50 -17
@@ -13466,6 +13466,50 @@ static void complete_rsm_map_table(struct hfi1_devdata *dd, } } +/* return the number of RSM map table entries that will be used for QOS */ +static int qos_rmt_entries (struct hfi1_devdata *dd,unsigned int *mp, +unsigned int *np) +{ +int i; +unsigned int m, n; +u8 max_by_vl =0 ; + +/* is QOS active at all? */ +if (dd->n_krcv_queues <=MIN_KERNEL_KCTXTS || + num_vls ==1 || + krcvqsset <=1 ) + goto no_qos; + +/* determine bits for qpn */ + for (i = 0; i < min_t(unsigned int, num_vls, krcvqsset); i++) +if (krcvqs[i] > max_by_vl) + max_by_vl = krcvqs[i]; +if (max_by_vl >32 ) + goto no_qos; + m =ilog2 (__roundup_pow_of_two (max_by_vl)); + +/* determine bits for vl */ + n =ilog2 (__roundup_pow_of_two (num_vls)); + +/* reject if too much is used */ +if ((m + n) >7 ) + goto no_qos; + +if (mp) + *mp = m; +if (np) + *np = n; + +return 1 << (m + n); + +no_qos: +if (mp) + *mp =0 ; +if (np) + *np =0 ; +return 0 ; +} +/** * init_qos - init RX qos * @dd - device data
@@ -13482,33 +13526,22 @@ static void complete_rsm_map_table(struct hfi1_devdata *dd,*/ static void init_qos (struct hfi1_devdata *dd,struct rsm_map_table *rmt) { -u8 max_by_vl =0 ;unsigned qpns_per_vl, ctxt, i, qpn, n =1 , m;unsigned int rmt_entries;u64 reg; -/* validate */ -if (!rmt || - dd->n_krcv_queues <=MIN_KERNEL_KCTXTS || - num_vls ==1 || - krcvqsset <=1 ) - goto bail; -for (i =0 ; i <min_t (unsigned, num_vls, krcvqsset); i++) -if (krcvqs[i] > max_by_vl) - max_by_vl = krcvqs[i]; -if (max_by_vl >32 ) +if (!rmt) goto bail; - qpns_per_vl =__roundup_pow_of_two (max_by_vl); -/* determine bits vl */ - n =ilog2 (__roundup_pow_of_two (num_vls)); -/* determine bits for qpn */ - m =ilog2 (qpns_per_vl); -if ((m + n) >7 ) + rmt_entries =qos_rmt_entries (dd, &m, &n); +if (rmt_entries ==0 ) goto bail; + qpns_per_vl =1 << m; +/* enough room in the map table? */ rmt_entries =1 << (m + n);if (rmt->used + rmt_entries >=NUM_MAP_ENTRIES ) goto bail; +/* add qos entries to the the RSM map table */ for (i =0 , ctxt =FIRST_KERNEL_KCTXT ; i < num_vls; i++) {unsigned tctxt;
--
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 20/21 IB/hfi1: Create a routine to set a receive side mapping rule
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
Move the rule setting code into its own routine for improved searchability and reuse.
--- drivers/staging/rdma/hfi1/chip.c | 75 +++++++++++++++++++++++++++++--------- 1 files changed, 57 insertions(+), 18 deletions(-)
drivers/staging/rdma/hfi1/chip.c +57 -18
@@ -13429,6 +13429,21 @@ struct rsm_map_table {unsigned int used; }; +struct rsm_rule_data { +u8 offset; +u8 pkt_type; +u32 field1_off; +u32 field2_off; +u32 index1_off; +u32 index1_width; +u32 index2_off; +u32 index2_width; +u32 mask1; +u32 value1; +u32 mask2; +u32 value2; +}; +/* * Return an initialized RMT map table for users to fill in. OK if it * returns NULL, indicating no table.
@@ -13466,6 +13481,30 @@ static void complete_rsm_map_table(struct hfi1_devdata *dd, } } +/* +* Add a receive side mapping rule. +*/ +static void add_rsm_rule (struct hfi1_devdata *dd,u8 rule_index, +struct rsm_rule_data *rrd) +{ +write_csr (dd,RCV_RSM_CFG + (8 * rule_index), + (u64 )rrd->offset <<RCV_RSM_CFG_OFFSET_SHIFT | +1ull << rule_index |/* enable bit */ + (u64 )rrd->pkt_type <<RCV_RSM_CFG_PACKET_TYPE_SHIFT ); +write_csr (dd,RCV_RSM_SELECT + (8 * rule_index), + (u64 )rrd->field1_off <<RCV_RSM_SELECT_FIELD1_OFFSET_SHIFT | + (u64 )rrd->field2_off <<RCV_RSM_SELECT_FIELD2_OFFSET_SHIFT | + (u64 )rrd->index1_off <<RCV_RSM_SELECT_INDEX1_OFFSET_SHIFT | + (u64 )rrd->index1_width <<RCV_RSM_SELECT_INDEX1_WIDTH_SHIFT | + (u64 )rrd->index2_off <<RCV_RSM_SELECT_INDEX2_OFFSET_SHIFT | + (u64 )rrd->index2_width <<RCV_RSM_SELECT_INDEX2_WIDTH_SHIFT ); +write_csr (dd,RCV_RSM_MATCH + (8 * rule_index), + (u64 )rrd->mask1 <<RCV_RSM_MATCH_MASK1_SHIFT | + (u64 )rrd->value1 <<RCV_RSM_MATCH_VALUE1_SHIFT | + (u64 )rrd->mask2 <<RCV_RSM_MATCH_MASK2_SHIFT | + (u64 )rrd->value2 <<RCV_RSM_MATCH_VALUE2_SHIFT ); +} +/* return the number of RSM map table entries that will be used for QOS */ static int qos_rmt_entries (struct hfi1_devdata *dd,unsigned int *mp,unsigned int *np)
@@ -13526,6 +13565,7 @@ no_qos:*/ static void init_qos (struct hfi1_devdata *dd,struct rsm_map_table *rmt) { +struct rsm_rule_data rrd;unsigned qpns_per_vl, ctxt, i, qpn, n =1 , m;unsigned int rmt_entries;u64 reg;
@@ -13565,24 +13605,23 @@ static void init_qos(struct hfi1_devdata *dd, struct rsm_map_table *rmt) } ctxt += krcvqs[i]; } -/* add rule0 */ -write_csr (dd,RCV_RSM_CFG /* + (8 * 0) */ , - (u64 )rmt->used <<RCV_RSM_CFG_OFFSET_SHIFT | -RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_MASK << -RCV_RSM_CFG_ENABLE_OR_CHAIN_RSM0_SHIFT | -2ull <<RCV_RSM_CFG_PACKET_TYPE_SHIFT ); -write_csr (dd,RCV_RSM_SELECT /* + (8 * 0) */ , -LRH_BTH_MATCH_OFFSET <<RCV_RSM_SELECT_FIELD1_OFFSET_SHIFT | -LRH_SC_MATCH_OFFSET <<RCV_RSM_SELECT_FIELD2_OFFSET_SHIFT | -LRH_SC_SELECT_OFFSET <<RCV_RSM_SELECT_INDEX1_OFFSET_SHIFT | - ((u64 )n) <<RCV_RSM_SELECT_INDEX1_WIDTH_SHIFT | -QPN_SELECT_OFFSET <<RCV_RSM_SELECT_INDEX2_OFFSET_SHIFT | - ((u64 )m + (u64 )n) <<RCV_RSM_SELECT_INDEX2_WIDTH_SHIFT ); -write_csr (dd,RCV_RSM_MATCH /* + (8 * 0) */ , -LRH_BTH_MASK <<RCV_RSM_MATCH_MASK1_SHIFT | -LRH_BTH_VALUE <<RCV_RSM_MATCH_VALUE1_SHIFT | -LRH_SC_MASK <<RCV_RSM_MATCH_MASK2_SHIFT | -LRH_SC_VALUE <<RCV_RSM_MATCH_VALUE2_SHIFT ); + + rrd.offset = rmt->used; + rrd.pkt_type =2 ; + rrd.field1_off =LRH_BTH_MATCH_OFFSET ; + rrd.field2_off =LRH_SC_MATCH_OFFSET ; + rrd.index1_off =LRH_SC_SELECT_OFFSET ; + rrd.index1_width = n; + rrd.index2_off =QPN_SELECT_OFFSET ; + rrd.index2_width = m + n; + rrd.mask1 =LRH_BTH_MASK ; + rrd.value1 =LRH_BTH_VALUE ; + rrd.mask2 =LRH_SC_MASK ; + rrd.value2 =LRH_SC_VALUE ; + +/* add rule 0 */ +add_rsm_rule (dd,0 , &rrd); +/* mark RSM map entries as used */ rmt->used += rmt_entries;/* map everything else to the mcast/err/vl15 context */
--
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 21/21 IB/hfi1: Add RSM rule for user FECN handling
In reply to a message not in the archiveFrom: Dean Luick <[email protected]>
Add a receive side mapping rule to extract expected user packets with the FECN bit set and place them in an eager buffer. This will allow user libraries to recognize that a FECN was sent when using header suppression and respond appropriately.
--- drivers/staging/rdma/hfi1/chip.c | 84 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 84 insertions(+), 0 deletions(-)
drivers/staging/rdma/hfi1/chip.c +84 -0
@@ -1034,6 +1034,8 @@ static void read_planned_down_reason_code(struct hfi1_devdata *dd, u8 *pdrrc);static void handle_temp_err (struct hfi1_devdata *);static void dc_shutdown (struct hfi1_devdata *);static void dc_start (struct hfi1_devdata *); +static int qos_rmt_entries (struct hfi1_devdata *dd,unsigned int *mp, +unsigned int *np);/* * Error interrupt table entry. This is used as input to the interrupt
@@ -12628,6 +12630,8 @@ static int set_up_context_variables(struct hfi1_devdata *dd)int total_contexts;int ret;unsigned ngroups; +int qos_rmt_count; +int user_rmt_reduced;/* * Kernel receive contexts:
@@ -12683,6 +12687,19 @@ static int set_up_context_variables(struct hfi1_devdata *dd) total_contexts = num_kernel_contexts + num_user_contexts; } +/* each user context requires an entry in the RMT */ + qos_rmt_count =qos_rmt_entries (dd,NULL ,NULL ); +if (qos_rmt_count + num_user_contexts >NUM_MAP_ENTRIES ) { + user_rmt_reduced =NUM_MAP_ENTRIES - qos_rmt_count; +dd_dev_err (dd, +"RMT size is reducing the number of user receive contexts from %d to %d\n" , + (int )num_user_contexts, + user_rmt_reduced); +/* recalculate */ + num_user_contexts = user_rmt_reduced; + total_contexts = num_kernel_contexts + num_user_contexts; + } +/* the first N are kernel contexts, the rest are user contexts */ dd->num_rcv_contexts = total_contexts; dd->n_krcv_queues = num_kernel_contexts;
@@ -13633,6 +13650,72 @@ bail:init_qpmap_table (dd,FIRST_KERNEL_KCTXT , dd->n_krcv_queues -1 ); } +static void init_user_fecn_handling (struct hfi1_devdata *dd, +struct rsm_map_table *rmt) +{ +struct rsm_rule_data rrd; +u64 reg; +int i, idx, regoff, regidx; +u8 offset; + +/* there needs to be enough room in the map table */ +if (rmt->used + dd->num_user_contexts >=NUM_MAP_ENTRIES ) { +dd_dev_err (dd,"User FECN handling disabled - too many user contexts allocated\n" ); +return ; + } + +/* +* RSM will extract the destination context as an index into the +* map table. The destination contexts are a sequential block +* in the range first_user_ctxt...num_rcv_contexts-1 (inclusive). +* Map entries are accessed as offset + extracted value. Adjust +* the added offset so this sequence can be placed anywhere in +* the table - as long as the entries themselves do not wrap. +* There are only enough bits in offset for the table size, so +* start with that to allow for a "negative" offset. +*/ + offset = (u8)(NUM_MAP_ENTRIES + (int )rmt->used - + (int )dd->first_user_ctxt); + +for (i = dd->first_user_ctxt, idx = rmt->used; + i < dd->num_rcv_contexts; i++, idx++) { +/* replace with identity mapping */ + regoff = (idx %8 ) *8 ; + regidx = idx /8 ; + reg = rmt->map[regidx]; + reg &= ~(RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK << regoff); + reg |= (u64 )i << regoff; + rmt->map[regidx] = reg; + } + +/* +* For RSM intercept of Expected FECN packets: +* o packet type 0 - expected +* o match on F (bit 95), using select/match 1, and +* o match on SH (bit 133), using select/match 2. +* +* Use index 1 to extract the 8-bit receive context from DestQP +* (start at bit 64). Use that as the RSM map table index. +*/ + rrd.offset = offset; + rrd.pkt_type =0 ; + rrd.field1_off =95 ; + rrd.field2_off =133 ; + rrd.index1_off =64 ; + rrd.index1_width =8 ; + rrd.index2_off =0 ; + rrd.index2_width =0 ; + rrd.mask1 =1 ; + rrd.value1 =1 ; + rrd.mask2 =1 ; + rrd.value2 =1 ; + +/* add rule 1 */ +add_rsm_rule (dd,1 , &rrd); + + rmt->used += dd->num_user_contexts; +} +static void init_rxe (struct hfi1_devdata *dd) {struct rsm_map_table *rmt;
@@ -13643,6 +13726,7 @@ static void init_rxe(struct hfi1_devdata *dd) rmt =alloc_rsm_map_table (dd);/* set up QOS, including the QPN map table */ init_qos (dd, rmt); +init_user_fecn_handling (dd, rmt);complete_rsm_map_table (dd, rmt);kfree (rmt);
--
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
These patches do some clean ups and fix issues which may not be appropriate for an RC so we are targeting these for 4.7. The current patch series applies on top of the "Important bug fixes for 4.6 RC" patch set submitted just prior to this.
Patches can be viewed in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.7.
Please follow SubmittingPatches guide - submitting fixes section.
Thanks.
A message that is not in the archive (sent off-list or not yet received): 20160418070936.GK6349-2ukJVAZIZ/[email protected]
Quoted 10 lines · Leon Romanovsky
Quoted 6 lines · Dennis Dalessandro
These patches do some clean ups and fix issues which may not be appropriate for an RC so we are targeting these for 4.7. The current patch series applies on top of the "Important bug fixes for 4.6 RC" patch set submitted just prior to this.
Patches can be viewed in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.7.Please follow SubmittingPatches guide - submitting fixes section.
Can you please be more specific with what your complaint is here? Which section are you referring to? There is no "submitting fixes" section in the document.
-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): 20160418120754.GC17987-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org
Quoted 9 lines · Dennis Dalessandro
Quoted 8 lines · Leon Romanovsky
Quoted 6 lines · Dennis Dalessandro
These patches do some clean ups and fix issues which may not be appropriate for an RC so we are targeting these for 4.7. The current patch series applies on top of the "Important bug fixes for 4.6 RC" patch set submitted just prior to this.
Patches can be viewed in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.7.
Quoted 6 lines
Quoted 2 lines
Please follow SubmittingPatches guide - submitting fixes section.
Can you please be more specific with what your complaint is here? Which section are you referring to? There is no "submitting fixes" section in the document.
If your patch fixes a bug in a specific commit, e.g. you found an issue using git-bisect, please use the 'Fixes:' tag with the first 12 characters of the SHA-1 ID, and the one line summary. For example:
https://www.kernel.org/doc/Documentation/SubmittingPatches
Quoted 2 lines
-Denny
A message that is not in the archive (sent off-list or not yet received): 20160418121944.GL6349-2ukJVAZIZ/[email protected]
Quoted 18 lines · Leon Romanovsky
Quoted 9 lines · Dennis Dalessandro
Quoted 8 lines · Leon Romanovsky
Quoted 6 lines · Dennis Dalessandro
These patches do some clean ups and fix issues which may not be appropriate for an RC so we are targeting these for 4.7. The current patch series applies on top of the "Important bug fixes for 4.6 RC" patch set submitted just prior to this.
Patches can be viewed in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.7.Quoted 6 lines
Quoted 2 lines
Please follow SubmittingPatches guide - submitting fixes section.
Can you please be more specific with what your complaint is here? Which section are you referring to? There is no "submitting fixes" section in the document.
Quoted 7 lines
If your patch fixes a bug in a specific commit, e.g. you found an issue using git-bisect, please use the 'Fixes:' tag with the first 12 characters of the SHA-1 ID, and the one line summary. For example:
Fixes e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
When there is a specific commit that broke something, sure. I think folks usually add that when appropriate, it's not always the case. "Fix" is a general term in a lot of patches. Could be day-0 bug, or the result of multiple commits coming together, etc.
Regardless, is there a patch here in this series that you need more back story on? Please let me know and I'll track it down.
-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): 20160418133842.GA7596-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org
Quoted 23 lines · Dennis Dalessandro
Quoted 22 lines · Leon Romanovsky
Quoted 9 lines · Dennis Dalessandro
Quoted 8 lines · Leon Romanovsky
Quoted 6 lines · Dennis Dalessandro
These patches do some clean ups and fix issues which may not be appropriate for an RC so we are targeting these for 4.7. The current patch series applies on top of the "Important bug fixes for 4.6 RC" patch set submitted just prior to this.
Patches can be viewed in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.7.Quoted 6 lines
Quoted 2 lines
Please follow SubmittingPatches guide - submitting fixes section.
Can you please be more specific with what your complaint is here? Which section are you referring to? There is no "submitting fixes" section in the document.
If your patch fixes a bug in a specific commit, e.g. you found an issue using git-bisect, please use the 'Fixes:' tag with the first 12 characters of the SHA-1 ID, and the one line summary. For example:
Quoted 8 lines
Quoted 3 lines
Fixes e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")When there is a specific commit that broke something, sure. I think folks usually add that when appropriate, it's not always the case. "Fix" is a general term in a lot of patches. Could be day-0 bug, or the result of multiple commits coming together, etc.
Fixes line will help to the users and developers to get a sense if the failure they see can be related to the code which they have (SHA-1).
Especially, it is valuable when it comes from the vendor who does extensive testing and can perfectly explain what they are fixing.
Quoted 3 lines
Regardless, is there a patch here in this series that you need more back story on? Please let me know and I'll track it down.
Every commit which suppose to fix something.
Quoted 2 lines
-Denny
Quoted 58 lines · Dennis Dalessandro
These patches do some clean ups and fix issues which may not be appropriate for an RC so we are targeting these for 4.7. The current patch series applies on top of the "Important bug fixes for 4.6 RC" patch set submitted just prior to this.
Patches can be viewed in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.7.---
Dean Luick (13):
IB/hfi1: Fix sysfs file offset usage
IB/hfi1: Fix i2c resource reservation checks IB/hfi1: Fix QOSnum_vlbit width
IB/hfi1: Remove invalid QOS check
IB/hfi1: Fix QOS rule mappings
IB/hfi1: Correctly obtain the full service class IB/hfi1: Simplifyinit_qpmap_table()
IB/hfi1: Guard against concurrent I2C access across all chains IB/hfi1: Fix double QSFP resource acquire on cache refresh IB/hfi1: Extract RSM map table init from QOS IB/hfi1: Move QOS decision logic into its own function IB/hfi1: Create a routine to set a receive side mapping rule IB/hfi1: Add RSM rule for user FECN handlingEaswar Hariharan (2):
IB/hfi1: Always turn on CDRs for low power QSFP modules IB/hfi1: Remove module presence check outside pre-LNI checksJianxin Xiong (1):
IB/hfi1: Reduce kernel context pio buffer allocationJubin John (1):
IB/hfi1: Change default number of user contextsMike Marciniszyn (2):
IB/hfi1: Remove unreachable code
IB/hfi1: Use global defines for upper bits in opcodeSebastian Sanchez (2):
IB/hfi1: Adjust default MTU to be 10KB IB/hfi1: CheckP_KEYfor all sent packets from user modedrivers/infiniband/sw/rdmavt/qp.c | 6 drivers/staging/rdma/hfi1/affinity.c | 93 +++-- drivers/staging/rdma/hfi1/affinity.h | 19 + drivers/staging/rdma/hfi1/chip.c | 485 +++++++++++++++++++--------- drivers/staging/rdma/hfi1/chip.h | 1 drivers/staging/rdma/hfi1/chip_registers.h | 1 drivers/staging/rdma/hfi1/diag.c | 3 drivers/staging/rdma/hfi1/driver.c | 3 drivers/staging/rdma/hfi1/firmware.c | 9 - drivers/staging/rdma/hfi1/hfi.h | 11 - drivers/staging/rdma/hfi1/init.c | 1 drivers/staging/rdma/hfi1/pio.c | 52 ++- drivers/staging/rdma/hfi1/pio.h | 4 drivers/staging/rdma/hfi1/platform.c | 99 +++--- drivers/staging/rdma/hfi1/qp.c | 6
Quoted 9 lines
drivers/staging/rdma/hfi1/qsfp.c | 58 ++- drivers/staging/rdma/hfi1/qsfp.h | 15 - drivers/staging/rdma/hfi1/rc.c | 2 drivers/staging/rdma/hfi1/sysfs.c | 4 drivers/staging/rdma/hfi1/user_sdma.c | 7 drivers/staging/rdma/hfi1/verbs.c | 108 ++++-- drivers/staging/rdma/hfi1/verbs.h | 3 22 files changed, 639 insertions(+), 351 deletions(-)
Series applied, thanks.
Signature · 2 lines
Doug Ledford <[email protected]> GPG KeyID: 0E572FDD