Skip to contentSkip to conversation

ib/mad: remove Device Mgmt from RMPP class list

PATCH In review Ira Weiny 4 participants 11 messages Jul 24, 2013 – Jul 25, 2013 8 messages not in the archive InfiniBand

lore
Share & tools
lore

Ira Weiny

author
#0 lore raw

PATCH 1/1 ib/mad: remove Device Mgmt from RMPP class list

The specification does not indicate that Device Mgmt is an RMPP class.

---
 drivers/infiniband/core/mad.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/infiniband/core/mad.c +0 -1
index dc3fd1e..309b507 100644
@@ -943,7 +943,6 @@ EXPORT_SYMBOL(ib_get_mad_data_offset);
 int ib_is_mad_class_rmpp(u8 mgmt_class)
 {
 	if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) ||
-	    (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) ||
 	    (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) ||
 	    (mgmt_class == IB_MGMT_CLASS_BIS) ||
 	    ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) &&
Signature · 6 lines
1.7.1

--
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
#2 lore raw
In reply to a message not in the archive
Quoted 1 line · Ira Weiny

The specification does not indicate that Device Mgmt is an RMPP class.

See Annex 8; DevMgt class version 2 rather than 1 is currently supported.

-- Hal

Quoted 10 lines
---
 drivers/infiniband/core/mad.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/infiniband/core/mad.c +0 -0
index dc3fd1e..309b507 100644

drivers/infiniband/core/mad.c EXPORT_SYMBOL(ib_get_mad_data_offset); · line 948

Quoted 7 lines
drivers/infiniband/core/mad.c +0 -1
@@ -943,7 +943,6 @@ EXPORT_SYMBOL(ib_get_mad_data_offset);
 int ib_is_mad_class_rmpp(u8 mgmt_class)
 {
 	if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) ||
-	    (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) ||
 	    (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) ||
 	    (mgmt_class == IB_MGMT_CLASS_BIS) ||
 	    ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) &&

--
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

author
#4 lore raw
In reply to a message not in the archive
Quoted 8 lines

-----Original Message-----
From: Hal Rosenstock [mailto:[email protected]]
Subject: Re: [PATCH] ib/mad: remove Device Mgmt from RMPP class list

Quoted 1 line · Ira Weiny

The specification does not indicate that Device Mgmt is an RMPP class.

See Annex 8; DevMgt class version 2 rather than 1 is currently supported.

Could older devices still return version 1? If so the kernel should allow DevMgt without RMPP, correct?

Ira

Quoted 8 lines

-- Hal

Quoted 5 lines
---
 drivers/infiniband/core/mad.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Quoted 11 lines

drivers/infiniband/core/mad.c EXPORT_SYMBOL(ib_get_mad_data_offset); · line 947

Quoted 11 lines
(quoted diff) +0 -0

b/drivers/infiniband/core/mad.c index dc3fd1e..309b507 100644

drivers/infiniband/core/mad.c +0 -1
@@ -943,7 +943,6 @@ EXPORT_SYMBOL(ib_get_mad_data_offset);
 int ib_is_mad_class_rmpp(u8 mgmt_class)  {
 	if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) ||
-	    (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) ||
 	    (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) ||
 	    (mgmt_class == IB_MGMT_CLASS_BIS) ||
 	    ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) &&

--
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

#6 lore raw
In reply to a message not in the archive
Quoted 10 lines · Ira
Quoted 8 lines

-----Original Message-----
From: Hal Rosenstock [mailto:[email protected]]
Subject: Re: [PATCH] ib/mad: remove Device Mgmt from RMPP class list

Quoted 1 line · Ira Weiny

The specification does not indicate that Device Mgmt is an RMPP class.

See Annex 8; DevMgt class version 2 rather than 1 is currently supported.

Could older devices still return version 1?

Yes, we can change this to support version 1 too.

Quoted 1 line

If so the kernel should allow DevMgt without RMPP, correct?

Yes. Both versions 1 and 2 DevMgt could be supported.

-- Hal

Quoted 11 lines

Ira

Quoted 8 lines

-- Hal

Quoted 5 lines
---
 drivers/infiniband/core/mad.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Quoted 13 lines
Quoted 11 lines

drivers/infiniband/core/mad.c EXPORT_SYMBOL(ib_get_mad_data_offset); · line 947

Quoted 11 lines
(quoted diff) +0 -0

b/drivers/infiniband/core/mad.c index dc3fd1e..309b507 100644

drivers/infiniband/core/mad.c +0 -1
@@ -943,7 +943,6 @@ EXPORT_SYMBOL(ib_get_mad_data_offset);
 int ib_is_mad_class_rmpp(u8 mgmt_class)  {
 	if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) ||
-	    (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) ||
 	    (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) ||
 	    (mgmt_class == IB_MGMT_CLASS_BIS) ||
 	    ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) &&

--
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

#7 lore raw
In reply to a message not in the archive
Quoted 4 lines
Quoted 1 line

See Annex 8; DevMgt class version 2 rather than 1 is currently supported.

Could older devices still return version 1? If so the kernel should allow DevMgt without RMPP, correct?

This check has been this way since 2.6.17. I think it's reasonable to say that there aren't any devices using version 1 that are running with Linux. --
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

author
#9 lore raw
In reply to a message not in the archive

Roland,

Please skip this patch. Sean, see below.

Quoted 7 lines

-----Original Message-----
From: Hefty, Sean
Sent: Wednesday, July 24, 2013 3:23 PM
To: Weiny, Ira; Hal Rosenstock
Cc: [email protected]; [email protected]
Subject: RE: [PATCH] ib/mad: remove Device Mgmt from RMPP class list

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

See Annex 8; DevMgt class version 2 rather than 1 is currently supported.

Could older devices still return version 1? If so the kernel should allow DevMgt without RMPP, correct?

This check has been this way since 2.6.17. I think it's reasonable to say that there aren't any devices using version 1 that are running with Linux.

Actually the "check" does not do anything unless you specify an rmpp_version as well.

		/* Make sure class supplied is consistent with RMPP */
		if (!ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) {
			if (rmpp_version)
				goto error1;
		}

I did not realize that some management classes optionally support RMPP. So in this case the check is correct.

In some User Space RMPP patches I am working on I wanted to verify that an RMPP management class actually specified rmpp_version. I see that I either need to skip this check or look at the class version as well. :-(

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

author
#10 lore raw
In reply to a message not in the archive
Quoted 11 lines

-----Original Message-----
From: Hefty, Sean
Subject: RE: [PATCH] ib/mad: remove Device Mgmt from RMPP class list

Quoted 4 lines
Quoted 1 line

See Annex 8; DevMgt class version 2 rather than 1 is currently supported.

Could older devices still return version 1? If so the kernel should allow DevMgt without RMPP, correct?

This check has been this way since 2.6.17. I think it's reasonable to say that there aren't any devices using version 1 that are running with Linux.

FWIW the ib_srpt module uses a class version of 1:

Ib_srpt.c:

...

		reg_req.mgmt_class_version = IB_MGMT_BASE_VERSION;

...

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

#12 lore raw
In reply to a message not in the archive
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

See Annex 8; DevMgt class version 2 rather than 1 is currently supported.

Could older devices still return version 1? If so the kernel should allow DevMgt without RMPP, correct?

This check has been this way since 2.6.17. I think it's reasonable to say

that

Quoted 1 line

there aren't any devices using version 1 that are running with Linux.

Quoted 7 lines

FWIW the ib_srpt module uses a class version of 1:

Ib_srpt.c:

...

		reg_req.mgmt_class_version = IB_MGMT_BASE_VERSION;

...

So, then this just happens to work because of some other check? If that's so, then I agree with Hal, in that we can add the class version to the check. --
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

author
#14 lore raw
In reply to a message not in the archive
Quoted 17 lines

-----Original Message-----
From: Hefty, Sean
Subject: RE: [PATCH] ib/mad: remove Device Mgmt from RMPP class list

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

See Annex 8; DevMgt class version 2 rather than 1 is currently

supported.

Quoted 11 lines
Quoted 6 lines
Quoted 3 lines

Could older devices still return version 1? If so the kernel should allow DevMgt without RMPP, correct?

This check has been this way since 2.6.17. I think it's reasonable to say

that

Quoted 1 line

there aren't any devices using version 1 that are running with Linux.

FWIW the ib_srpt module uses a class version of 1:

Quoted 8 lines
Quoted 4 lines

Ib_srpt.c:

...

		reg_req.mgmt_class_version = IB_MGMT_BASE_VERSION;

...

So, then this just happens to work because of some other check? If that's so, then I agree with Hal, in that we can add the class version to the check.

I think this works because the MAD stack triggers off of rmpp_version (in the agent) and RMPP_ACTIVE (in the individual MAD's). Since rmpp_version == 0 in this registration and likely all the MAD sent have a 0'ed out RMPP Header (ie the MAD stack thinks all MADs are RMPP _in_active) I think the stack passes all the MAD's without invoking the RMPP processing.

But I have never run this ib_srpt code...

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

#16 lore raw
In reply to a message not in the archive
Quoted 26 lines · Ira
Quoted 17 lines

-----Original Message-----
From: Hefty, Sean
Subject: RE: [PATCH] ib/mad: remove Device Mgmt from RMPP class list

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

See Annex 8; DevMgt class version 2 rather than 1 is currently

supported.

Quoted 11 lines
Quoted 6 lines
Quoted 3 lines

Could older devices still return version 1? If so the kernel should allow DevMgt without RMPP, correct?

This check has been this way since 2.6.17. I think it's reasonable to say

that

Quoted 1 line

there aren't any devices using version 1 that are running with Linux.

FWIW the ib_srpt module uses a class version of 1:

Quoted 8 lines
Quoted 4 lines

Ib_srpt.c:

...

		reg_req.mgmt_class_version = IB_MGMT_BASE_VERSION;

...

So, then this just happens to work because of some other check? If that's so, then I agree with Hal, in that we can add the class version to the check.

Quoted 6 lines

I think this works because the MAD stack triggers off of rmpp_version (in the agent) and RMPP_ACTIVE (in the individual MAD's). Since rmpp_version == 0 in this registration and likely all the MAD sent have a 0'ed out RMPP Header (ie the MAD stack thinks all MADs are RMPP _in_active) I think the stack passes all the MAD's without invoking the RMPP processing.

Changing the mgmt_class_version in ib_srpt.c from 1 into 2 would break existing SRP device management clients (srp_daemon and ibsrpdm) since these set mgmt_class_version to 1.

I'm not sure changing the rmpp_version argument in the ib_register_mad_agent() call in ib_srpt.c would be sufficient to enable RMPP for DM MAD's. Wouldn't the clients (srp_daemon and ibsrpdm) have to be updated as well to set the rmpp_version in the MAD header as well ?

Bart.
--
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

#18 lore raw
In reply to a message not in the archive
Quoted 37 lines · Bart Van Assche
Quoted 28 lines · Ira
Quoted 19 lines

-----Original Message-----
From: Hefty, Sean
Subject: RE: [PATCH] ib/mad: remove Device Mgmt from RMPP class list

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

See Annex 8; DevMgt class version 2 rather than 1 is currently

supported.

Quoted 13 lines
Quoted 6 lines
Quoted 3 lines

Could older devices still return version 1? If so the kernel should allow DevMgt without RMPP, correct?

This check has been this way since 2.6.17. I think it's reasonable to say

that

Quoted 1 line

there aren't any devices using version 1 that are running with Linux.

FWIW the ib_srpt module uses a class version of 1:

Ib_srpt.c:

Quoted 8 lines
Quoted 2 lines

...

        reg_req.mgmt_class_version = IB_MGMT_BASE_VERSION;

...

So, then this just happens to work because of some other check? If that's so,
then I agree with Hal, in that we can add the class version to the check.

Quoted 7 lines

I think this works because the MAD stack triggers off of rmpp_version (in the
agent) and RMPP_ACTIVE (in the individual MAD's). Since rmpp_version == 0 in this registration and likely all the MAD sent have a 0'ed out RMPP Header (ie the MAD stack thinks all MADs are RMPP _in_active) I think the stack passes all the MAD's without invoking the RMPP processing.

Quoted 8 lines

Changing the mgmt_class_version in ib_srpt.c from 1 into 2 would break existing SRP device management clients (srp_daemon and ibsrpdm) since these set mgmt_class_version to 1.

I'm not sure changing the rmpp_version argument in the ib_register_mad_agent() call in ib_srpt.c would be sufficient to enable RMPP for DM MAD's. Wouldn't the clients (srp_daemon and ibsrpdm) have to be updated as well to set the rmpp_version in the MAD header as well ?

There's a whole set of rules on DevMgt class version backward compatibility in Annex A8.

I think it's simpler to continue use of class version 1 for DevMgt.

There may be a modification to the kernel MAD module to indicate that for DevMgt class version 1 is not RMPP capable whereas class version 2 is. I think that's the only takeaway. This should have no impact on any DevMgt clients.

-- Hal

Quoted 2 lines

Bart.

--
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