-
Notifications
You must be signed in to change notification settings - Fork 882
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
bridge: add riscv64 build tags #2389
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.
LGTM
@@ -1,4 +1,4 @@ | |||
// +build arm ppc64 ppc64le | |||
// +build arm ppc64 ppc64le riscv64 |
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.
filename is weird actually. Not sure what it should be.
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.
@selansen @arkodg the only difference between these two files is ifrDataByte returning uint8 vs int8. I'm not familiar what ifrData means, but if you could help coming up with a better filename like netlink_deprecated_linux_???_uint8.go
and netlink_deprecated_linux_???_int8.go
it would be appreciated!
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.
It is getting invoked in only one place . Looking at the caller, we should use only int8 ( checked few different type variant )
IftData . - given interface's hardware address ( MAC ) value
you can use intf_addr or hwintf_addr
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.
@selansen In https://github.com/docker/libnetwork/blob/20e2079/drivers/bridge/netlink_deprecated_linux.go#L100 IfruHwaddr
is of type syscall.RawSockaddr
whose Data field's type varies across architectures, so we do need a different ifrDataByte
function.
I suggest we go with something like netlink_deprecated_linux_rawsockaddr_data_uint8.go
and netlink_deprecated_linux_rawsockaddr_data_int8.go
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 did check only few architectures but the variable where we store is int8. I do understand there may be other arch which might use int8.
WRT name , rawsockeraddr ( the actual structure name) data is very generic one. This particular scenario, we use it only for hw_Interface_addr(MAC)
I am fine with generic name too.
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.
Yes it may only be used for mac address, but the reason the IfruHwaddr function needs different implementations on different arches is because of syscall.RawSockaddr.Data type hence the suggested name.
@tiborvass @selansen renamed |
CI failure is known flaky test ( I have seen it few times in the past) . so LGTM
|
Any news on this guys? |
@tonistiigi the flaky |
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@arkodg green now |
PTAL @selansen |
Add riscv64 build tags to unbreak the build. If needed I can rename the files cause they are not arm specific (even before this pr).
Signed-off-by: Tonis Tiigi tonistiigi@gmail.com