-
Notifications
You must be signed in to change notification settings - Fork 11
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
use vfconfig metadata for storing VF and veth interface name #12
use vfconfig metadata for storing VF and veth interface name #12
Conversation
d2f4ac2
to
b37d115
Compare
@@ -135,16 +156,14 @@ func newVETH(srcName, dstName string) *netlink.Veth { | |||
} | |||
} | |||
|
|||
// GetOvsInterfaceName get ovs interface name for the given connection. | |||
func GetOvsInterfaceName(conn *networkservice.Connection, isClient bool) string { | |||
// GetInterfaceName get appropriate interface name for the given connection. |
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 suppose that both kernel client on NSC and kernel server on NSE should set valid names for the kernel interfaces by themselves:
https://github.com/networkservicemesh/sdk/blob/2e38282f43bcc2bd3b29b092c1f434bab0f05025/pkg/networkservice/common/mechanisms/kernel/client.go#L48-L59
https://github.com/networkservicemesh/sdk/blob/2e38282f43bcc2bd3b29b092c1f434bab0f05025/pkg/networkservice/common/mechanisms/kernel/server.go#L46-L56
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.
@Bolodya1997 yes, correct, but those names can be safely used inside container net namespace.
otherwise it would conflict with parallel service requests from different pods with nsm-1 as requested interface name. so this tries to have intermediate name for interface in the veth pair created on the host net namespace and it gets renamed later inside the container.
shall I rename method name something like GetVethPeerName()
?
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.
as discussed, changed the method name into GetVethPeerName()
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
b37d115
to
133ffab
Compare
uses vfconfig metadata service to store and retrieve VF and veth interface name and create veth pair with intermediate interface name so that parallel service requests from other clients don't fail due to interface name duplicates.
Signed-off-by: Periyasamy Palanisamy periyasamy.palanisamy@est.tech
Description
Issue link
How Has This Been Tested?
Types of changes