Skip to content

Commit

Permalink
when using vf, set pod_nic_type to sriov
Browse files Browse the repository at this point in the history
Signed-off-by: liyh-yusur <[email protected]>
  • Loading branch information
liyh-yusur committed Aug 30, 2024
1 parent ee6e590 commit fd3bd44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/daemon/ovs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func (csh cniServerHandler) configureNic(podName, podNamespace, provider, netns,
oriPod := pod.DeepCopy()
pod.Annotations[fmt.Sprintf(util.VfRepresentorNameTemplate, provider)] = hostNicName
pod.Annotations[fmt.Sprintf(util.VfNameTemplate, provider)] = containerNicName
pod.Annotations[fmt.Sprintf(util.PodNicAnnotationTemplate, provider)] = util.SriovNicType
var patch []byte
patch, err = util.GenerateMergePatchPayload(oriPod, pod)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/util/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ const (

SRIOVResourceName = "mellanox.com/cx5_sriov_switchdev"

SriovNicType = "sriov"

InterconnectionConfig = "ovn-ic-config"
ExternalGatewayConfig = "ovn-external-gw-config"
InterconnectionSwitch = "ts"
Expand Down

0 comments on commit fd3bd44

Please sign in to comment.