-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AutoNegotiation and PauseFrameUse NICCapabilities #338
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jak3kaj! Few suggestions inline for you but this is on a good track!
By moving I made some more changes as the logic made less sense after moving the code. I split up the I put the logic to parse If I were to replace running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this @jak3kaj thank you! :) Welcome to the ghw contributor club!
@jak3kaj can you run |
The thing it's flagging is not flagged by It wants this: expected: []*NICCapability{
{
Name: "auto-negotiation",
IsEnabled: true,
CanEnable: true,
},
{
Name: "pause-frame-use",
IsEnabled: false,
CanEnable: false,
},
}, instead of this: expected: []*NICCapability{
&NICCapability{
Name: "auto-negotiation",
IsEnabled: true,
CanEnable: true,
},
&NICCapability{
Name: "pause-frame-use",
IsEnabled: false,
CanEnable: false,
},
}, 🤷 I will bow to the formatter script |
Create test case for new functions that parse ethtool. Add Stringer() for NICCapabilities so `fmt.Printf("%+v", NIC)` on NIC objects will print the data in a NICCapability object, and not just the pointer ids. Signed-off-by: Jacob Young <jacoby@nvidia.com>
Updated net_linux.go to use the `util.ParseBool()` utility. Signed-off-by: Jacob Young <jacoby@nvidia.com>
Moved setNicAttrEthtool() into netDeviceCapabilities() Split updateNicAttrEthtool() into functions specific for each field that is being checked. Signed-off-by: Jacob Young <jacoby@nvidia.com>
Signed-off-by: Jacob Young <jacoby@nvidia.com>
oops, I just fixed the commit that wasn't signed off and rebased with main. This should be ready to merge now. |
Make
AutoNegotiation
andPauseFrameUse
NICCapability
objects:Refactoring PR #335