← Back to Pull requests

address illegal SR-IOV VF MTU configuration #213

Closed
unknown closed this pull request without merging on Jun 04, 2026 16:30 UTC
View on GitHub
unknown unknown commented on Jun 01, 2026 00:06 UTC
Author

<!-- Thanks for sending a pull request! Here are some tips for you:

1. If this is your first time, please read our contributor guidelines:
https://git.k8s.io/community/contributors/guide/first-contribution.md#your-first-contribution
and developer guide
https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Please label this pull request according to what type of issue you are
addressing, especially if this is a release targeted pull request. For
reference on required PR/issue labels, read here:
https://git.k8s.io/community/contributors/devel/sig-release/release.md#issuepr-kind-label
3. Ensure you have added or ran the appropriate tests for your PR:
https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
4. If the PR is unfinished, see how to mark it:
https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->

What type of PR is this?

<!--
Add one of the following kinds:
/kind bug
/kind dependency
/kind cleanup
/kind documentation
/kind feature

Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

/kind feature

What this PR does / why we need it:

MTU can be configured via opaque.parameters.interface.mtu.
However, for SR-IOV VFs, it is currently possible to set an MTU larger than the parent PF’s MTU due to the lack of validation.

Which issue(s) this PR is related to:


<!--
Please link relevant issues to help with tracking.

To automatically close the linked issue(s) when this PR is merged,
add the word "Fixes" before the issue number or link.
Do not use "Fixes" if the PR is of kind failing-test or flake.

Reference KEPs when applicable in addition to specific issues.

Examples:
Fixes #<issue number>
<issue link> (issue in a different repository)
KEP: https://github.com/kubernetes/enhancements/issues/<kep-issue-number>

If there is no associated issue, then write "N/A".
-->

Fixes #178

Special notes for your reviewer:

The example output below shows the case where validation fails. An error is logged, and the Pod remains in the ContainerCreating state.

Events:
  Type     Reason                         Age   From               Message
  ----     ------                         ----  ----               -------
  Normal   Scheduled                      8s    default-scheduler  Successfully assigned default/pod-a-2-mlnx-nomac to eagle04
  Warning  FailedPrepareDynamicResources  7s    kubelet            Failed to prepare dynamic resources: prepare dynamic resources: NodePrepareResources failed for ResourceClaim vf-rc-a-2: claim 21c6d996-0dfe-43d7-a88d-846db605d4d8 contain errors: requested MTU 1600 for SR-IOV VF ens1f0v1 exceeds parent PF ens1f0np0 MTU 1500
kanda-masaharu@eagle04:~/work/repo/dci-community-team/k8s_demo/sriov_vf_test_dranet/pods$ k get pod pod-a-2-mlnx-nomac
NAME                 READY   STATUS              RESTARTS   AGE
pod-a-2-mlnx-nomac   0/1     ContainerCreating   0          55s

Does this PR introduce a user-facing change?


<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:

Enter your extended release note in the block below. If the PR requires
additional action from users switching to the new release, include the string
"action required".

For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->
``release-note
Fixed an issue where SR-IOV VF MTU could be configured larger than the MTU of its parent PF. Such configurations are now rejected.
``

Diff: 470 lines (+352 / -118) across 5 files Reviewer: tamilmani1989 Review duration: 5304m
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.69) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.69 · 470 lines diff across 5 files
0.69
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.368
Shallow Review Depth shallow_review_depth
0.289
Sensitive Paths sensitive_paths
0.069
Real PR Conversation Timeline
1 comments
"Review active on #213"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 68.9% (HIGH) · Higher = larger blast radius
68.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 29.8% · Safe to merge
29.8%