-
Notifications
You must be signed in to change notification settings - Fork 114
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
WIP: Set GUID and MAC for VF with default driver loaded #245
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
fix #244 |
/test-all |
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.
The change itself looks good to me but I prefer to have some more details in the commit message why do we need it
Do we still need #233 with this fix? |
I change my PR to contain also this change (it was implemented there in another method) so maybe we can just merge #233 ? |
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.
Could you remind me what issue does this PR fix?
pkg/utils/utils.go
Outdated
if err = setVfGuid(addr, pfLink); err != nil { | ||
return err | ||
} | ||
} else if err = setVfAdminMac(addr, pfLink); err != nil { |
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.
I think we can still set VF admin mac w/ vfio-pci driver, right?
Just like sriov-cni can set VF attributes(admin-mac, vlan, trust, spoofchk etc) in vfio-pci mode.
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.
Does it make any sense to set the VF MAC when using vfio-pci driver? We invoke vfIsReady
in setVfAdminMac
, it returns error with vfio-pci driver.
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.
This is to resolve #244
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.
I am afraid this will result in adapters with vfio-pci to use the ff:ff:ff:ff:ff:ff:ff address. Can we just skip the setVfAdminMac
in case we did not change the vfNum? Considering this agent always creates the VFs, the mac will always be set, because it would happen when we created them.
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.
Does it make any sense to set the VF MAC when using vfio-pci driver?
I think yes. For some vendor NICs, the default admin MAC is all-zero, which means all packet (including packets with spoofed MAC) can be sent by app using the VF (when VF spoofChk is set to on).
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.
Fixed. PTAL.
Thanks for your PR,
To skip the vendors CIs use one of:
|
Changing other VF driver type or other parameter will no longer trigger setting GUID and MAC
Thanks for your PR,
To skip the vendors CIs use one of:
|
@@ -287,15 +287,18 @@ func configSriovDevice(iface *sriovnetworkv1.Interface, ifaceStatus *sriovnetwor | |||
break | |||
} | |||
} | |||
if strings.EqualFold(iface.LinkType, "IB") { | |||
if err = setVfGuid(addr, pfLink); err != nil { | |||
if iface.NumVfs != ifaceStatus.NumVfs { |
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.
its not clear to me why we skip this step, i think its worth adding a comment here
looking at @mskrocki comment
Considering this agent always creates the VFs, the mac will always be set, because it would happen when we created them.
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.
Agree. The change in this PR will be merged into #233, and this PR will be deprecated.
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.
@SchSeba ^^
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.
Hi @pliurh @adrianchiris @mskrocki can you please take a look on #233
I think my implementation there is better I will explain on that PR
No description provided.