All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH infiniband-diags] Add Bull device ID support to device white lists
@ 2016-12-06 19:22 Hal Rosenstock
       [not found] ` <e5ad4256-53fe-9ecc-f880-89347134ec42-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Hal Rosenstock @ 2016-12-06 19:22 UTC (permalink / raw)
  To: Weiny, Ira; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA


Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/libibnetdisc/src/ibnetdisc.c b/libibnetdisc/src/ibnetdisc.c
index 6ef7805..223e097 100644
--- a/libibnetdisc/src/ibnetdisc.c
+++ b/libibnetdisc/src/ibnetdisc.c
@@ -197,7 +197,7 @@ static int is_mlnx_ext_port_info_supported(ibnd_port_t * port)
 {
 	uint16_t devid = (uint16_t) mad_get_field(port->node->info, 0, IB_NODE_DEVID_F);
 
-	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08)
+	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
 		return 1;
 	if (devid >= 0x1003 && devid <= 0x1016)
 		return 1;
diff --git a/src/ibdiag_common.c b/src/ibdiag_common.c
index 2a1e971..6809a1e 100644
--- a/src/ibdiag_common.c
+++ b/src/ibdiag_common.c
@@ -530,7 +530,7 @@ int is_port_info_extended_supported(ib_portid_t * dest, int port,
 int is_mlnx_ext_port_info_supported(uint32_t devid)
 {
 	if (ibd_ibnetdisc_flags & IBND_CONFIG_MLX_EPI) {
-		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08)
+		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
 			return 1;
 		if (devid >= 0x1003 && devid <= 0x1016)
 			return 1;
diff --git a/src/vendstat.c b/src/vendstat.c
index fb42a78..284ef93 100644
--- a/src/vendstat.c
+++ b/src/vendstat.c
@@ -149,6 +149,7 @@ static uint16_t ext_fw_info_device[][2] = {
 	{0xcf08, 0xcf08},	/* Switch-IB2 */
 	{0x01b3, 0x01b3},	/* IS-4 */
 	{0x1003, 0x1016},	/* Connect-X */
+	{0x1b02, 0x1b02},	/* Bull */
 	{0x0000, 0x0000}};
 
 static int is_ext_fw_info_supported(uint16_t device_id) {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH infiniband-diags] Add Bull device ID support to device white lists
       [not found] ` <e5ad4256-53fe-9ecc-f880-89347134ec42-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-12-07 14:53   ` ira.weiny
       [not found]     ` <20161207145338.GD24724-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: ira.weiny @ 2016-12-07 14:53 UTC (permalink / raw)
  To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Tue, Dec 06, 2016 at 02:22:52PM -0500, Hal Rosenstock wrote:
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thanks applied,
Ira

> ---
> diff --git a/libibnetdisc/src/ibnetdisc.c b/libibnetdisc/src/ibnetdisc.c
> index 6ef7805..223e097 100644
> --- a/libibnetdisc/src/ibnetdisc.c
> +++ b/libibnetdisc/src/ibnetdisc.c
> @@ -197,7 +197,7 @@ static int is_mlnx_ext_port_info_supported(ibnd_port_t * port)
>  {
>  	uint16_t devid = (uint16_t) mad_get_field(port->node->info, 0, IB_NODE_DEVID_F);
>  
> -	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08)
> +	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
>  		return 1;
>  	if (devid >= 0x1003 && devid <= 0x1016)
>  		return 1;
> diff --git a/src/ibdiag_common.c b/src/ibdiag_common.c
> index 2a1e971..6809a1e 100644
> --- a/src/ibdiag_common.c
> +++ b/src/ibdiag_common.c
> @@ -530,7 +530,7 @@ int is_port_info_extended_supported(ib_portid_t * dest, int port,
>  int is_mlnx_ext_port_info_supported(uint32_t devid)
>  {
>  	if (ibd_ibnetdisc_flags & IBND_CONFIG_MLX_EPI) {
> -		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08)
> +		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
>  			return 1;
>  		if (devid >= 0x1003 && devid <= 0x1016)
>  			return 1;
> diff --git a/src/vendstat.c b/src/vendstat.c
> index fb42a78..284ef93 100644
> --- a/src/vendstat.c
> +++ b/src/vendstat.c
> @@ -149,6 +149,7 @@ static uint16_t ext_fw_info_device[][2] = {
>  	{0xcf08, 0xcf08},	/* Switch-IB2 */
>  	{0x01b3, 0x01b3},	/* IS-4 */
>  	{0x1003, 0x1016},	/* Connect-X */
> +	{0x1b02, 0x1b02},	/* Bull */
>  	{0x0000, 0x0000}};
>  
>  static int is_ext_fw_info_supported(uint16_t device_id) {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH infiniband-diags] Add Bull device ID support to device white lists
       [not found]     ` <20161207145338.GD24724-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
@ 2016-12-09 10:32       ` Vincent Ficet
       [not found]         ` <584A8823.4070506-BUmcmmAb0Fc@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Vincent Ficet @ 2016-12-09 10:32 UTC (permalink / raw)
  To: ira.weiny, Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]

Hello,

The patch proposed by Hal Rosenstock does not list all Bull device IDs.

Please apply the attached patch which contains an up to date list of such IDs.

Best Regards,

Vincent


On 12/07/2016 03:53 PM, ira.weiny wrote:
> On Tue, Dec 06, 2016 at 02:22:52PM -0500, Hal Rosenstock wrote:
>> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Thanks applied,
> Ira
>
>> ---
>> diff --git a/libibnetdisc/src/ibnetdisc.c b/libibnetdisc/src/ibnetdisc.c
>> index 6ef7805..223e097 100644
>> --- a/libibnetdisc/src/ibnetdisc.c
>> +++ b/libibnetdisc/src/ibnetdisc.c
>> @@ -197,7 +197,7 @@ static int is_mlnx_ext_port_info_supported(ibnd_port_t * port)
>>  {
>>  	uint16_t devid = (uint16_t) mad_get_field(port->node->info, 0, IB_NODE_DEVID_F);
>>  
>> -	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08)
>> +	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
>>  		return 1;
>>  	if (devid >= 0x1003 && devid <= 0x1016)
>>  		return 1;
>> diff --git a/src/ibdiag_common.c b/src/ibdiag_common.c
>> index 2a1e971..6809a1e 100644
>> --- a/src/ibdiag_common.c
>> +++ b/src/ibdiag_common.c
>> @@ -530,7 +530,7 @@ int is_port_info_extended_supported(ib_portid_t * dest, int port,
>>  int is_mlnx_ext_port_info_supported(uint32_t devid)
>>  {
>>  	if (ibd_ibnetdisc_flags & IBND_CONFIG_MLX_EPI) {
>> -		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08)
>> +		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
>>  			return 1;
>>  		if (devid >= 0x1003 && devid <= 0x1016)
>>  			return 1;
>> diff --git a/src/vendstat.c b/src/vendstat.c
>> index fb42a78..284ef93 100644
>> --- a/src/vendstat.c
>> +++ b/src/vendstat.c
>> @@ -149,6 +149,7 @@ static uint16_t ext_fw_info_device[][2] = {
>>  	{0xcf08, 0xcf08},	/* Switch-IB2 */
>>  	{0x01b3, 0x01b3},	/* IS-4 */
>>  	{0x1003, 0x1016},	/* Connect-X */
>> +	{0x1b02, 0x1b02},	/* Bull */
>>  	{0x0000, 0x0000}};
>>  
>>  static int is_ext_fw_info_supported(uint16_t device_id) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


[-- Attachment #2: infiniband-diags_fix_bull_device_IDs.patch --]
[-- Type: text/x-patch, Size: 1849 bytes --]

diff --git a/libibnetdisc/src/ibnetdisc.c b/libibnetdisc/src/ibnetdisc.c
index 7ba5c91..758d3cd 100644
--- a/libibnetdisc/src/ibnetdisc.c
+++ b/libibnetdisc/src/ibnetdisc.c
@@ -196,10 +196,23 @@ static void debug_port(ib_portid_t * portid, ibnd_port_t * port)
 static int is_mlnx_ext_port_info_supported(ibnd_port_t * port)
 {
 	uint16_t devid = (uint16_t) mad_get_field(port->node->info, 0, IB_NODE_DEVID_F);
-
-	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
+	uint32_t vendorid = (uint32_t) mad_get_field(port->node->info, 0, IB_NODE_VENDORID_F);
+
+	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 ||
+	    ((vendorid == 0x119f) &&
+	     /* Bull SwitchX */
+	     (devid == 0x1b02 || devid == 0x1b50 ||
+	      /* Bull SwitchIB */
+	      (devid >= 0x1bd0 && devid <= 0x1bd2) ||
+	      /* Bull SwitchIB2 */
+	      (devid >= 0x1bd3 && devid <= 0x1bd5))))
 		return 1;
-	if (devid >= 0x1003 && devid <= 0x1016)
+	if ((devid >= 0x1003 && devid <= 0x1016) ||
+	    ((vendorid == 0x119f) &&
+	     /* Bull ConnectIB */
+	     (devid == 0x1b83 || devid == 0x1b93 || devid == 0x1b94 ||
+	      /* Bull ConnectX4 */
+	      devid == 0x1bb4 || devid == 0x1bb5 || devid == 0x1bc4)))
 		return 1;
 	return 0;
 }
diff --git a/src/vendstat.c b/src/vendstat.c
index 284ef93..ac456f4 100644
--- a/src/vendstat.c
+++ b/src/vendstat.c
@@ -149,7 +149,10 @@ static uint16_t ext_fw_info_device[][2] = {
 	{0xcf08, 0xcf08},	/* Switch-IB2 */
 	{0x01b3, 0x01b3},	/* IS-4 */
 	{0x1003, 0x1016},	/* Connect-X */
-	{0x1b02, 0x1b02},	/* Bull */
+	{0x1b02, 0x1b02},	/* Bull SwitchX */
+	{0x1b50, 0x1b50},	/* Bull SwitchX */
+	{0x1bd0, 0x1bd2},	/* Bull SwitchIB */
+	{0x1bd3, 0x1bd5},	/* Bull SwitchIB2 */
 	{0x0000, 0x0000}};
 
 static int is_ext_fw_info_supported(uint16_t device_id) {

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH infiniband-diags] Add Bull device ID support to device white lists
       [not found]         ` <584A8823.4070506-BUmcmmAb0Fc@public.gmane.org>
@ 2016-12-09 14:15           ` Hal Rosenstock
       [not found]             ` <703b953b-7165-72d1-3c1e-c3b1f8c54f28-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Hal Rosenstock @ 2016-12-09 14:15 UTC (permalink / raw)
  To: Vincent Ficet, ira.weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On 12/9/2016 5:32 AM, Vincent Ficet wrote:
> Hello,
> 
> The patch proposed by Hal Rosenstock does not list all Bull device IDs.
> 
> Please apply the attached patch which contains an up to date list of such IDs.

Would it be better to combine Bull Switch-IB and Switch-IB2 ranges into
one check rather than keeping them separate as the device IDs are
contiguous ?

Also, looks like similar change should also be done in
ibdiag_common.c:is_mlnx_ext_port_info_supported.

-- Hal

> Best Regards,
> 
> Vincent
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH infiniband-diags] Add Bull device ID support to device white lists
       [not found]             ` <703b953b-7165-72d1-3c1e-c3b1f8c54f28-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-12-09 14:29               ` Vincent Ficet
       [not found]                 ` <584ABFE6.4070902-BUmcmmAb0Fc@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Vincent Ficet @ 2016-12-09 14:29 UTC (permalink / raw)
  To: Hal Rosenstock, ira.weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hello,

On 12/09/2016 03:15 PM, Hal Rosenstock wrote:
> On 12/9/2016 5:32 AM, Vincent Ficet wrote:
>> Hello,
>>
>> The patch proposed by Hal Rosenstock does not list all Bull device IDs.
>>
>> Please apply the attached patch which contains an up to date list of such IDs.
> Would it be better to combine Bull Switch-IB and Switch-IB2 ranges into
> one check rather than keeping them separate as the device IDs are
> contiguous ?
I just wanted to separate SwitchIB and SwitchIB2 for clarity, but we can gather them if you wish to do so.

Which option do you prefer, together or split ?
>
> Also, looks like similar change should also be done in
> ibdiag_common.c:is_mlnx_ext_port_info_supported.
Thanks for pointing this. I'll fix it too, but first I need you to answer the question just above.

Best Regards,

Vincent
>
> -- Hal
>
>> Best Regards,
>>
>> Vincent

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH infiniband-diags] Add Bull device ID support to device white lists
       [not found]                 ` <584ABFE6.4070902-BUmcmmAb0Fc@public.gmane.org>
@ 2016-12-09 14:40                   ` Hal Rosenstock
       [not found]                     ` <46fac349-4687-961a-4d63-697064f391da-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Hal Rosenstock @ 2016-12-09 14:40 UTC (permalink / raw)
  To: Vincent Ficet, ira.weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On 12/9/2016 9:29 AM, Vincent Ficet wrote:
>> Would it be better to combine Bull Switch-IB and Switch-IB2 ranges into
>> one check rather than keeping them separate as the device IDs are
>> contiguous ?
> I just wanted to separate SwitchIB and SwitchIB2 for clarity, but we can gather them if you wish to do so.
> 
> Which option do you prefer, together or split ?

I prefer together.

-- Hal
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH infiniband-diags] Add Bull device ID support to device white lists
       [not found]                     ` <46fac349-4687-961a-4d63-697064f391da-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-12-19  7:10                       ` Weiny, Ira
       [not found]                         ` <2807E5FD2F6FDA4886F6618EAC48510E3C611A58-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Weiny, Ira @ 2016-12-19  7:10 UTC (permalink / raw)
  To: Hal Rosenstock, Vincent Ficet; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

> On 12/9/2016 9:29 AM, Vincent Ficet wrote:
> >> Would it be better to combine Bull Switch-IB and Switch-IB2 ranges
> >> into one check rather than keeping them separate as the device IDs
> >> are contiguous ?
> > I just wanted to separate SwitchIB and SwitchIB2 for clarity, but we can gather
> them if you wish to do so.
> >
> > Which option do you prefer, together or split ?
> 
> I prefer together.

Together is fine by me.

I was expecting a v2 of this patch.  Was that your intention?

Ira


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH infiniband-diags] Add Bull device ID support to device white lists
       [not found]                         ` <2807E5FD2F6FDA4886F6618EAC48510E3C611A58-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2016-12-19  8:44                           ` Vincent Ficet
       [not found]                             ` <58579DFD.2040206-BUmcmmAb0Fc@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Vincent Ficet @ 2016-12-19  8:44 UTC (permalink / raw)
  To: Weiny, Ira, Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

Hello,

On 12/19/2016 08:10 AM, Weiny, Ira wrote:
>> On 12/9/2016 9:29 AM, Vincent Ficet wrote:
>>>> Would it be better to combine Bull Switch-IB and Switch-IB2 ranges
>>>> into one check rather than keeping them separate as the device IDs
>>>> are contiguous ?
>>> I just wanted to separate SwitchIB and SwitchIB2 for clarity, but we can gather
>> them if you wish to do so.
>>> Which option do you prefer, together or split ?
>> I prefer together.
> Together is fine by me.
>
> I was expecting a v2 of this patch.  Was that your intention?
I attached the v3 of this patch to this mail following Hal's remarks and suggestions.

The new code has been fully tested on our cluster and no regression was found.

Please let me know whether the changes I made are acceptable.


Best Regards,

Vincent


>
> Ira
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


[-- Attachment #2: infiniband-diags_fix_bull_device_IDs_v3.patch --]
[-- Type: text/x-patch, Size: 6385 bytes --]

diff --git a/include/ibdiag_common.h b/include/ibdiag_common.h
index 21b0522..587dcfe 100644
--- a/include/ibdiag_common.h
+++ b/include/ibdiag_common.h
@@ -133,7 +133,7 @@ extern void ibexit(const char *fn, char *msg, ...);
  */
 extern char *conv_cnt_human_readable(uint64_t val64, float *val, int data);
 
-int is_mlnx_ext_port_info_supported(uint32_t devid);
+int is_mlnx_ext_port_info_supported(uint32_t vendorid, uint16_t devid);
 
 int is_port_info_extended_supported(ib_portid_t * dest, int port,
 				    struct ibmad_port *srcport);
diff --git a/libibnetdisc/src/ibnetdisc.c b/libibnetdisc/src/ibnetdisc.c
index 7ba5c91..3b8a65a 100644
--- a/libibnetdisc/src/ibnetdisc.c
+++ b/libibnetdisc/src/ibnetdisc.c
@@ -196,10 +196,28 @@ static void debug_port(ib_portid_t * portid, ibnd_port_t * port)
 static int is_mlnx_ext_port_info_supported(ibnd_port_t * port)
 {
 	uint16_t devid = (uint16_t) mad_get_field(port->node->info, 0, IB_NODE_DEVID_F);
-
-	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
+	uint32_t vendorid = (uint32_t) mad_get_field(port->node->info, 0, IB_NODE_VENDORID_F);
+
+	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 ||
+	    ((vendorid == 0x119f) &&
+	     /* Bull SwitchX */
+	     (devid == 0x1b02 || devid == 0x1b50 ||
+	      /* Bull SwitchIB and SwitchIB2 */
+	      devid == 0x1ba0 ||
+	      (devid >= 0x1bd0 && devid <= 0x1bd5))))
 		return 1;
-	if (devid >= 0x1003 && devid <= 0x1016)
+	if ((devid >= 0x1003 && devid <= 0x1016) ||
+	    ((vendorid == 0x119f) &&
+	     /* Bull ConnectX3 */
+	     (devid == 0x1b33 || devid == 0x1b73 ||
+	      devid == 0x1b40 || devid == 0x1b41 ||
+	      devid == 0x1b60 || devid == 0x1b61 ||
+	     /* Bull ConnectIB */
+	      devid == 0x1b83 ||
+	      devid == 0x1b93 || devid == 0x1b94 ||
+	      /* Bull ConnectX4 */
+	      devid == 0x1bb4 || devid == 0x1bb5 ||
+	      devid == 0x1bc4)))
 		return 1;
 	return 0;
 }
diff --git a/src/ibdiag_common.c b/src/ibdiag_common.c
index f74eed4..82d30e1 100644
--- a/src/ibdiag_common.c
+++ b/src/ibdiag_common.c
@@ -527,14 +527,34 @@ int is_port_info_extended_supported(ib_portid_t * dest, int port,
 	return 1;
 }
 
-int is_mlnx_ext_port_info_supported(uint32_t devid)
+int is_mlnx_ext_port_info_supported(uint32_t vendorid,
+				    uint16_t devid)
 {
 	if (ibd_ibnetdisc_flags & IBND_CONFIG_MLX_EPI) {
-		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 || devid == 0x1b02)
+
+		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20 || devid == 0xcf08 ||
+		    ((vendorid == 0x119f) &&
+		     /* Bull SwitchX */
+		     (devid == 0x1b02 || devid == 0x1b50 ||
+		      /* Bull SwitchIB and SwitchIB2 */
+		      devid == 0x1ba0 ||
+		      (devid >= 0x1bd0 && devid <= 0x1bd5))))
 			return 1;
-		if (devid >= 0x1003 && devid <= 0x1016)
+		if ((devid >= 0x1003 && devid <= 0x1016) ||
+		    ((vendorid == 0x119f) &&
+		     /* Bull ConnectX3 */
+		     (devid == 0x1b33 || devid == 0x1b73 ||
+		      devid == 0x1b40 || devid == 0x1b41 ||
+		      devid == 0x1b60 || devid == 0x1b61 ||
+		      /* Bull ConnectIB */
+		      devid == 0x1b83 ||
+		      devid == 0x1b93 || devid == 0x1b94 ||
+		      /* Bull ConnectX4 */
+		      devid == 0x1bb4 || devid == 0x1bb5 ||
+		      devid == 0x1bc4)))
 			return 1;
 	}
+
 	return 0;
 }
 
diff --git a/src/ibportstate.c b/src/ibportstate.c
index df50469..fe8be25 100644
--- a/src/ibportstate.c
+++ b/src/ibportstate.c
@@ -385,6 +385,7 @@ int main(int argc, char **argv)
 	int selfport = 0;
 	int changed = 0;
 	int i;
+	uint32_t vendorid, rem_vendorid;
 	uint16_t devid, rem_devid;
 	uint64_t val;
 	char *endp;
@@ -516,6 +517,7 @@ int main(int argc, char **argv)
 		port_op = QUERY;
 
 	is_switch = get_node_info(&portid, data);
+	vendorid = (uint32_t) mad_get_field(data, 0, IB_NODE_VENDORID_F);
 	devid = (uint16_t) mad_get_field(data, 0, IB_NODE_DEVID_F);
 
 	if ((port_args[MKEY].set || port_args[MKEYLEASE].set ||
@@ -528,7 +530,7 @@ int main(int argc, char **argv)
 		printf("%s PortInfo:\n", is_switch ? "Switch" : "CA/RT");
 	espeed_cap = get_port_info(&portid, data, portnum, is_switch);
 	show_port_info(&portid, data, portnum, espeed_cap, is_switch);
-	if (is_mlnx_ext_port_info_supported(devid)) {
+	if (is_mlnx_ext_port_info_supported(vendorid, devid)) {
 		get_mlnx_ext_port_info(&portid, data2, portnum);
 		show_mlnx_ext_port_info(&portid, data2, portnum);
 	}
@@ -675,6 +677,7 @@ int main(int argc, char **argv)
 
 			/* Get peer port NodeInfo to obtain peer port number */
 			is_peer_switch = get_node_info(&peerportid, data);
+			rem_vendorid = (uint32_t) mad_get_field(data, 0, IB_NODE_VENDORID_F);
 			rem_devid = (uint16_t) mad_get_field(data, 0, IB_NODE_DEVID_F);
 
 			mad_decode_field(data, IB_NODE_LOCAL_PORT_F,
@@ -685,12 +688,12 @@ int main(int argc, char **argv)
 			peer_espeed_cap = get_port_info(&peerportid, data,
 							peerlocalportnum,
 							is_peer_switch);
-			if (is_mlnx_ext_port_info_supported(rem_devid))
+			if (is_mlnx_ext_port_info_supported(rem_vendorid, rem_devid))
 				get_mlnx_ext_port_info(&peerportid, data2,
 						       peerlocalportnum);
 			show_port_info(&peerportid, data, peerlocalportnum,
 				       peer_espeed_cap, is_peer_switch);
-			if (is_mlnx_ext_port_info_supported(rem_devid))
+			if (is_mlnx_ext_port_info_supported(rem_vendorid, rem_devid))
 				show_mlnx_ext_port_info(&peerportid, data2,
 							peerlocalportnum);
 
diff --git a/src/vendstat.c b/src/vendstat.c
index 284ef93..4646b56 100644
--- a/src/vendstat.c
+++ b/src/vendstat.c
@@ -149,7 +149,18 @@ static uint16_t ext_fw_info_device[][2] = {
 	{0xcf08, 0xcf08},	/* Switch-IB2 */
 	{0x01b3, 0x01b3},	/* IS-4 */
 	{0x1003, 0x1016},	/* Connect-X */
-	{0x1b02, 0x1b02},	/* Bull */
+	{0x1b02, 0x1b02},	/* Bull SwitchX */
+	{0x1b50, 0x1b50},	/* Bull SwitchX */
+	{0x1ba0, 0x1ba0},	/* Bull SwitchIB */
+	{0x1bd0, 0x1bd5},	/* Bull SwitchIB and SwitchIB2 */
+	{0x1b33, 0x1b33},	/* Bull ConnectX3 */
+	{0x1b73, 0x1b73},	/* Bull ConnectX3 */
+	{0x1b40, 0x1b41},	/* Bull ConnectX3 */
+	{0x1b60, 0x1b61},	/* Bull ConnectX3 */
+	{0x1b83, 0x1b83},	/* Bull ConnectIB */
+	{0x1b93, 0x1b94},	/* Bull ConnectIB */
+	{0x1bb4, 0x1bb5},	/* Bull ConnectX4 */
+	{0x1bc4, 0x1bc4},	/* Bull ConnectX4 */
 	{0x0000, 0x0000}};
 
 static int is_ext_fw_info_supported(uint16_t device_id) {

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH infiniband-diags] Add Bull device ID support to device white lists
       [not found]                             ` <58579DFD.2040206-BUmcmmAb0Fc@public.gmane.org>
@ 2016-12-20 16:56                               ` ira.weiny
  0 siblings, 0 replies; 9+ messages in thread
From: ira.weiny @ 2016-12-20 16:56 UTC (permalink / raw)
  To: Vincent Ficet; +Cc: Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Mon, Dec 19, 2016 at 09:44:45AM +0100, Vincent Ficet wrote:
> Hello,
> 
> On 12/19/2016 08:10 AM, Weiny, Ira wrote:
> >> On 12/9/2016 9:29 AM, Vincent Ficet wrote:
> >>>> Would it be better to combine Bull Switch-IB and Switch-IB2 ranges
> >>>> into one check rather than keeping them separate as the device IDs
> >>>> are contiguous ?
> >>> I just wanted to separate SwitchIB and SwitchIB2 for clarity, but we can gather
> >> them if you wish to do so.
> >>> Which option do you prefer, together or split ?
> >> I prefer together.
> > Together is fine by me.
> >
> > I was expecting a v2 of this patch.  Was that your intention?
> I attached the v3 of this patch to this mail following Hal's remarks and suggestions.
> 
> The new code has been fully tested on our cluster and no regression was found.
> 
> Please let me know whether the changes I made are acceptable.

This was not a valid patch format.  The patch applied with git am just fine
but...

I did not have a signed off by from you nor was there a good commit message.

I went ahead and fixed both of those issues.  So consider this applied.

However, in the future could you please:

1) send the patch inline
2) use a proper signed off by line
3) have a proper commit message.

Thanks,
Ira

> 
> 
> Best Regards,
> 
> Vincent
> 
> 
> >
> > Ira
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-20 16:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-06 19:22 [PATCH infiniband-diags] Add Bull device ID support to device white lists Hal Rosenstock
     [not found] ` <e5ad4256-53fe-9ecc-f880-89347134ec42-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-12-07 14:53   ` ira.weiny
     [not found]     ` <20161207145338.GD24724-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-12-09 10:32       ` Vincent Ficet
     [not found]         ` <584A8823.4070506-BUmcmmAb0Fc@public.gmane.org>
2016-12-09 14:15           ` Hal Rosenstock
     [not found]             ` <703b953b-7165-72d1-3c1e-c3b1f8c54f28-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-12-09 14:29               ` Vincent Ficet
     [not found]                 ` <584ABFE6.4070902-BUmcmmAb0Fc@public.gmane.org>
2016-12-09 14:40                   ` Hal Rosenstock
     [not found]                     ` <46fac349-4687-961a-4d63-697064f391da-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-12-19  7:10                       ` Weiny, Ira
     [not found]                         ` <2807E5FD2F6FDA4886F6618EAC48510E3C611A58-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-12-19  8:44                           ` Vincent Ficet
     [not found]                             ` <58579DFD.2040206-BUmcmmAb0Fc@public.gmane.org>
2016-12-20 16:56                               ` ira.weiny

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.