• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SchSeba / ib-sriov-cni / 21545935772

31 Jan 2026 02:28PM UTC coverage: 25.645% (-0.6%) from 26.267%
21545935772

push

github

SchSeba
Fix "message too long" error for InfiniBand devices with many VFs

When configuring InfiniBand devices with many VFs, LinkByName() can fail
with "message too long" (EMSGSIZE) because the kernel's netlink response
exceeds the message limit. This happens because LinkByName requests all
VF info (including GUIDs) which generates very large messages for IB
devices.

This commit adds a fallback mechanism:
- Add LinkByNameForSetVf() method that reads minimal link info (name and
  index) directly from sysfs instead of using netlink
- Update ApplyVFConfig() and ResetVFConfig() to catch EMSGSIZE errors
  and fall back to LinkByNameForSetVf()
- Add path traversal protection for interface names

The fallback only triggers when the specific EMSGSIZE error occurs,
preserving normal behavior for devices with fewer VFs.

Signed-off-by: User <user@example.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

6 of 59 new or added lines in 2 files covered. (10.17%)

348 of 1357 relevant lines covered (25.64%)

0.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/types/mocks/NetlinkManager.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc