Skip to content

Conversation

@jecavil
Copy link
Contributor

@jecavil jecavil commented Jul 30, 2018

No description provided.

Copy link
Contributor

@hnrose hnrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these simulator commands needed ? There is ibsendtrap utility in infiniband-diags which can be used for testing sending trap 144.

Copy link
Contributor

@hnrose hnrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a number of different changes (thoughts) in a single patch and is best separated out into separate patches for comment. In addition to the primary purpose of this patch, there are the following:
The maximum width supported has been changed to LINKWIDTH_1x_4x_8x_12x looking at the Infiniband specification.
The warning "Port %s:%d overwrite lid table entry for lid %u (was %s:%d)" will not be triggered when the computed port is corresponding to a switch-port without owning a LID.

On the first point, this is changing the default (when ibnetdiscover file is not annotated with link widths as in net-examples). The default was chosen as a common expected value. Perhaps new default should be 1x, 2x, and 4x.

Also, the extended link speeds (espeed) should also be supported in addition to speed. That could be included in primary patch or as additional patch.

@jecavil
Copy link
Contributor Author

jecavil commented Aug 2, 2018

"Why are these simulator commands needed ? There is ibsendtrap utility in infiniband-diags which can be used for testing sending trap 144." -> This is because we want to change the speed and width through ibportstate.

@jecavil
Copy link
Contributor Author

jecavil commented Aug 2, 2018

I can split the pull request into different ones then you can accept what you think is useful for the simulator. I will split it next week.

@jecavil
Copy link
Contributor Author

jecavil commented Aug 2, 2018

About the extended speed: Sure, this is currently missing in our changes and this is something we have to add later as well.

@hnrose
Copy link
Contributor

hnrose commented Aug 2, 2018 via email

@jecavil
Copy link
Contributor Author

jecavil commented Aug 2, 2018

Do you mean the next?
"Speed "nodeid"[port] : change LinkSpeedEnabled"
"Width "nodeid"[port] : change LinkWidthEnabled"

We started with this and later we implemented the ibportstate part.
We can remove those commands if you refer to that.

@hnrose
Copy link
Contributor

hnrose commented Aug 2, 2018 via email

@jecavil
Copy link
Contributor Author

jecavil commented Aug 2, 2018

OK, then we will remove that part :).

Support for using 'ibportstate speed/espeed/width' command together with IBSim.
After a port change with the mentioned command and reception of trap 144, a heavy sweep will set the enabled speed and width to every port. To avoid sending a trap 144 every time a port is set, the switch sends a trap only when the speed or width has been effectively changed.
Active speed, espeed and width port is automatically adjusted when rewriting the enabled speed and enabled width port, respectively.

Here it's an example of the new functiolality (suppose that $IBSIM is the path of your ibsim folder):

Run in terminal 1:
$ ibsim -s $IBSIM/net-examples/net.2sw2path4hca

Run in terminal 2:
$ export LD_PRELOAD=$IBSIM/umad2sim/libumad2sim.so
$ opensm

Run in terminal 3:
$ export LD_PRELOAD=$IBSIM/umad2sim/libumad2sim.so
$ ibportstate -G 0x200000 3 speed 3

When changing the LinkSpeedEnabled in terminal 3, you will see the next change:

Initial Switch PortInfo:
LinkSpeedEnabled:................2.5 Gbps

After PortInfo set:
LinkSpeedEnabled:................2.5 Gbps or 5.0 Gbps

$ ibportstate -G 0x200000 3 width 3

Initial Switch PortInfo:
LinkWidthEnabled:................4X

After PortInfo set:
LinkWidthEnabled:................1X or 4X

$ ibportstate -G 0x200000 3 espeed 3

Initial Switch PortInfo:
LinkSpeedExtEnabled:.............0

After PortInfo set:
LinkSpeedExtEnabled:.............14.0625 Gbps or 25.78125 Gbps

NOTE: force_link_speed, force_link_speed_ext and force_link_width must be 0.

Signed-off-by: jecavil <jesus.camacho@fabriscale.com>

if (p->state == 4) {
if (p->lid > 0 && p->lid < maxlinearcap
if (node->type != SWITCH_NODE && p->lid > 0 && p->lid < maxlinearcap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is node type != switch needed here ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is needed, it should be in a separate patch with more info as to why it's needed/how to reproduce.

I'm going to commit this PR without this change.

@hnrose
Copy link
Contributor

hnrose commented Sep 20, 2018

Merged commit cfcefe0 (based on this PR) into master

@hnrose hnrose closed this Sep 20, 2018
@jecavil
Copy link
Contributor Author

jecavil commented Sep 20, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants