Skip to content

Conversation

@KTokarze
Copy link
Contributor

@KTokarze KTokarze commented Oct 8, 2025

This pull request introduces several new functionalities and exceptions for advanced network interface management, particularly focused on Linux systems and virtualization features. The changes add new methods for configuring SR-IOV, RSS queues, and MSI-X vectors, as well as new exceptions for more granular error handling. Documentation and tests have been updated accordingly.

New network interface configuration methods:

  • Added set_sriov_drivers_autoprobe method to LinuxDriver, allowing enable/disable of SR-IOV driver autoprobe via sysfs.
  • Added set_rss_queues_count and get_rss_queues_count methods to Linux RSS feature, enabling setting and retrieving RSS queue counts, including support for VFs via PCI address.
  • Added set_msix_vectors_count and get_msix_vectors_count methods to Linux virtualization feature, supporting configuration and querying of MSI-X vectors by devlink or sysfs.
  • Added reload_adapter_devlink method to Linux network interface for reloading adapters via devlink.
  • Added get_vf_id_by_pci method to Linux virtualization feature to map a VF PCI address to its VF ID.

New exceptions for error handling:

  • Introduced VirtualFunctionNotFoundException, HypervisorNotSupportedException, NetworkAdapterConfigurationException, and NetworkInterfaceNotSupported for more precise error reporting in network interface operations.

Documentation updates:

  • Updated README.md to document all new methods, exceptions, and usage patterns for Linux network interface management, including SR-IOV, RSS, and MSI-X configuration. [1] [2] [3] [4] [5] [6]

Testing improvements:

  • Added and extended unit tests for new SR-IOV driver autoprobe functionality in Linux driver feature. [1] [2] [3]

Supporting data structures and imports:

  • Introduced MethodType dataclass for selecting method of MSI-X vector configuration (devlink/sysfs).
  • Updated imports and logging setup for new features and exceptions. [1] [2] [3] [4] [5]

These changes provide more granular control and observability over network interface features, especially in virtualized and high-performance environments.

@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 14:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds device management functionality for network adapters, particularly focusing on devlink commands, MSI-X vectors, RSS queue configuration, and SR-IOV driver management capabilities. It also enhances the virtualization feature to support VF ID lookup by PCI address.

  • Added new methods to LinuxNetworkInterface for managing MSI-X vectors, RSS queues, and SR-IOV driver autoprobe settings using devlink commands
  • Implemented VF ID retrieval by PCI address in the virtualization feature with proper exception handling
  • Enhanced test coverage with comprehensive unit tests for all new functionality

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/unit/test_mfd_network_adapter/test_network_interface/test_linux_network_interface.py Added comprehensive tests for new MSI-X, RSS, and SR-IOV management methods with proper fixtures
tests/unit/test_mfd_network_adapter/test_network_interface/test_feature/test_virtualization/test_virtualization_linux.py Added tests for VF ID retrieval by PCI address with exception handling scenarios
mfd_network_adapter/network_interface/linux.py Implemented core devlink and device management methods for adapter control
mfd_network_adapter/network_interface/feature/virtualization/linux.py Added VF ID lookup functionality with proper error handling
mfd_network_adapter/exceptions.py Added new exception classes for VF and hypervisor-related errors
README.md Updated documentation to reflect new methods and exception classes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@KTokarze KTokarze force-pushed the devlink_methods branch 3 times, most recently from b631c1f to 56197d7 Compare October 13, 2025 11:42
@adrianlasota adrianlasota requested a review from Copilot October 13, 2025 11:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

tests/unit/test_mfd_network_adapter/test_network_interface/test_linux_network_interface.py:1

  • The class name TestQueueLinux in the test file for test_virtualization_linux.py does not accurately reflect the test content. It should be renamed to TestVirtualizationLinux to match the functionality being tested.
# Copyright (C) 2025 Intel Corporation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@KTokarze KTokarze force-pushed the devlink_methods branch 2 times, most recently from f94b2c0 to 7c70c03 Compare October 14, 2025 06:24
@KTokarze KTokarze requested a review from Copilot October 14, 2025 06:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@KTokarze KTokarze force-pushed the devlink_methods branch 5 times, most recently from e9366bf to 879e8c7 Compare October 23, 2025 08:35
@mchromin mchromin requested a review from Copilot October 23, 2025 09:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@KTokarze KTokarze force-pushed the devlink_methods branch 2 times, most recently from b8d6439 to 040ed79 Compare October 23, 2025 09:16
adrianlasota
adrianlasota previously approved these changes Oct 23, 2025
@KTokarze KTokarze force-pushed the devlink_methods branch 2 times, most recently from 7b46d17 to e5659dd Compare October 23, 2025 10:00
Copy link
Contributor

@adrianlasota adrianlasota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of API which operates on different interface

@KTokarze KTokarze force-pushed the devlink_methods branch 2 times, most recently from f6fe95a to c36266a Compare October 23, 2025 13:57
@KTokarze KTokarze force-pushed the devlink_methods branch 2 times, most recently from 9d19069 to 7456d16 Compare October 23, 2025 14:05
Copy link
Contributor

@mchromin mchromin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion

@KTokarze KTokarze force-pushed the devlink_methods branch 5 times, most recently from 3911e05 to f421177 Compare October 27, 2025 10:05
adrianlasota
adrianlasota previously approved these changes Oct 27, 2025
@KTokarze KTokarze force-pushed the devlink_methods branch 2 times, most recently from 162db7c to 8c4e80c Compare October 27, 2025 10:31
adrianlasota
adrianlasota previously approved these changes Oct 27, 2025
Add functions: reload_adapter_devlink, get_msix_vectors_couint, set_msix_vectors_count, set_rss_queues_count, set_sriov_drivers_autoprobe.

Fixes intel#26
Signed-off-by: Kacper Tokarzewski <kacper.tokarzewski@intel.com>
@mchromin mchromin merged commit 4cd5f2c into intel:main Oct 27, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants