-
Notifications
You must be signed in to change notification settings - Fork 4
[PWCI] "[v4] net/intel: add IDPF PCI class ID support" #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Current IDPF supports only the MEV device IDs. MMG has new set of device IDs and same might be the case for the future devices. Instead of adding new device IDs every time, make use of the IDPF PCI class ID(0x20001) to differentiate between PF and VF. Write and read the VF_ARQBAL register to find if the current device is a PF or a VF. Signed-off-by: Vemula Venkatesh <venkatesh.vemula@intel.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
Reviewer's GuideThis PR enhances Intel DPDK network drivers by refactoring VF detection into a reusable helper, introducing PCI class–based ID matching, updating CPFL driver device ID definitions, and adding a class-based PCI ID entry to the IDPF driver map. Class diagram for updated idpf_hw and idpf_adapter structuresclassDiagram
class idpf_hw {
+device_id
}
class idpf_adapter {
+hw: idpf_hw
+virtchnl_version
}
idpf_adapter --> idpf_hw
class idpf_common_device {
+idpf_is_vf_device(hw: idpf_hw): bool
}
idpf_common_device ..> idpf_hw : uses
Class diagram for new and updated PCI ID macros and constantsclassDiagram
class "IDPF_PCI_CLASS" {
+class_id
+vendor_id
+device_id
+subsystem_vendor_id
+subsystem_device_id
}
class "PCI_BASE_CLASS_NETWORK_ETHERNET" {
+value = 0x02
}
class "PCI_SUB_BASE_CLASS_NETWORK_ETHERNET" {
+value = 0x00
}
class "IDPF_NETWORK_ETHERNET_PROGIF" {
+value = 0x01
}
class "IDPF_CLASS_NETWORK_ETHERNET_PROGIF" {
+value = (PCI_BASE_CLASS_NETWORK_ETHERNET << 16 | PCI_SUB_BASE_CLASS_NETWORK_ETHERNET << 8 | IDPF_NETWORK_ETHERNET_PROGIF)
}
"IDPF_CLASS_NETWORK_ETHERNET_PROGIF" ..> "PCI_BASE_CLASS_NETWORK_ETHERNET"
"IDPF_CLASS_NETWORK_ETHERNET_PROGIF" ..> "PCI_SUB_BASE_CLASS_NETWORK_ETHERNET"
"IDPF_CLASS_NETWORK_ETHERNET_PROGIF" ..> "IDPF_NETWORK_ETHERNET_PROGIF"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WalkthroughUpdates Intel CPFL/IDPF drivers: splits a CPFL device ID into two macros and maps both; introduces a VF detection helper replacing device ID checks; adds PCI class-based matching entries and related macros; updates IDPF initialization code paths to use the new helper without altering other logic. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as DPDK/OS Probe
participant Driver as IDPF Driver
participant HW as Device
rect rgb(245,250,255)
note right of Driver: Initialization
App->>Driver: Probe/initialize
Driver->>Driver: idpf_is_vf_device(hw)
Driver->>HW: Write VF_ARQBAL = IDPF_VF_TEST_VAL
Driver->>HW: Read VF_ARQBAL
alt Read matches test
Driver-->>Driver: is VF = true
else Not match
Driver-->>Driver: is VF = false
end
alt VF
Driver->>Driver: VF mailbox init and VF path
else PF
Driver->>Driver: PF mailbox/init path
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used🧬 Code graph analysis (1)drivers/net/intel/idpf/idpf_common_device.h (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: This is an auto submission for "[v4] net/intel: add IDPF PCI class ID support".
See "http://patchwork.dpdk.org/project/dpdk/list/?series=36252" for details.
Summary by Sourcery
Enable class-based PCI enumeration for Intel IDPF devices by introducing a PCI class matching macro, refactoring VF detection, and updating device ID tables in the CPFL and IDPF drivers.
New Features:
Enhancements:
Summary by CodeRabbit