-
Notifications
You must be signed in to change notification settings - Fork 197
Description
@adrianchiris @nlbrown2 @SchSeba
Hi - apologies for raising this question as an issue - the NPWG slack invite link (from http://intel-corp.herokuapp.com/) is broken - and hence I cannot post this question on the slack channel
What issue would you like to bring attention to?
For our particular cloud-based k8s application, we have VM-based compute worker nodes that have may differing numbers of attached virtual network interfaces, and these VNICs potentially attached to different subnets/VLANs.
If we had compute instances with VNICs always at same PCI address for a particular network, we could do something like ..
e.g. subnetA always at 00:05.0 and 00:07.0
e.g. subnetB always at 00:06.0 and 00:08.0
Node0: VNIC1=subnetA, VNIC2=subnetB, VNIC3=subnetA, VNIC4=subnetB
Node1: VNIC1=subnetA, VNIC2=subnetB
Node2: VNIC1=subnetA, VNIC2=subnetB, VNIC3=subnetA, VNIC4=subnetB
# Node0/2
$ /usr/sbin/lspci -nn | grep "Virtual Function"
...
00:05.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]
00:06.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]
00:07.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]
00:08.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]
# Node1
$ /usr/sbin/lspci -nn | grep "Virtual Function"
...
00:05.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]
00:06.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]apiVersion: v1
kind: ConfigMap
metadata:
name: sriovdp-config
namespace: kube-system
data:
config.json: |
{
"resourceList": [
{
"resourceName": "mlnx_sriov_subnetA",
"resourcePrefix": "mellanox.com",
"selectors": {
"vendors": ["15b3"],
"devices": ["101e"],
"drivers": ["mlx5_core"],
"pciAddresses": ["0000:00:05.0","0000:00:07.0"]
}
},
{
"resourceName": "mlnx_sriov_subnetB",
"resourcePrefix": "mellanox.com",
"selectors": {
"vendors": ["15b3"],
"devices": ["101e"],
"drivers": ["mlx5_core"],
"pciAddresses": ["0000:00:06.0","0000:00:08.0"]
}
}
]
}Unfortunately however, we cannot rely on VNICs for a particular subnet always using the same PCI addresses.
e.g.
Node0: VNIC1=subnetA, VNIC2=subnetA, VNIC3=subnetB
Node1: VNIC1=subnetB, VNIC2=subnetA, VNIC3=subnetC
Node2: VNIC1=subnetA
Node4: VNIC1=subnetC, VNIC2=subnetA
# e.g. for Node0 and Node1
$ /usr/sbin/lspci -nn | grep "Virtual Function"
...
00:05.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]
00:06.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]
00:07.0 Ethernet controller [0200]: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function [15b3:101e]Is there an alternative approach to the configmap using the SriovNetworkNodePolicy CRD or equivalent to provide node specific configuration to the SR-IOV device plugin
Such that in case of above - specifying mlnx_sriov_subnetA is associated with Node0 at 00:05.0 and 00:06.0,
and mlnx_sriov_subnetA is associated with Node1 at 00:06.0
... and mlnx_sriov_subnetB on Node0 at 00:07.0, and on Node1 at 00:05.0