| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/19 08:27 | flow | patch-triage |
2mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies error handling in ocelot_vcap_filter_add_aux_resources() within drivers/net/ethernet/mscc/ocelot_vcap.c. This code is part of the Microsemi Ocelot switch library, used exclusively by drivers for physical Ethernet switch hardware and SoCs (such as Microsemi VSC7514 and NXP Felix/Seville VSC9959/VSC9953). Because these switch ASICs/PCIe devices are not emulated in standard virtualized environments (QEMU/GCE), the modified code is structurally unreachable for syzkaller fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/19 08:27 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 86d6d5750cf1436ca1287ad58a52bb4471b201bc\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Sep 19 08:27:27 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/mscc/ocelot_vcap.c b/drivers/net/ethernet/mscc/ocelot_vcap.c\nindex 25e533e91d718..c479af2a423f8 100644\n--- a/drivers/net/ethernet/mscc/ocelot_vcap.c\n+++ b/drivers/net/ethernet/mscc/ocelot_vcap.c\n@@ -970,8 +970,11 @@ ocelot_vcap_filter_add_aux_resources(struct ocelot *ocelot,\n \tif (filter-\u003eblock_id == VCAP_IS2 \u0026\u0026 filter-\u003eaction.police_ena) {\n \t\tret = ocelot_vcap_policer_add(ocelot, filter-\u003eaction.pol_ix,\n \t\t\t\t\t \u0026filter-\u003eaction.pol);\n-\t\tif (ret)\n+\t\tif (ret) {\n+\t\t\tif (filter-\u003eaction.mirror_ena)\n+\t\t\t\tocelot_mirror_put(ocelot);\n \t\t\treturn ret;\n+\t\t}\n \t}\n \n \treturn 0;\n"
} |
| 2/1 | 2026/09/19 08:27 | agent | patch-evaluator |
2mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies error handling in ocelot_vcap_filter_add_aux_resources() within drivers/net/ethernet/mscc/ocelot_vcap.c. This code is part of the Microsemi Ocelot switch library, used exclusively by drivers for physical Ethernet switch hardware and SoCs (such as Microsemi VSC7514 and NXP Felix/Seville VSC9959/VSC9953). Because these switch ASICs/PCIe devices are not emulated in standard virtualized environments (QEMU/GCE), the modified code is structurally unreachable for syzkaller fuzzing.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 86d6d5750cf1436ca1287ad58a52bb4471b201bc
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Sep 19 08:27:27 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/mscc/ocelot_vcap.c b/drivers/net/ethernet/mscc/ocelot_vcap.c
index 25e533e91d718..c479af2a423f8 100644
--- a/drivers/net/ethernet/mscc/ocelot_vcap.c
+++ b/drivers/net/ethernet/mscc/ocelot_vcap.c
@@ -970,8 +970,11 @@ ocelot_vcap_filter_add_aux_resources(struct ocelot *ocelot,
if (filter->block_id == VCAP_IS2 && filter->action.police_ena) {
ret = ocelot_vcap_policer_add(ocelot, filter->action.pol_ix,
&filter->action.pol);
- if (ret)
+ if (ret) {
+ if (filter->action.mirror_ena)
+ ocelot_mirror_put(ocelot);
return ret;
+ }
}
return 0;
|
| 3/2 | 2026/09/19 08:27 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 2957 output: 37 thoughts: 394 Thoughts: **Analyzing a Kernel Patch for the Ocelot VCAP Driver** Okay, so I need to take a look at a patch that's been applied to the kernel, specifically targeting the amd64 architecture. Let's see what we're working with here. *Reads the patch...* Alright, it looks like a fairly straightforward modification to `drivers/net/ethernet/mscc/ocelot_vcap.c`. It's a conditional change dealing with policers and, potentially, mirroring. Specifically, it seems like there's a correction to the error handling within `ocelot_vcap_filter_add_aux_resources`. Previously, if `ocelot_vcap_policer_add` failed, it just returned. Now, it looks like it's properly releasing the mirror if it had been enabled when policer add failed. Good catch, but I need to understand the implications better. First, I need to understand the scope of this driver. I'll need to remember the context of that driver directory, `drivers/net/ethernet/mscc/`. I'll need to figure out if this pertains to hardware or if it's some sort of virtual device. Let's see... I'll check the Kconfig, and the driver details with `grepper`, to be sure. I'm looking for its role within the networking stack and its relation to other components. I want to figure out whether the changes are isolated or might have wider impacts on the system's performance. Okay, with this context, I can do a more thorough job. |
| 4/2 | 2026/09/19 08:27 | tool | grepper |
0mArgs:{
"Expression": "CONFIG_MSCC_OCELOT",
"PathPrefix": "drivers/net/ethernet/mscc"
}Results: {
"Output": "drivers/net/ethernet/mscc/Makefile-1-# SPDX-License-Identifier: (GPL-2.0 OR MIT)\ndrivers/net/ethernet/mscc/Makefile:2:obj-$(CONFIG_MSCC_OCELOT_SWITCH_LIB) += mscc_ocelot_switch_lib.o\ndrivers/net/ethernet/mscc/Makefile-3-mscc_ocelot_switch_lib-y := \\\n--\ndrivers/net/ethernet/mscc/Makefile=14=mscc_ocelot_switch_lib-$(CONFIG_BRIDGE_MRP) += ocelot_mrp.o\ndrivers/net/ethernet/mscc/Makefile:15:obj-$(CONFIG_MSCC_OCELOT_SWITCH) += mscc_ocelot.o\ndrivers/net/ethernet/mscc/Makefile-16-mscc_ocelot-y := \\\n"
} |
| 5/2 | 2026/09/19 08:27 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3952 output: 39 thoughts: 18 Thoughts: Here's a summary of my thought process, as if I were analyzing that Kconfig file: **Diving into the MSCC Ethernet Driver Configuration** Okay, let's pull up the `drivers/net/ethernet/mscc/Kconfig` file. Right, I need to understand how the configuration options are structured for this MSCC Ethernet driver. I'm expecting to see a hierarchical setup – maybe a top-level `MSCC_ETH` option encompassing everything, with sub-options for specific features, MAC controllers, PHYs, and potentially board-specific configurations. My immediate focus will be on the dependencies. What other kernel features are required? Are there any hard dependencies on specific kernel versions or hardware architectures? I'll be looking for `depends on` statements to understand the prerequisite components. I'm especially interested in whether they're leveraging any common network driver frameworks or if they've implemented something custom. Next, I'll pay close attention to the default values. These give you a good insight into the common use cases and what the developers consider the "best" configuration out-of-the-box. I'll also be scanning for `bool`, `tristate`, and `int` options. Understanding the range of values offered, if any, will give me a sense of the flexibility and granularity provided in configuring the driver. Finally, I'll skim through the help text for each option. The help text is often where you can glean the most crucial information about the driver's features, intended use cases, and any potential caveats or performance considerations. I'll be looking for hints on the supported hardware and any known compatibility issues. This should quickly give me a solid overview of the driver's configuration possibilities. Time to dig in! |
| 6/2 | 2026/09/19 08:27 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/mscc/Kconfig",
"FirstLine": 1,
"LineCount": 100
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: (GPL-2.0 OR MIT)\n 2:\tconfig NET_VENDOR_MICROSEMI\n 3:\t\tbool \"Microsemi devices\"\n 4:\t\tdefault y\n 5:\t\thelp\n 6:\t\t If you have a network (Ethernet) card belonging to this class, say Y.\n 7:\t\n 8:\t\t Note that the answer to this question doesn't directly affect the\n 9:\t\t kernel: saying N will just cause the configurator to skip all\n 10:\t\t the questions about Microsemi devices.\n 11:\t\n 12:\tif NET_VENDOR_MICROSEMI\n 13:\t\n 14:\t# Users should depend on NET_SWITCHDEV, HAS_IOMEM, BRIDGE\n 15:\tconfig MSCC_OCELOT_SWITCH_LIB\n 16:\t\tdepends on PTP_1588_CLOCK_OPTIONAL\n 17:\t\tselect NET_DEVLINK\n 18:\t\tselect REGMAP_MMIO\n 19:\t\tselect PACKING\n 20:\t\tselect PHYLINK\n 21:\t\ttristate\n 22:\t\thelp\n 23:\t\t This is a hardware support library for Ocelot network switches. It is\n 24:\t\t used by switchdev as well as by DSA drivers.\n 25:\t\n 26:\tconfig MSCC_OCELOT_SWITCH\n 27:\t\ttristate \"Ocelot switch driver\"\n 28:\t\tdepends on PTP_1588_CLOCK_OPTIONAL\n 29:\t\tdepends on BRIDGE || BRIDGE=n\n 30:\t\tdepends on NET_SWITCHDEV\n 31:\t\tdepends on HAS_IOMEM\n 32:\t\tdepends on OF\n 33:\t\tselect MSCC_OCELOT_SWITCH_LIB\n 34:\t\tselect GENERIC_PHY\n 35:\t\thelp\n 36:\t\t This driver supports the Ocelot network switch device as present on\n 37:\t\t the Ocelot SoCs (VSC7514).\n 38:\t\n 39:\tendif # NET_VENDOR_MICROSEMI\n"
} |
| 7/2 | 2026/09/19 08:27 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 4919 output: 24 thoughts: 18 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Investigating `MSCC_OCELOT_SWITCH_LIB` Usage** Alright, let's dive into this. The objective is to understand the scope and context of `MSCC_OCELOT_SWITCH_LIB`. My initial approach will be to identify all instances where this library is referenced. This means a thorough code search across the entire codebase is required. I need to quickly determine: * **Inclusion:** Where is this library actually *included*? Header files, definitely, but also look for indirect includes through other libraries or modules. * **Instantiation:** Where are the key classes or structures from this library instantiated or used directly? I need to look for object declarations, function calls, and any data structures leveraging the library's types. * **Dependency Tracing:** Are there any dependencies on this library I need to be aware of? Are there build targets specifically linked against it? This will give me a better understanding of its role in the overall architecture. * **Cross-References:** Are there external references to this library? Are there any design documents or other sources that touch on its use case? * **Usage Pattern:** What are the common function calls, data structures, and overall patterns of usage? Are there any common coding practices employed here that I should become familiar with? My aim is to quickly develop a mental map of how this library is woven into the system. This will inform any subsequent analysis, whether it's for optimization, refactoring, understanding a bug, or assessing its impact on a change. |
| 8/2 | 2026/09/19 08:28 | tool | grepper |
0mArgs:{
"Expression": "MSCC_OCELOT_SWITCH_LIB"
}Results: {
"Output": "drivers/net/dsa/ocelot/Kconfig=11=config NET_DSA_MSCC_OCELOT_EXT\n--\ndrivers/net/dsa/ocelot/Kconfig-17-\tselect MFD_OCELOT\ndrivers/net/dsa/ocelot/Kconfig:18:\tselect MSCC_OCELOT_SWITCH_LIB\ndrivers/net/dsa/ocelot/Kconfig-19-\tselect NET_DSA_MSCC_FELIX_DSA_LIB\n--\ndrivers/net/dsa/ocelot/Kconfig=32=config NET_DSA_MSCC_FELIX\n--\ndrivers/net/dsa/ocelot/Kconfig-39-\tdepends on NET_SCH_TAPRIO || NET_SCH_TAPRIO=n\ndrivers/net/dsa/ocelot/Kconfig:40:\tselect MSCC_OCELOT_SWITCH_LIB\ndrivers/net/dsa/ocelot/Kconfig-41-\tselect NET_DSA_MSCC_FELIX_DSA_LIB\n--\ndrivers/net/dsa/ocelot/Kconfig=50=config NET_DSA_MSCC_SEVILLE\n--\ndrivers/net/dsa/ocelot/Kconfig-56-\tselect MDIO_MSCC_MIIM\ndrivers/net/dsa/ocelot/Kconfig:57:\tselect MSCC_OCELOT_SWITCH_LIB\ndrivers/net/dsa/ocelot/Kconfig-58-\tselect NET_DSA_MSCC_FELIX_DSA_LIB\n--\ndrivers/net/ethernet/mscc/Kconfig=12=if NET_VENDOR_MICROSEMI\n--\ndrivers/net/ethernet/mscc/Kconfig-14-# Users should depend on NET_SWITCHDEV, HAS_IOMEM, BRIDGE\ndrivers/net/ethernet/mscc/Kconfig:15:config MSCC_OCELOT_SWITCH_LIB\ndrivers/net/ethernet/mscc/Kconfig-16-\tdepends on PTP_1588_CLOCK_OPTIONAL\n--\ndrivers/net/ethernet/mscc/Kconfig=26=config MSCC_OCELOT_SWITCH\n--\ndrivers/net/ethernet/mscc/Kconfig-32-\tdepends on OF\ndrivers/net/ethernet/mscc/Kconfig:33:\tselect MSCC_OCELOT_SWITCH_LIB\ndrivers/net/ethernet/mscc/Kconfig-34-\tselect GENERIC_PHY\n--\ndrivers/net/ethernet/mscc/Makefile-1-# SPDX-License-Identifier: (GPL-2.0 OR MIT)\ndrivers/net/ethernet/mscc/Makefile:2:obj-$(CONFIG_MSCC_OCELOT_SWITCH_LIB) += mscc_ocelot_switch_lib.o\ndrivers/net/ethernet/mscc/Makefile-3-mscc_ocelot_switch_lib-y := \\\n"
} |
| 9/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6022 output: 39 thoughts: 99 Thoughts: **Analyzing the Ocelot Switch Configuration** Okay, let's break this down. It seems the `MSCC_OCELOT_SWITCH_LIB` library is being pulled in by several other, more specific configurations. Specifically, `NET_DSA_MSCC_OCELOT_EXT`, `NET_DSA_MSCC_FELIX`, `NET_DSA_MSCC_SEVILLE`, and the more general `MSCC_OCELOT_SWITCH` are all electing to include it. This isn't surprising, given my understanding of the Ocelot architecture, but it's good to confirm the dependencies directly. Now, I need to understand *why* those depend on the library. I'll need to dig into the `drivers/net/dsa/ocelot/Kconfig` file. That's where the conditional logic should be defined, and where the precise relationships between these configurations and the library are laid out. I'm expecting to see dependencies and potentially some default selections based on the overall feature set. Let's see what the Kconfig file reveals about these specific dependencies and any other relevant configurations. |
| 10/2 | 2026/09/19 08:28 | tool | read-file |
0mArgs:{
"File": "drivers/net/dsa/ocelot/Kconfig",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tconfig NET_DSA_MSCC_FELIX_DSA_LIB\n 3:\t\ttristate\n 4:\t\thelp\n 5:\t\t This is an umbrella module for all network switches that are\n 6:\t\t register-compatible with Ocelot and that perform I/O to their host\n 7:\t\t CPU through an NPI (Node Processor Interface) Ethernet port.\n 8:\t\t Its name comes from the first hardware chip to make use of it\n 9:\t\t (VSC9959), code named Felix.\n 10:\t\n 11:\tconfig NET_DSA_MSCC_OCELOT_EXT\n 12:\t\ttristate \"Ocelot External Ethernet switch support\"\n 13:\t\tdepends on NET_DSA \u0026\u0026 SPI\n 14:\t\tdepends on NET_VENDOR_MICROSEMI\n 15:\t\tdepends on PTP_1588_CLOCK_OPTIONAL\n 16:\t\tselect MDIO_MSCC_MIIM\n 17:\t\tselect MFD_OCELOT\n 18:\t\tselect MSCC_OCELOT_SWITCH_LIB\n 19:\t\tselect NET_DSA_MSCC_FELIX_DSA_LIB\n 20:\t\tselect NET_DSA_TAG_OCELOT_8021Q\n 21:\t\tselect NET_DSA_TAG_OCELOT\n 22:\t\thelp\n 23:\t\t This driver supports the VSC7511, VSC7512, VSC7513 and VSC7514 chips\n 24:\t\t when controlled through SPI.\n 25:\t\n 26:\t\t The Ocelot switch family is a set of multi-port networking chips. All\n 27:\t\t of these chips have the ability to be controlled externally through\n 28:\t\t SPI or PCIe interfaces.\n 29:\t\n 30:\t\t Say \"Y\" here to enable external control to these chips.\n 31:\t\n 32:\tconfig NET_DSA_MSCC_FELIX\n 33:\t\ttristate \"Ocelot / Felix Ethernet switch support\"\n 34:\t\tdepends on NET_DSA \u0026\u0026 PCI\n 35:\t\tdepends on NET_VENDOR_MICROSEMI\n 36:\t\tdepends on NET_VENDOR_FREESCALE\n 37:\t\tdepends on HAS_IOMEM\n 38:\t\tdepends on PTP_1588_CLOCK_OPTIONAL\n 39:\t\tdepends on NET_SCH_TAPRIO || NET_SCH_TAPRIO=n\n 40:\t\tselect MSCC_OCELOT_SWITCH_LIB\n 41:\t\tselect NET_DSA_MSCC_FELIX_DSA_LIB\n 42:\t\tselect NET_DSA_TAG_OCELOT_8021Q\n 43:\t\tselect NET_DSA_TAG_OCELOT\n 44:\t\tselect FSL_ENETC_MDIO\n 45:\t\tselect PCS_LYNX\n 46:\t\thelp\n 47:\t\t This driver supports the VSC9959 (Felix) switch, which is embedded as\n 48:\t\t a PCIe function of the NXP LS1028A ENETC RCiEP.\n 49:\t\n 50:\tconfig NET_DSA_MSCC_SEVILLE\n 51:\t\ttristate \"Ocelot / Seville Ethernet switch support\"\n 52:\t\tdepends on NET_DSA\n 53:\t\tdepends on NET_VENDOR_MICROSEMI\n 54:\t\tdepends on HAS_IOMEM\n 55:\t\tdepends on PTP_1588_CLOCK_OPTIONAL\n 56:\t\tselect MDIO_MSCC_MIIM\n 57:\t\tselect MSCC_OCELOT_SWITCH_LIB\n 58:\t\tselect NET_DSA_MSCC_FELIX_DSA_LIB\n 59:\t\tselect NET_DSA_TAG_OCELOT_8021Q\n 60:\t\tselect NET_DSA_TAG_OCELOT\n 61:\t\tselect PCS_LYNX\n 62:\t\thelp\n 63:\t\t This driver supports the VSC9953 (Seville) switch, which is embedded\n 64:\t\t as a platform device on the NXP T1040 SoC.\n"
} |
| 11/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7454 output: 28 thoughts: 290 Thoughts: **My Initial Assessment of the Ocelot Driver Landscape** Okay, let's take a look at these drivers. I see a few Ocelot-related ones: `MSCC_OCELOT_SWITCH` is tied to the Ocelot SoC network switch, specifically the VSC7514. Then, we have `NET_DSA_MSCC_OCELOT_EXT`, which leverages SPI for external Ethernet switch support, and `NET_DSA_MSCC_FELIX`, dependent on PCI for the VSC9959 (Felix) switch on the NXP LS1028A ENETC RCiEP. Finally, there's `NET_DSA_MSCC_SEVILLE` which is specific to the NXP T1040 SoC platform. My immediate question is, are any of these hardware targets actually emulated in a standard QEMU environment, or accessible via some kind of virtual device? That's the critical first hurdle for development and testing. I need to make sure I can even touch the damn things! Right, I need to check the documentation… Section 2 should have the answer. Ah, here we go: "Structurally unreachable hardware…" Yep, that section highlights the usual suspects: vendor-specific PCIe switches, SmartNICs, and GPU drivers. It specifically mentions those requiring physical ASICs or PCIe cards that aren't emulated in standard QEMU. That list *could* include the Ocelot devices, or not. The text isn't explicit here, so I'm not ready to make a judgement. Okay, next step is to get some more information, and to do that, I need to see how people are using ocelot. So I'll search for things like `ocelot_vcap_filter_add_aux_resources` and see who's calling it. Or, maybe a grep for something in `ocelot_vcap.c` would be more helpful. Let's see what turns up. |
| 12/2 | 2026/09/19 08:28 | tool | grepper |
0mArgs:{
"Expression": "ocelot_vcap_filter_add_aux_resources"
}Results: {
"Output": "drivers/net/ethernet/mscc/ocelot_vcap.c=955=static int\ndrivers/net/ethernet/mscc/ocelot_vcap.c:956:ocelot_vcap_filter_add_aux_resources(struct ocelot *ocelot,\ndrivers/net/ethernet/mscc/ocelot_vcap.c-957-\t\t\t\t struct ocelot_vcap_filter *filter,\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=994=static int ocelot_vcap_filter_add_to_block(struct ocelot *ocelot,\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1002-\ndrivers/net/ethernet/mscc/ocelot_vcap.c:1003:\tret = ocelot_vcap_filter_add_aux_resources(ocelot, filter, extack);\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1004-\tif (ret)\n"
} |
| 13/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8484 output: 24 thoughts: 37 Thoughts: Here's my take on those functions: **Digging into the `ocelot_vcap_filter` Implementation** Okay, so I need to understand the lifecycle of these filter additions. I'm going to track down where `ocelot_vcap_filter_add_to_block` and `ocelot_vcap_filter_add` are actually being *called* within the codebase. The first one strongly suggests it's adding a filter to a "block," which likely implies some kind of data structure grouping filters together – maybe a table, a list, or even a more sophisticated structure within the VCAP (Virtual Connection Access Point) context. The second function name is more general, just implying the addition of a filter in some scope. This should reveal the context in which these filters are applied, so it may be easier to figure out what type of filters are added, what the goals of the filters are, and how they interact. This will point me to the relevant data path or control plane flow where the filter logic takes place, allowing me to understand their interactions and behavior. |
| 14/2 | 2026/09/19 08:28 | tool | grepper |
0mArgs:{
"Expression": "ocelot_vcap_filter_add"
}Results: {
"Output": "drivers/net/dsa/ocelot/felix.c=101=static int felix_tag_8021q_vlan_add_rx(struct dsa_switch *ds, int port,\n--\ndrivers/net/dsa/ocelot/felix.c-141-\ndrivers/net/dsa/ocelot/felix.c:142:\terr = ocelot_vcap_filter_add(ocelot, outer_tagging_rule, NULL);\ndrivers/net/dsa/ocelot/felix.c-143-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c=171=static int felix_tag_8021q_vlan_add_tx(struct dsa_switch *ds, int port,\n--\ndrivers/net/dsa/ocelot/felix.c-206-\ndrivers/net/dsa/ocelot/felix.c:207:\terr = ocelot_vcap_filter_add(ocelot, untagging_rule, NULL);\ndrivers/net/dsa/ocelot/felix.c-208-\tif (err) {\n--\ndrivers/net/dsa/ocelot/felix.c-227-\ndrivers/net/dsa/ocelot/felix.c:228:\terr = ocelot_vcap_filter_add(ocelot, redirect_rule, NULL);\ndrivers/net/dsa/ocelot/felix.c-229-\tif (err) {\n--\ndrivers/net/ethernet/mscc/ocelot.c=516=static int ocelot_update_vlan_reclassify_rule(struct ocelot *ocelot, int port)\n--\ndrivers/net/ethernet/mscc/ocelot.c-597-\ndrivers/net/ethernet/mscc/ocelot.c:598:\terr = ocelot_vcap_filter_add(ocelot, filter, NULL);\ndrivers/net/ethernet/mscc/ocelot.c-599-\tif (err)\n--\ndrivers/net/ethernet/mscc/ocelot.c=1653=int ocelot_trap_add(struct ocelot *ocelot, int port,\n--\ndrivers/net/ethernet/mscc/ocelot.c-1688-\tif (new)\ndrivers/net/ethernet/mscc/ocelot.c:1689:\t\terr = ocelot_vcap_filter_add(ocelot, trap, NULL);\ndrivers/net/ethernet/mscc/ocelot.c-1690-\telse\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=895=int ocelot_cls_flower_replace(struct ocelot *ocelot, int port,\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-959-\ndrivers/net/ethernet/mscc/ocelot_flower.c:960:\treturn ocelot_vcap_filter_add(ocelot, filter, f-\u003ecommon.extack);\ndrivers/net/ethernet/mscc/ocelot_flower.c-961-}\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c=50=static int ocelot_mrp_redirect_add_vcap(struct ocelot *ocelot, int src_port,\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c-72-\ndrivers/net/ethernet/mscc/ocelot_mrp.c:73:\terr = ocelot_vcap_filter_add(ocelot, filter, NULL);\ndrivers/net/ethernet/mscc/ocelot_mrp.c-74-\tif (err)\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=955=static int\ndrivers/net/ethernet/mscc/ocelot_vcap.c:956:ocelot_vcap_filter_add_aux_resources(struct ocelot *ocelot,\ndrivers/net/ethernet/mscc/ocelot_vcap.c-957-\t\t\t\t struct ocelot_vcap_filter *filter,\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=984=ocelot_vcap_filter_del_aux_resources(struct ocelot *ocelot,\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-993-\ndrivers/net/ethernet/mscc/ocelot_vcap.c:994:static int ocelot_vcap_filter_add_to_block(struct ocelot *ocelot,\ndrivers/net/ethernet/mscc/ocelot_vcap.c-995-\t\t\t\t\t struct ocelot_vcap_block *block,\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1002-\ndrivers/net/ethernet/mscc/ocelot_vcap.c:1003:\tret = ocelot_vcap_filter_add_aux_resources(ocelot, filter, extack);\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1004-\tif (ret)\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=1142=ocelot_exclusive_mac_etype_filter_rules(struct ocelot *ocelot,\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1186-\ndrivers/net/ethernet/mscc/ocelot_vcap.c:1187:int ocelot_vcap_filter_add(struct ocelot *ocelot,\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1188-\t\t\t struct ocelot_vcap_filter *filter,\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1200-\t/* Add filter to the linked list */\ndrivers/net/ethernet/mscc/ocelot_vcap.c:1201:\tret = ocelot_vcap_filter_add_to_block(ocelot, block, filter, extack);\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1202-\tif (ret)\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1223-}\ndrivers/net/ethernet/mscc/ocelot_vcap.c:1224:EXPORT_SYMBOL(ocelot_vcap_filter_add);\ndrivers/net/ethernet/mscc/ocelot_vcap.c-1225-\n--\ninclude/soc/mscc/ocelot_vcap.h=684=struct ocelot_vcap_filter {\n--\ninclude/soc/mscc/ocelot_vcap.h-721-\ninclude/soc/mscc/ocelot_vcap.h:722:int ocelot_vcap_filter_add(struct ocelot *ocelot,\ninclude/soc/mscc/ocelot_vcap.h-723-\t\t\t struct ocelot_vcap_filter *rule,\n"
} |
| 15/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10660 output: 19 thoughts: 149 Thoughts: **Ocelot Module Dependencies & Potential Usage** Okay, so I'm looking at `ocelot_vcap.c` and immediately see it's linked into `mscc_ocelot_switch_lib.o`. That's a key starting point. Now, where is *that* library used? Right, digging deeper, it looks like `mscc_ocelot_switch_lib.o` is only leveraged by two main areas: `drivers/net/dsa/ocelot/` which covers felix, seville, and ocelot_ext, and `drivers/net/ethernet/mscc/`, specifically the `ocelot_vsc7514` driver. Nothing too surprising yet. However, I'm thinking strategically now. I need to make sure I'm covering all potential bases. Are there any clever mock implementations out there that might also be using this code? Or, what about netdevsim, virtual switchdev, or even other drivers that could be leveraging ocelot functionality indirectly? My next move is clear. I need to conduct a comprehensive search across the entire codebase for any mention of "ocelot." This should expose any subtle dependencies or alternative uses that might not be immediately obvious from these direct dependencies. A good solid search should show any other areas of interest. |
| 16/2 | 2026/09/19 08:28 | tool | grepper |
0mArgs:{
"Expression": "ocelot_probe"
}Results: {
"Output": "drivers/net/ethernet/mscc/ocelot.h=95=int ocelot_netdev_to_port(struct ocelot *ocelot, struct net_device *dev);\ndrivers/net/ethernet/mscc/ocelot.h-96-\ndrivers/net/ethernet/mscc/ocelot.h:97:int ocelot_probe_port(struct ocelot *ocelot, int port, struct regmap *target,\ndrivers/net/ethernet/mscc/ocelot.h-98-\t\t struct device_node *portnp);\n--\ndrivers/net/ethernet/mscc/ocelot_net.c=1780=static int ocelot_port_phylink_create(struct ocelot *ocelot, int port,\n--\ndrivers/net/ethernet/mscc/ocelot_net.c-1842-\ndrivers/net/ethernet/mscc/ocelot_net.c:1843:int ocelot_probe_port(struct ocelot *ocelot, int port, struct regmap *target,\ndrivers/net/ethernet/mscc/ocelot_net.c-1844-\t\t struct device_node *portnp)\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c=146=static int mscc_ocelot_init_ports(struct platform_device *pdev,\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-200-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:201:\t\terr = ocelot_probe_port(ocelot, port, target, portnp);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-202-\t\tif (err) {\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-235-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:236:static int mscc_ocelot_probe(struct platform_device *pdev)\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-237-{\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c=419=static struct platform_driver mscc_ocelot_driver = {\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:420:\t.probe = mscc_ocelot_probe,\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-421-\t.remove = mscc_ocelot_remove,\n"
} |
| 17/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11829 output: 33 thoughts: 25 Thoughts: Here's a summary of my thoughts, as if I were analyzing the situation: **Diving into `felix_probe` in `drivers/net/dsa/ocelot/`** Okay, so I'm looking at `felix_probe` within the Ocelot DSA driver code. This tells me we're likely dealing with the probing function for the Felix switch within the context of Distributed Switch Architecture (DSA). That's interesting; Ocelot, of course, is a broader family, and Felix is a specific hardware platform (or at least a logical entity within the system). The fact that it's a *probe* function is crucial. This is where the driver interacts with the hardware for the very first time. I need to understand what's happening here. What's the detection mechanism? How is the driver identifying a Felix device? What resource allocation is taking place? Is it handling any specific hardware initialization steps particular to the Felix variant? Are we registering this new device with the DSA subsystem here? Are there any specific quirks or hardware dependencies being handled? I need to analyze the surrounding context to understand what's happening before and after this function is called. My focus has to be on how this specific Felix instantiation is integrated within the overall Ocelot driver framework. I'm looking for the key interactions with the hardware and how the driver gets this particular device up and running, and whether there are any deviations from the standard DSA procedure. This is the starting point for everything else that follows, so this needs to be well understood. |
| 18/2 | 2026/09/19 08:28 | tool | grepper |
0mArgs:{
"Expression": "felix_",
"PathPrefix": "drivers/net/dsa/ocelot"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1114 lines.\nUse more precise expression if possible.\n\ndrivers/net/dsa/ocelot/Makefile-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/dsa/ocelot/Makefile:2:obj-$(CONFIG_NET_DSA_MSCC_FELIX_DSA_LIB) += mscc_felix_dsa_lib.o\ndrivers/net/dsa/ocelot/Makefile-3-obj-$(CONFIG_NET_DSA_MSCC_FELIX) += mscc_felix.o\n--\ndrivers/net/dsa/ocelot/Makefile=5=obj-$(CONFIG_NET_DSA_MSCC_SEVILLE) += mscc_seville.o\ndrivers/net/dsa/ocelot/Makefile-6-\ndrivers/net/dsa/ocelot/Makefile:7:mscc_felix_dsa_lib-objs := felix.o\ndrivers/net/dsa/ocelot/Makefile:8:mscc_felix-objs := felix_vsc9959.o\ndrivers/net/dsa/ocelot/Makefile-9-mscc_ocelot_ext-objs := ocelot_ext.o\n--\ndrivers/net/dsa/ocelot/felix.c-31- */\ndrivers/net/dsa/ocelot/felix.c:32:static struct net_device *felix_classify_db(struct dsa_db db)\ndrivers/net/dsa/ocelot/felix.c-33-{\n--\ndrivers/net/dsa/ocelot/felix.c-44-\ndrivers/net/dsa/ocelot/felix.c:45:static int felix_cpu_port_for_conduit(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c-46-\t\t\t\t struct net_device *conduit)\n--\ndrivers/net/dsa/ocelot/felix.c-64-/**\ndrivers/net/dsa/ocelot/felix.c:65: * felix_update_tag_8021q_rx_rule - Update VCAP ES0 tag_8021q rule after\ndrivers/net/dsa/ocelot/felix.c-66- *\t\t\t\t vlan_filtering change\n--\ndrivers/net/dsa/ocelot/felix.c=88=static void\ndrivers/net/dsa/ocelot/felix.c:89:felix_update_tag_8021q_rx_rule(struct ocelot_vcap_filter *outer_tagging_rule,\ndrivers/net/dsa/ocelot/felix.c-90-\t\t\t bool vlan_filtering)\n--\ndrivers/net/dsa/ocelot/felix.c-100- */\ndrivers/net/dsa/ocelot/felix.c:101:static int felix_tag_8021q_vlan_add_rx(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-102-\t\t\t\t int upstream, u16 vid,\n--\ndrivers/net/dsa/ocelot/felix.c-132-\touter_tagging_rule-\u003eaction.vid_a_val = vid;\ndrivers/net/dsa/ocelot/felix.c:133:\tfelix_update_tag_8021q_rx_rule(outer_tagging_rule, vlan_filtering);\ndrivers/net/dsa/ocelot/felix.c-134-\touter_tagging_rule-\u003eaction.tag_b_tpid_sel = OCELOT_TAG_TPID_SEL_8021Q;\n--\ndrivers/net/dsa/ocelot/felix.c-148-\ndrivers/net/dsa/ocelot/felix.c:149:static int felix_tag_8021q_vlan_del_rx(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-150-\t\t\t\t int upstream, u16 vid)\n--\ndrivers/net/dsa/ocelot/felix.c-170- */\ndrivers/net/dsa/ocelot/felix.c:171:static int felix_tag_8021q_vlan_add_tx(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-172-\t\t\t\t u16 vid)\n--\ndrivers/net/dsa/ocelot/felix.c-237-\ndrivers/net/dsa/ocelot/felix.c:238:static int felix_tag_8021q_vlan_del_tx(struct dsa_switch *ds, int port, u16 vid)\ndrivers/net/dsa/ocelot/felix.c-239-{\n--\ndrivers/net/dsa/ocelot/felix.c-268-\ndrivers/net/dsa/ocelot/felix.c:269:static int felix_tag_8021q_vlan_add(struct dsa_switch *ds, int port, u16 vid,\ndrivers/net/dsa/ocelot/felix.c-270-\t\t\t\t u16 flags)\n--\ndrivers/net/dsa/ocelot/felix.c-283-\tdsa_switch_for_each_cpu_port(cpu_dp, ds) {\ndrivers/net/dsa/ocelot/felix.c:284:\t\terr = felix_tag_8021q_vlan_add_rx(ds, port, cpu_dp-\u003eindex, vid,\ndrivers/net/dsa/ocelot/felix.c-285-\t\t\t\t\t\t dsa_port_is_vlan_filtering(dp));\n--\ndrivers/net/dsa/ocelot/felix.c-289-\ndrivers/net/dsa/ocelot/felix.c:290:\terr = felix_tag_8021q_vlan_add_tx(ds, port, vid);\ndrivers/net/dsa/ocelot/felix.c-291-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c-297-\tdsa_switch_for_each_cpu_port(cpu_dp, ds)\ndrivers/net/dsa/ocelot/felix.c:298:\t\tfelix_tag_8021q_vlan_del_rx(ds, port, cpu_dp-\u003eindex, vid);\ndrivers/net/dsa/ocelot/felix.c-299-\n--\ndrivers/net/dsa/ocelot/felix.c-302-\ndrivers/net/dsa/ocelot/felix.c:303:static int felix_tag_8021q_vlan_del(struct dsa_switch *ds, int port, u16 vid)\ndrivers/net/dsa/ocelot/felix.c-304-{\n--\ndrivers/net/dsa/ocelot/felix.c-312-\tdsa_switch_for_each_cpu_port(cpu_dp, ds) {\ndrivers/net/dsa/ocelot/felix.c:313:\t\terr = felix_tag_8021q_vlan_del_rx(ds, port, cpu_dp-\u003eindex, vid);\ndrivers/net/dsa/ocelot/felix.c-314-\t\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c-317-\ndrivers/net/dsa/ocelot/felix.c:318:\terr = felix_tag_8021q_vlan_del_tx(ds, port, vid);\ndrivers/net/dsa/ocelot/felix.c-319-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c-325-\tdsa_switch_for_each_cpu_port(cpu_dp, ds)\ndrivers/net/dsa/ocelot/felix.c:326:\t\tfelix_tag_8021q_vlan_add_rx(ds, port, cpu_dp-\u003eindex, vid,\ndrivers/net/dsa/ocelot/felix.c-327-\t\t\t\t\t dsa_port_is_vlan_filtering(dp));\n--\ndrivers/net/dsa/ocelot/felix.c-331-\ndrivers/net/dsa/ocelot/felix.c:332:static int felix_update_tag_8021q_rx_rules(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-333-\t\t\t\t\t bool vlan_filtering)\n--\ndrivers/net/dsa/ocelot/felix.c-350-\ndrivers/net/dsa/ocelot/felix.c:351:\t\tfelix_update_tag_8021q_rx_rule(outer_tagging_rule, vlan_filtering);\ndrivers/net/dsa/ocelot/felix.c-352-\n--\ndrivers/net/dsa/ocelot/felix.c-360-\ndrivers/net/dsa/ocelot/felix.c:361:static int felix_trap_get_cpu_port(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c-362-\t\t\t\t const struct ocelot_vcap_filter *trap)\n--\ndrivers/net/dsa/ocelot/felix.c-379- */\ndrivers/net/dsa/ocelot/felix.c:380:static int felix_update_trapping_destinations(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c-381-\t\t\t\t\t bool using_tag_8021q)\n--\ndrivers/net/dsa/ocelot/felix.c-411-\t\t\tmask_mode = OCELOT_MASK_MODE_REDIRECT;\ndrivers/net/dsa/ocelot/felix.c:412:\t\t\tport_mask = BIT(felix_trap_get_cpu_port(ds, trap));\ndrivers/net/dsa/ocelot/felix.c-413-\t\t\tcpu_copy_ena = !!trap-\u003etake_ts;\n--\ndrivers/net/dsa/ocelot/felix.c-445- */\ndrivers/net/dsa/ocelot/felix.c:446:static void felix_npi_port_init(struct ocelot *ocelot, int port)\ndrivers/net/dsa/ocelot/felix.c-447-{\n--\ndrivers/net/dsa/ocelot/felix.c-463-\ndrivers/net/dsa/ocelot/felix.c:464:static void felix_npi_port_deinit(struct ocelot *ocelot, int port)\ndrivers/net/dsa/ocelot/felix.c-465-{\n--\ndrivers/net/dsa/ocelot/felix.c-482-\ndrivers/net/dsa/ocelot/felix.c:483:static int felix_tag_npi_setup(struct dsa_switch *ds)\ndrivers/net/dsa/ocelot/felix.c-484-{\n--\ndrivers/net/dsa/ocelot/felix.c-499-\ndrivers/net/dsa/ocelot/felix.c:500:\tfelix_npi_port_init(ocelot, first_cpu_dp-\u003eindex);\ndrivers/net/dsa/ocelot/felix.c-501-\n--\ndrivers/net/dsa/ocelot/felix.c-504-\ndrivers/net/dsa/ocelot/felix.c:505:static void felix_tag_npi_teardown(struct dsa_switch *ds)\ndrivers/net/dsa/ocelot/felix.c-506-{\n--\ndrivers/net/dsa/ocelot/felix.c-508-\ndrivers/net/dsa/ocelot/felix.c:509:\tfelix_npi_port_deinit(ocelot, ocelot-\u003enpi);\ndrivers/net/dsa/ocelot/felix.c-510-}\ndrivers/net/dsa/ocelot/felix.c-511-\ndrivers/net/dsa/ocelot/felix.c:512:static unsigned long felix_tag_npi_get_host_fwd_mask(struct dsa_switch *ds)\ndrivers/net/dsa/ocelot/felix.c-513-{\n--\ndrivers/net/dsa/ocelot/felix.c-518-\ndrivers/net/dsa/ocelot/felix.c:519:static int felix_tag_npi_change_conduit(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-520-\t\t\t\t\tstruct net_device *conduit,\n--\ndrivers/net/dsa/ocelot/felix.c-546-\ndrivers/net/dsa/ocelot/felix.c:547:\tfelix_npi_port_deinit(ocelot, ocelot-\u003enpi);\ndrivers/net/dsa/ocelot/felix.c:548:\tfelix_npi_port_init(ocelot, felix_cpu_port_for_conduit(ds, conduit));\ndrivers/net/dsa/ocelot/felix.c-549-\n--\ndrivers/net/dsa/ocelot/felix.c-559- */\ndrivers/net/dsa/ocelot/felix.c:560:static const struct felix_tag_proto_ops felix_tag_npi_proto_ops = {\ndrivers/net/dsa/ocelot/felix.c:561:\t.setup\t\t\t= felix_tag_npi_setup,\ndrivers/net/dsa/ocelot/felix.c:562:\t.teardown\t\t= felix_tag_npi_teardown,\ndrivers/net/dsa/ocelot/felix.c:563:\t.get_host_fwd_mask\t= felix_tag_npi_get_host_fwd_mask,\ndrivers/net/dsa/ocelot/felix.c:564:\t.change_conduit\t\t= felix_tag_npi_change_conduit,\ndrivers/net/dsa/ocelot/felix.c-565-};\ndrivers/net/dsa/ocelot/felix.c-566-\ndrivers/net/dsa/ocelot/felix.c:567:static int felix_tag_8021q_setup(struct dsa_switch *ds)\ndrivers/net/dsa/ocelot/felix.c-568-{\n--\ndrivers/net/dsa/ocelot/felix.c-622-\ndrivers/net/dsa/ocelot/felix.c:623:static void felix_tag_8021q_teardown(struct dsa_switch *ds)\ndrivers/net/dsa/ocelot/felix.c-624-{\n--\ndrivers/net/dsa/ocelot/felix.c-647-\ndrivers/net/dsa/ocelot/felix.c:648:static unsigned long felix_tag_8021q_get_host_fwd_mask(struct dsa_switch *ds)\ndrivers/net/dsa/ocelot/felix.c-649-{\n--\ndrivers/net/dsa/ocelot/felix.c-652-\ndrivers/net/dsa/ocelot/felix.c:653:static int felix_tag_8021q_change_conduit(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-654-\t\t\t\t\t struct net_device *conduit,\n--\ndrivers/net/dsa/ocelot/felix.c-656-{\ndrivers/net/dsa/ocelot/felix.c:657:\tint cpu = felix_cpu_port_for_conduit(ds, conduit);\ndrivers/net/dsa/ocelot/felix.c-658-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-662-\ndrivers/net/dsa/ocelot/felix.c:663:\treturn felix_update_trapping_destinations(ds, true);\ndrivers/net/dsa/ocelot/felix.c-664-}\ndrivers/net/dsa/ocelot/felix.c-665-\ndrivers/net/dsa/ocelot/felix.c:666:static const struct felix_tag_proto_ops felix_tag_8021q_proto_ops = {\ndrivers/net/dsa/ocelot/felix.c:667:\t.setup\t\t\t= felix_tag_8021q_setup,\ndrivers/net/dsa/ocelot/felix.c:668:\t.teardown\t\t= felix_tag_8021q_teardown,\ndrivers/net/dsa/ocelot/felix.c:669:\t.get_host_fwd_mask\t= felix_tag_8021q_get_host_fwd_mask,\ndrivers/net/dsa/ocelot/felix.c:670:\t.change_conduit\t\t= felix_tag_8021q_change_conduit,\ndrivers/net/dsa/ocelot/felix.c-671-};\ndrivers/net/dsa/ocelot/felix.c-672-\ndrivers/net/dsa/ocelot/felix.c:673:static void felix_set_host_flood(struct dsa_switch *ds, unsigned long mask,\ndrivers/net/dsa/ocelot/felix.c-674-\t\t\t\t bool uc, bool mc, bool bc)\n--\ndrivers/net/dsa/ocelot/felix.c=691=static void\ndrivers/net/dsa/ocelot/felix.c:692:felix_migrate_host_flood(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c:693:\t\t\t const struct felix_tag_proto_ops *proto_ops,\ndrivers/net/dsa/ocelot/felix.c:694:\t\t\t const struct felix_tag_proto_ops *old_proto_ops)\ndrivers/net/dsa/ocelot/felix.c-695-{\n--\ndrivers/net/dsa/ocelot/felix.c-701-\t\tmask = old_proto_ops-\u003eget_host_fwd_mask(ds);\ndrivers/net/dsa/ocelot/felix.c:702:\t\tfelix_set_host_flood(ds, mask, false, false, false);\ndrivers/net/dsa/ocelot/felix.c-703-\t}\n--\ndrivers/net/dsa/ocelot/felix.c-705-\tmask = proto_ops-\u003eget_host_fwd_mask(ds);\ndrivers/net/dsa/ocelot/felix.c:706:\tfelix_set_host_flood(ds, mask, !!felix-\u003ehost_flood_uc_mask,\ndrivers/net/dsa/ocelot/felix.c-707-\t\t\t !!felix-\u003ehost_flood_mc_mask, true);\n--\ndrivers/net/dsa/ocelot/felix.c-709-\ndrivers/net/dsa/ocelot/felix.c:710:static int felix_migrate_mdbs(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c:711:\t\t\t const struct felix_tag_proto_ops *proto_ops,\ndrivers/net/dsa/ocelot/felix.c:712:\t\t\t const struct felix_tag_proto_ops *old_proto_ops)\ndrivers/net/dsa/ocelot/felix.c-713-{\n--\ndrivers/net/dsa/ocelot/felix.c=731=static int\ndrivers/net/dsa/ocelot/felix.c:732:felix_tag_proto_setup_shared(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c:733:\t\t\t const struct felix_tag_proto_ops *proto_ops,\ndrivers/net/dsa/ocelot/felix.c:734:\t\t\t const struct felix_tag_proto_ops *old_proto_ops)\ndrivers/net/dsa/ocelot/felix.c-735-{\ndrivers/net/dsa/ocelot/felix.c:736:\tbool using_tag_8021q = (proto_ops == \u0026felix_tag_8021q_proto_ops);\ndrivers/net/dsa/ocelot/felix.c-737-\tint err;\ndrivers/net/dsa/ocelot/felix.c-738-\ndrivers/net/dsa/ocelot/felix.c:739:\terr = felix_migrate_mdbs(ds, proto_ops, old_proto_ops);\ndrivers/net/dsa/ocelot/felix.c-740-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c-742-\ndrivers/net/dsa/ocelot/felix.c:743:\tfelix_update_trapping_destinations(ds, using_tag_8021q);\ndrivers/net/dsa/ocelot/felix.c-744-\ndrivers/net/dsa/ocelot/felix.c:745:\tfelix_migrate_host_flood(ds, proto_ops, old_proto_ops);\ndrivers/net/dsa/ocelot/felix.c-746-\n--\ndrivers/net/dsa/ocelot/felix.c-753- */\ndrivers/net/dsa/ocelot/felix.c:754:static int felix_change_tag_protocol(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c-755-\t\t\t\t enum dsa_tag_protocol proto)\ndrivers/net/dsa/ocelot/felix.c-756-{\ndrivers/net/dsa/ocelot/felix.c:757:\tconst struct felix_tag_proto_ops *old_proto_ops, *proto_ops;\ndrivers/net/dsa/ocelot/felix.c-758-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-764-\tcase DSA_TAG_PROTO_OCELOT:\ndrivers/net/dsa/ocelot/felix.c:765:\t\tproto_ops = \u0026felix_tag_npi_proto_ops;\ndrivers/net/dsa/ocelot/felix.c-766-\t\tbreak;\ndrivers/net/dsa/ocelot/felix.c-767-\tcase DSA_TAG_PROTO_OCELOT_8021Q:\ndrivers/net/dsa/ocelot/felix.c:768:\t\tproto_ops = \u0026felix_tag_8021q_proto_ops;\ndrivers/net/dsa/ocelot/felix.c-769-\t\tbreak;\n--\ndrivers/net/dsa/ocelot/felix.c-782-\ndrivers/net/dsa/ocelot/felix.c:783:\terr = felix_tag_proto_setup_shared(ds, proto_ops, old_proto_ops);\ndrivers/net/dsa/ocelot/felix.c-784-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c-800-\ndrivers/net/dsa/ocelot/felix.c:801:static enum dsa_tag_protocol felix_get_tag_protocol(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c-802-\t\t\t\t\t\t int port,\n--\ndrivers/net/dsa/ocelot/felix.c-810-\ndrivers/net/dsa/ocelot/felix.c:811:static void felix_port_set_host_flood(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-812-\t\t\t\t bool uc, bool mc)\n--\ndrivers/net/dsa/ocelot/felix.c-828-\tmask = felix-\u003etag_proto_ops-\u003eget_host_fwd_mask(ds);\ndrivers/net/dsa/ocelot/felix.c:829:\tfelix_set_host_flood(ds, mask, !!felix-\u003ehost_flood_uc_mask,\ndrivers/net/dsa/ocelot/felix.c-830-\t\t\t !!felix-\u003ehost_flood_mc_mask, true);\n--\ndrivers/net/dsa/ocelot/felix.c-832-\ndrivers/net/dsa/ocelot/felix.c:833:static int felix_port_change_conduit(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-834-\t\t\t\t struct net_device *conduit,\n--\ndrivers/net/dsa/ocelot/felix.c-842-\ndrivers/net/dsa/ocelot/felix.c:843:static int felix_set_ageing_time(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c-844-\t\t\t\t unsigned int ageing_time)\n--\ndrivers/net/dsa/ocelot/felix.c-852-\ndrivers/net/dsa/ocelot/felix.c:853:static void felix_port_fast_age(struct dsa_switch *ds, int port)\ndrivers/net/dsa/ocelot/felix.c-854-{\n--\ndrivers/net/dsa/ocelot/felix.c-863-\ndrivers/net/dsa/ocelot/felix.c:864:static int felix_fdb_dump(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-865-\t\t\t dsa_fdb_dump_cb_t *cb, void *data)\n--\ndrivers/net/dsa/ocelot/felix.c-871-\ndrivers/net/dsa/ocelot/felix.c:872:static int felix_fdb_add(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-873-\t\t\t const unsigned char *addr, u16 vid,\n--\ndrivers/net/dsa/ocelot/felix.c-875-{\ndrivers/net/dsa/ocelot/felix.c:876:\tstruct net_device *bridge_dev = felix_classify_db(db);\ndrivers/net/dsa/ocelot/felix.c-877-\tstruct dsa_port *dp = dsa_to_port(ds, port);\n--\ndrivers/net/dsa/ocelot/felix.c-892-\ndrivers/net/dsa/ocelot/felix.c:893:static int felix_fdb_del(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-894-\t\t\t const unsigned char *addr, u16 vid,\n--\ndrivers/net/dsa/ocelot/felix.c-896-{\ndrivers/net/dsa/ocelot/felix.c:897:\tstruct net_device *bridge_dev = felix_classify_db(db);\ndrivers/net/dsa/ocelot/felix.c-898-\tstruct dsa_port *dp = dsa_to_port(ds, port);\n--\ndrivers/net/dsa/ocelot/felix.c-913-\ndrivers/net/dsa/ocelot/felix.c:914:static int felix_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag lag,\ndrivers/net/dsa/ocelot/felix.c-915-\t\t\t const unsigned char *addr, u16 vid,\n--\ndrivers/net/dsa/ocelot/felix.c-917-{\ndrivers/net/dsa/ocelot/felix.c:918:\tstruct net_device *bridge_dev = felix_classify_db(db);\ndrivers/net/dsa/ocelot/felix.c-919-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-926-\ndrivers/net/dsa/ocelot/felix.c:927:static int felix_lag_fdb_del(struct dsa_switch *ds, struct dsa_lag lag,\ndrivers/net/dsa/ocelot/felix.c-928-\t\t\t const unsigned char *addr, u16 vid,\n--\ndrivers/net/dsa/ocelot/felix.c-930-{\ndrivers/net/dsa/ocelot/felix.c:931:\tstruct net_device *bridge_dev = felix_classify_db(db);\ndrivers/net/dsa/ocelot/felix.c-932-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-939-\ndrivers/net/dsa/ocelot/felix.c:940:static int felix_mdb_add(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-941-\t\t\t const struct switchdev_obj_port_mdb *mdb,\n--\ndrivers/net/dsa/ocelot/felix.c-943-{\ndrivers/net/dsa/ocelot/felix.c:944:\tstruct net_device *bridge_dev = felix_classify_db(db);\ndrivers/net/dsa/ocelot/felix.c-945-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-959-\ndrivers/net/dsa/ocelot/felix.c:960:static int felix_mdb_del(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-961-\t\t\t const struct switchdev_obj_port_mdb *mdb,\n--\ndrivers/net/dsa/ocelot/felix.c-963-{\ndrivers/net/dsa/ocelot/felix.c:964:\tstruct net_device *bridge_dev = felix_classify_db(db);\ndrivers/net/dsa/ocelot/felix.c-965-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-979-\ndrivers/net/dsa/ocelot/felix.c:980:static void felix_bridge_stp_state_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-981-\t\t\t\t u8 state)\n--\ndrivers/net/dsa/ocelot/felix.c-987-\ndrivers/net/dsa/ocelot/felix.c:988:static int felix_pre_bridge_flags(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-989-\t\t\t\t struct switchdev_brport_flags val,\n--\ndrivers/net/dsa/ocelot/felix.c-996-\ndrivers/net/dsa/ocelot/felix.c:997:static int felix_bridge_flags(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-998-\t\t\t struct switchdev_brport_flags val,\n--\ndrivers/net/dsa/ocelot/felix.c-1010-\ndrivers/net/dsa/ocelot/felix.c:1011:static int felix_bridge_join(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1012-\t\t\t struct dsa_bridge bridge, bool *tx_fwd_offload,\n--\ndrivers/net/dsa/ocelot/felix.c-1020-\ndrivers/net/dsa/ocelot/felix.c:1021:static void felix_bridge_leave(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1022-\t\t\t struct dsa_bridge bridge)\n--\ndrivers/net/dsa/ocelot/felix.c-1028-\ndrivers/net/dsa/ocelot/felix.c:1029:static int felix_lag_join(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1030-\t\t\t struct dsa_lag lag,\n--\ndrivers/net/dsa/ocelot/felix.c-1044-\ndrivers/net/dsa/ocelot/felix.c:1045:\treturn felix_port_change_conduit(ds, port, lag.dev, extack);\ndrivers/net/dsa/ocelot/felix.c-1046-}\ndrivers/net/dsa/ocelot/felix.c-1047-\ndrivers/net/dsa/ocelot/felix.c:1048:static int felix_lag_leave(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1049-\t\t\t struct dsa_lag lag)\n--\ndrivers/net/dsa/ocelot/felix.c-1058-\ndrivers/net/dsa/ocelot/felix.c:1059:\treturn felix_port_change_conduit(ds, port, lag.dev, NULL);\ndrivers/net/dsa/ocelot/felix.c-1060-}\ndrivers/net/dsa/ocelot/felix.c-1061-\ndrivers/net/dsa/ocelot/felix.c:1062:static int felix_lag_change(struct dsa_switch *ds, int port)\ndrivers/net/dsa/ocelot/felix.c-1063-{\n--\ndrivers/net/dsa/ocelot/felix.c-1071-\ndrivers/net/dsa/ocelot/felix.c:1072:static int felix_vlan_prepare(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1073-\t\t\t const struct switchdev_obj_port_vlan *vlan,\n--\ndrivers/net/dsa/ocelot/felix.c-1095-\ndrivers/net/dsa/ocelot/felix.c:1096:static int felix_vlan_filtering(struct dsa_switch *ds, int port, bool enabled,\ndrivers/net/dsa/ocelot/felix.c-1097-\t\t\t\tstruct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/ocelot/felix.c-1110-\tif (using_tag_8021q) {\ndrivers/net/dsa/ocelot/felix.c:1111:\t\terr = felix_update_tag_8021q_rx_rules(ds, port, enabled);\ndrivers/net/dsa/ocelot/felix.c-1112-\t\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c-1118-\ndrivers/net/dsa/ocelot/felix.c:1119:static int felix_vlan_add(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1120-\t\t\t const struct switchdev_obj_port_vlan *vlan,\n--\ndrivers/net/dsa/ocelot/felix.c-1126-\ndrivers/net/dsa/ocelot/felix.c:1127:\terr = felix_vlan_prepare(ds, port, vlan, extack);\ndrivers/net/dsa/ocelot/felix.c-1128-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c-1135-\ndrivers/net/dsa/ocelot/felix.c:1136:static int felix_vlan_del(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1137-\t\t\t const struct switchdev_obj_port_vlan *vlan)\n--\ndrivers/net/dsa/ocelot/felix.c-1143-\ndrivers/net/dsa/ocelot/felix.c:1144:static void felix_phylink_get_caps(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1145-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/ocelot/felix.c-1159-\ndrivers/net/dsa/ocelot/felix.c:1160:static void felix_phylink_mac_config(struct phylink_config *config,\ndrivers/net/dsa/ocelot/felix.c-1161-\t\t\t\t unsigned int mode,\n--\ndrivers/net/dsa/ocelot/felix.c=1175=static struct phylink_pcs *\ndrivers/net/dsa/ocelot/felix.c:1176:felix_phylink_mac_select_pcs(struct phylink_config *config,\ndrivers/net/dsa/ocelot/felix.c-1177-\t\t\t phy_interface_t iface)\n--\ndrivers/net/dsa/ocelot/felix.c-1192-\ndrivers/net/dsa/ocelot/felix.c:1193:static void felix_phylink_mac_link_down(struct phylink_config *config,\ndrivers/net/dsa/ocelot/felix.c-1194-\t\t\t\t\tunsigned int link_an_mode,\n--\ndrivers/net/dsa/ocelot/felix.c-1207-\ndrivers/net/dsa/ocelot/felix.c:1208:static void felix_phylink_mac_link_up(struct phylink_config *config,\ndrivers/net/dsa/ocelot/felix.c-1209-\t\t\t\t struct phy_device *phydev,\n--\ndrivers/net/dsa/ocelot/felix.c-1229-\ndrivers/net/dsa/ocelot/felix.c:1230:static int felix_port_enable(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1231-\t\t\t struct phy_device *phydev)\n--\ndrivers/net/dsa/ocelot/felix.c-1242-\ndrivers/net/dsa/ocelot/felix.c:1243:\t\tif (felix_cpu_port_for_conduit(ds, conduit) != ocelot-\u003enpi) {\ndrivers/net/dsa/ocelot/felix.c-1244-\t\t\tdev_err(ds-\u003edev, \"Multiple conduits are not allowed\\n\");\n--\ndrivers/net/dsa/ocelot/felix.c-1254-\ndrivers/net/dsa/ocelot/felix.c:1255:static void felix_port_disable(struct dsa_switch *ds, int port)\ndrivers/net/dsa/ocelot/felix.c-1256-{\n--\ndrivers/net/dsa/ocelot/felix.c-1269-\ndrivers/net/dsa/ocelot/felix.c:1270:static void felix_port_qos_map_init(struct ocelot *ocelot, int port)\ndrivers/net/dsa/ocelot/felix.c-1271-{\n--\ndrivers/net/dsa/ocelot/felix.c-1290-\ndrivers/net/dsa/ocelot/felix.c:1291:static void felix_get_stats64(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1292-\t\t\t struct rtnl_link_stats64 *stats)\n--\ndrivers/net/dsa/ocelot/felix.c-1298-\ndrivers/net/dsa/ocelot/felix.c:1299:static void felix_get_pause_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1300-\t\t\t\t struct ethtool_pause_stats *pause_stats)\n--\ndrivers/net/dsa/ocelot/felix.c-1306-\ndrivers/net/dsa/ocelot/felix.c:1307:static void felix_get_rmon_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1308-\t\t\t\t struct ethtool_rmon_stats *rmon_stats,\n--\ndrivers/net/dsa/ocelot/felix.c-1315-\ndrivers/net/dsa/ocelot/felix.c:1316:static void felix_get_eth_ctrl_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1317-\t\t\t\t struct ethtool_eth_ctrl_stats *ctrl_stats)\n--\ndrivers/net/dsa/ocelot/felix.c-1323-\ndrivers/net/dsa/ocelot/felix.c:1324:static void felix_get_eth_mac_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1325-\t\t\t\t struct ethtool_eth_mac_stats *mac_stats)\n--\ndrivers/net/dsa/ocelot/felix.c-1331-\ndrivers/net/dsa/ocelot/felix.c:1332:static void felix_get_eth_phy_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1333-\t\t\t\t struct ethtool_eth_phy_stats *phy_stats)\n--\ndrivers/net/dsa/ocelot/felix.c-1339-\ndrivers/net/dsa/ocelot/felix.c:1340:static void felix_get_ts_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1341-\t\t\t struct ethtool_ts_stats *ts_stats)\n--\ndrivers/net/dsa/ocelot/felix.c-1347-\ndrivers/net/dsa/ocelot/felix.c:1348:static void felix_get_strings(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1349-\t\t\t u32 stringset, u8 *data)\n--\ndrivers/net/dsa/ocelot/felix.c-1355-\ndrivers/net/dsa/ocelot/felix.c:1356:static void felix_get_ethtool_stats(struct dsa_switch *ds, int port, u64 *data)\ndrivers/net/dsa/ocelot/felix.c-1357-{\n--\ndrivers/net/dsa/ocelot/felix.c-1362-\ndrivers/net/dsa/ocelot/felix.c:1363:static int felix_get_sset_count(struct dsa_switch *ds, int port, int sset)\ndrivers/net/dsa/ocelot/felix.c-1364-{\n--\ndrivers/net/dsa/ocelot/felix.c-1369-\ndrivers/net/dsa/ocelot/felix.c:1370:static int felix_get_ts_info(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c-1371-\t\t\t struct kernel_ethtool_ts_info *info)\n--\ndrivers/net/dsa/ocelot/felix.c-1377-\ndrivers/net/dsa/ocelot/felix.c:1378:static const u32 felix_phy_match_table[PHY_INTERFACE_MODE_MAX] = {\ndrivers/net/dsa/ocelot/felix.c-1379-\t[PHY_INTERFACE_MODE_INTERNAL] = OCELOT_PORT_MODE_INTERNAL,\n--\ndrivers/net/dsa/ocelot/felix.c-1387-\ndrivers/net/dsa/ocelot/felix.c:1388:static int felix_validate_phy_mode(struct felix *felix, int port,\ndrivers/net/dsa/ocelot/felix.c-1389-\t\t\t\t phy_interface_t phy_mode)\n--\ndrivers/net/dsa/ocelot/felix.c-1392-\ndrivers/net/dsa/ocelot/felix.c:1393:\tif (felix_phy_match_table[phy_mode] \u0026 modes)\ndrivers/net/dsa/ocelot/felix.c-1394-\t\treturn 0;\n--\ndrivers/net/dsa/ocelot/felix.c-1397-\ndrivers/net/dsa/ocelot/felix.c:1398:static int felix_parse_ports_node(struct felix *felix,\ndrivers/net/dsa/ocelot/felix.c-1399-\t\t\t\t struct device_node *ports_node,\n--\ndrivers/net/dsa/ocelot/felix.c-1424-\ndrivers/net/dsa/ocelot/felix.c:1425:\t\terr = felix_validate_phy_mode(felix, port, phy_mode);\ndrivers/net/dsa/ocelot/felix.c-1426-\t\tif (err \u003c 0) {\n--\ndrivers/net/dsa/ocelot/felix.c-1442-\ndrivers/net/dsa/ocelot/felix.c:1443:static int felix_parse_dt(struct felix *felix, phy_interface_t *port_phy_modes)\ndrivers/net/dsa/ocelot/felix.c-1444-{\n--\ndrivers/net/dsa/ocelot/felix.c-1459-\ndrivers/net/dsa/ocelot/felix.c:1460:\terr = felix_parse_ports_node(felix, ports_node, port_phy_modes);\ndrivers/net/dsa/ocelot/felix.c-1461-\tof_node_put(ports_node);\n--\ndrivers/net/dsa/ocelot/felix.c-1465-\ndrivers/net/dsa/ocelot/felix.c:1466:static struct regmap *felix_request_regmap_by_name(struct felix *felix,\ndrivers/net/dsa/ocelot/felix.c-1467-\t\t\t\t\t\t const char *resource_name)\n--\ndrivers/net/dsa/ocelot/felix.c-1493-\ndrivers/net/dsa/ocelot/felix.c:1494:static struct regmap *felix_request_regmap(struct felix *felix,\ndrivers/net/dsa/ocelot/felix.c-1495-\t\t\t\t\t enum ocelot_target target)\n--\ndrivers/net/dsa/ocelot/felix.c-1504-\ndrivers/net/dsa/ocelot/felix.c:1505:\treturn felix_request_regmap_by_name(felix, resource_name);\ndrivers/net/dsa/ocelot/felix.c-1506-}\ndrivers/net/dsa/ocelot/felix.c-1507-\ndrivers/net/dsa/ocelot/felix.c:1508:static struct regmap *felix_request_port_regmap(struct felix *felix, int port)\ndrivers/net/dsa/ocelot/felix.c-1509-{\n--\ndrivers/net/dsa/ocelot/felix.c-1513-\ndrivers/net/dsa/ocelot/felix.c:1514:\treturn felix_request_regmap_by_name(felix, resource_name);\ndrivers/net/dsa/ocelot/felix.c-1515-}\ndrivers/net/dsa/ocelot/felix.c-1516-\ndrivers/net/dsa/ocelot/felix.c:1517:static int felix_init_structs(struct felix *felix, int num_phys_ports)\ndrivers/net/dsa/ocelot/felix.c-1518-{\n--\ndrivers/net/dsa/ocelot/felix.c-1545-\ndrivers/net/dsa/ocelot/felix.c:1546:\terr = felix_parse_dt(felix, port_phy_modes);\n\n"
} |
| 19/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25333 output: 34 thoughts: 20 Thoughts: Okay, let's dive into this. I'm going to take a look at `felix_vsc9959.c`. I need to understand what's happening within this file. My expertise tells me that this is likely a C source file, judging by the `.c` extension. Now, based on the filename convention, "felix" might suggest a connection to a specific hardware or software architecture - it's a good starting point for investigation. "VSC9959" could be a model number or an internal identifier for a particular device or component. I'll need to see if this naming convention is standard in the relevant code base. **Diving into `felix_vsc9959.c`** Alright, my immediate goal is to identify the purpose of this code. Is it a driver, a library, a configuration module, or something else entirely? I'll be looking for key indicators: include statements, function definitions, variable declarations, and any comments that might give clues. I'll scan for any mentions of hardware interfaces, specific registers, or communication protocols, especially if the "VSC9959" part refers to an actual hardware component. I expect to see evidence of low-level interaction if it's device-related. Next, I'll pay close attention to the data structures. Are there any structs or enums defined? These will provide insights into how the system internally represents and manipulates data relevant to the "VSC9959" part. The functions themselves will reveal the control flow and operations being performed. I'll be looking for functions that likely handle initialization, configuration, data transfer, interrupt handling, or error management. Finally, I'll try to get a feel for the overall design. Is the code well-structured, modular, and commented? I'll assess its adherence to coding standards, and whether the code demonstrates a good understanding of the hardware/software interactions. The goal is to rapidly build a mental model of what this code does and how it integrates into the larger system. Let's see what's in there... |
| 20/2 | 2026/09/19 08:28 | tool | grepper |
0mArgs:{
"Expression": "pci_driver",
"PathPrefix": "drivers/net/dsa/ocelot"
}Results: {
"Output": "drivers/net/dsa/ocelot/felix_vsc9959.c=2745=MODULE_DEVICE_TABLE(pci, felix_ids);\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2746-\ndrivers/net/dsa/ocelot/felix_vsc9959.c:2747:static struct pci_driver felix_vsc9959_pci_driver = {\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2748-\t.name\t\t= \"mscc_felix\",\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2753-};\ndrivers/net/dsa/ocelot/felix_vsc9959.c:2754:module_pci_driver(felix_vsc9959_pci_driver);\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2755-\n"
} |
| 21/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26121 output: 34 thoughts: 55 Thoughts: Here's my summary, as the expert: **Investigating the `felix_vsc9959_pci_driver`** Okay, so I'm looking at this `felix_vsc9959_pci_driver`. It's a PCI driver, specifically for devices with the PCI ID `felix_ids`. Right, makes sense. Now, based on my knowledge, `felix_ids` rings a bell as related to the NXP LS1028A ENETC RCiEP, which means it likely handles the Ethernet controller in that embedded processor, acting as a Root Complex integrated Endpoint. Good to know. My next immediate step, then, is to delve into `felix_ids`. I need to confirm the exact device IDs and vendor IDs encompassed by that definition, and understand the scope of supported hardware. Is it a generic driver, or a specialized one? Does it cover all ENETC functionality or just a subset? Time to dive in and get those details straight. |
| 22/2 | 2026/09/19 08:28 | tool | grepper |
0mArgs:{
"Expression": "felix_ids",
"PathPrefix": "drivers/net/dsa/ocelot"
}Results: {
"Output": "drivers/net/dsa/ocelot/felix_vsc9959.c=2726=static void felix_pci_shutdown(struct pci_dev *pdev)\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2737-\ndrivers/net/dsa/ocelot/felix_vsc9959.c:2738:static struct pci_device_id felix_ids[] = {\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2739-\t{\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2744-};\ndrivers/net/dsa/ocelot/felix_vsc9959.c:2745:MODULE_DEVICE_TABLE(pci, felix_ids);\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2746-\ndrivers/net/dsa/ocelot/felix_vsc9959.c=2747=static struct pci_driver felix_vsc9959_pci_driver = {\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2748-\t.name\t\t= \"mscc_felix\",\ndrivers/net/dsa/ocelot/felix_vsc9959.c:2749:\t.id_table\t= felix_ids,\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2750-\t.probe\t\t= felix_pci_probe,\n"
} |
| 23/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26872 output: 51 thoughts: 21 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Analyzing PCI ID Assignment in felix_vsc9959.c** Alright, let's dive into this `felix_vsc9959.c` driver code and get a handle on how it handles PCI IDs. I need to understand the device identification strategy here. Specifically, I'm thinking, "Where are the PCI IDs defined? Is it a straightforward table lookup, or is there more complex matching involved?". I'm going to look for any constants or structures related to PCI device identification. This could be vendor/device ID pairs, subsystem ID checks, or even revision ID handling. I want to see how broadly or narrowly this driver is scoped in terms of the hardware it supports. I need to determine if it is designed to work with a range of hardware versions or specifically with particular hardware combinations. The goal is to rapidly determine how the driver knows when it's talking to a supported VSC9959 variant, and if there are any potential gotchas with different hardware revisions or configurations. |
| 24/2 | 2026/09/19 08:28 | tool | read-file |
0mArgs:{
"File": "drivers/net/dsa/ocelot/felix_vsc9959.c",
"FirstLine": 2735,
"LineCount": 20
}Results: {
"Contents": "2735:\t\tpci_set_drvdata(pdev, NULL);\n2736:\t}\n2737:\t\n2738:\tstatic struct pci_device_id felix_ids[] = {\n2739:\t\t{\n2740:\t\t\t/* NXP LS1028A */\n2741:\t\t\tPCI_DEVICE(PCI_VENDOR_ID_FREESCALE, 0xEEF0),\n2742:\t\t},\n2743:\t\t{ 0, }\n2744:\t};\n2745:\tMODULE_DEVICE_TABLE(pci, felix_ids);\n2746:\t\n2747:\tstatic struct pci_driver felix_vsc9959_pci_driver = {\n2748:\t\t.name\t\t= \"mscc_felix\",\n2749:\t\t.id_table\t= felix_ids,\n2750:\t\t.probe\t\t= felix_pci_probe,\n2751:\t\t.remove\t\t= felix_pci_remove,\n2752:\t\t.shutdown\t= felix_pci_shutdown,\n2753:\t};\n2754:\tmodule_pci_driver(felix_vsc9959_pci_driver);\n"
} |
| 25/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 27514 output: 51 thoughts: 19 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into the `felix_pci_probe` Function** Okay, time to get my hands dirty. I need to understand what's happening with this PCI device, so let's start by dissecting `felix_pci_probe`. Specifically, I want to see what initialization and resource allocation are being handled within this function. I'm looking for the standard PCI probe actions: bus access configuration, DMA setup (if any), interrupt handling registration, and potentially driver-specific hardware initialization sequences. I'm particularly interested in how they're handling device-specific quirks and workarounds within `felix_pci_probe`, if any, especially any that might be related to chipset or revision specific behavior. Let's see if this function is responsible for initial register writes to the device and if so what they are. Also I need to see what happens on errors, and how the driver deals with partial initialization or failing resource requests. Knowing this will give me a solid base to understand how the driver interfaces with the underlying hardware, allowing me to formulate more precise hypotheses about potential bottlenecks or failure points down the road. |
| 26/2 | 2026/09/19 08:28 | tool | read-file |
0mArgs:{
"File": "drivers/net/dsa/ocelot/felix_vsc9959.c",
"FirstLine": 2680,
"LineCount": 50
}Results: {
"Contents": "2680:\t\t.port_sched_speed_set\t= vsc9959_sched_speed_set,\n2681:\t\t.request_irq\t\t= vsc9959_request_irq,\n2682:\t};\n2683:\t\n2684:\tstatic int felix_pci_probe(struct pci_dev *pdev,\n2685:\t\t\t\t const struct pci_device_id *id)\n2686:\t{\n2687:\t\tstruct device *dev = \u0026pdev-\u003edev;\n2688:\t\tresource_size_t switch_base;\n2689:\t\tint err;\n2690:\t\n2691:\t\terr = pci_enable_device(pdev);\n2692:\t\tif (err) {\n2693:\t\t\tdev_err(dev, \"device enable failed: %pe\\n\", ERR_PTR(err));\n2694:\t\t\treturn err;\n2695:\t\t}\n2696:\t\n2697:\t\tpci_set_master(pdev);\n2698:\t\n2699:\t\tswitch_base = pci_resource_start(pdev, VSC9959_SWITCH_PCI_BAR);\n2700:\t\n2701:\t\terr = felix_register_switch(dev, switch_base, OCELOT_NUM_TC,\n2702:\t\t\t\t\t true, true, DSA_TAG_PROTO_OCELOT,\n2703:\t\t\t\t\t \u0026felix_info_vsc9959);\n2704:\t\tif (err)\n2705:\t\t\tgoto out_disable;\n2706:\t\n2707:\t\treturn 0;\n2708:\t\n2709:\tout_disable:\n2710:\t\tpci_disable_device(pdev);\n2711:\t\treturn err;\n2712:\t}\n2713:\t\n2714:\tstatic void felix_pci_remove(struct pci_dev *pdev)\n2715:\t{\n2716:\t\tstruct felix *felix = pci_get_drvdata(pdev);\n2717:\t\n2718:\t\tif (!felix)\n2719:\t\t\treturn;\n2720:\t\n2721:\t\tdsa_unregister_switch(felix-\u003eds);\n2722:\t\n2723:\t\tpci_disable_device(pdev);\n2724:\t}\n2725:\t\n2726:\tstatic void felix_pci_shutdown(struct pci_dev *pdev)\n2727:\t{\n2728:\t\tstruct felix *felix = pci_get_drvdata(pdev);\n2729:\t\n"
} |
| 27/2 | 2026/09/19 08:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 28567 output: 46 thoughts: 578 Thoughts: **Analyzing the NXP LS1028A ENETC RCiEP Driver Implementation** Okay, so I'm looking at `felix_pci_probe` and it's probing for a `PCI_VENDOR_ID_FREESCALE, 0xEEF0` device. Hmm, that's not a standard QEMU emulated device. That's the NXP LS1028A ENETC RCiEP embedded switch, which is a bit niche. My initial thought is to check `drivers/net/ethernet/mscc/` because that's often where I'd expect to find support for this kind of hardware. Let's dive into that directory. I see `mscc_ocelot_vsc7514.c`, that's a platform device for the VSC7514 SoC (Microsemi Ocelot SoC). Then there's `drivers/net/dsa/ocelot/seville_vsc9953.c` which is a platform device on the NXP T1040 SoC, that's interesting. And finally, `drivers/net/dsa/ocelot/ocelot_ext.c` handles SPI devices (VSC7511, VSC7512, VSC7513, and VSC7514 chips controlled via SPI). Now, what about the specific patch I'm looking at? Let's take a look at the diff. Okay, I'm looking at a change in `drivers/net/ethernet/mscc/ocelot_vcap.c`. The core of the change seems to be in `ocelot_vcap_filter_add_aux_resources`, specifically related to policers and mirroring. The change is adding a call to `ocelot_mirror_put` if the `ocelot_vcap_policer_add` fails when a policer is enabled and mirroring is also enabled. Seems like we're correctly releasing the mirror resource if the policer initialization failed which prevents a resource leak. This is good and makes sense in the context of the overall functionality. |
| 28/2 | 2026/09/19 08:28 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/mscc/ocelot_vcap.c",
"FirstLine": 950,
"LineCount": 40
}Results: {
"Contents": " 950:\t\n 951:\t\treturn 0;\n 952:\t}\n 953:\tEXPORT_SYMBOL(ocelot_vcap_policer_del);\n 954:\t\n 955:\tstatic int\n 956:\tocelot_vcap_filter_add_aux_resources(struct ocelot *ocelot,\n 957:\t\t\t\t\t struct ocelot_vcap_filter *filter,\n 958:\t\t\t\t\t struct netlink_ext_ack *extack)\n 959:\t{\n 960:\t\tstruct ocelot_mirror *m;\n 961:\t\tint ret;\n 962:\t\n 963:\t\tif (filter-\u003eblock_id == VCAP_IS2 \u0026\u0026 filter-\u003eaction.mirror_ena) {\n 964:\t\t\tm = ocelot_mirror_get(ocelot, filter-\u003eegress_port.value,\n 965:\t\t\t\t\t extack);\n 966:\t\t\tif (IS_ERR(m))\n 967:\t\t\t\treturn PTR_ERR(m);\n 968:\t\t}\n 969:\t\n 970:\t\tif (filter-\u003eblock_id == VCAP_IS2 \u0026\u0026 filter-\u003eaction.police_ena) {\n 971:\t\t\tret = ocelot_vcap_policer_add(ocelot, filter-\u003eaction.pol_ix,\n 972:\t\t\t\t\t\t \u0026filter-\u003eaction.pol);\n 973:\t\t\tif (ret) {\n 974:\t\t\t\tif (filter-\u003eaction.mirror_ena)\n 975:\t\t\t\t\tocelot_mirror_put(ocelot);\n 976:\t\t\t\treturn ret;\n 977:\t\t\t}\n 978:\t\t}\n 979:\t\n 980:\t\treturn 0;\n 981:\t}\n 982:\t\n 983:\tstatic void\n 984:\tocelot_vcap_filter_del_aux_resources(struct ocelot *ocelot,\n 985:\t\t\t\t\t struct ocelot_vcap_filter *filter)\n 986:\t{\n 987:\t\tif (filter-\u003eblock_id == VCAP_IS2 \u0026\u0026 filter-\u003eaction.police_ena)\n 988:\t\t\tocelot_vcap_policer_del(ocelot, filter-\u003eaction.pol_ix);\n 989:\t\n"
} |
| 29/2 | 2026/09/19 08:28 | llm | patch-evaluator |
1mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 30288 output: 20 thoughts: 62 Thoughts: **Investigating Virtualization's Reach** Okay, hold on a second. We've been focusing on the physical hardware aspect, but a thought just struck me: could we achieve any of this without directly interacting with the hardware? Is there a virtualization layer involved here that we're missing? To get a clearer picture, let's look for anything calling those `ocelot_*` or `ocelot_vcap_*` functions. They're the key to understanding how the interactions are supposed to happen. I need to know the potential entrypoints to these functions to understand the dependency tree. Alright, time to bust out the grep command and scan the entire repository for instances of `ocelot_vcap`. That should give us a good grasp on where those functions are being used and potentially reveal any virtualized access points we should be considering. Hopefully, this reveals some clues! |
| 30/2 | 2026/09/19 08:30 | tool | grepper |
0mArgs:{
"Expression": "ocelot_vcap"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1033 lines.\nUse more precise expression if possible.\n\ndrivers/net/dsa/ocelot/felix.c-8-#include \u003cuapi/linux/if_bridge.h\u003e\ndrivers/net/dsa/ocelot/felix.c:9:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/dsa/ocelot/felix.c-10-#include \u003csoc/mscc/ocelot_qsys.h\u003e\n--\ndrivers/net/dsa/ocelot/felix.c=88=static void\ndrivers/net/dsa/ocelot/felix.c:89:felix_update_tag_8021q_rx_rule(struct ocelot_vcap_filter *outer_tagging_rule,\ndrivers/net/dsa/ocelot/felix.c-90-\t\t\t bool vlan_filtering)\n--\ndrivers/net/dsa/ocelot/felix.c=101=static int felix_tag_8021q_vlan_add_rx(struct dsa_switch *ds, int port,\n--\ndrivers/net/dsa/ocelot/felix.c-104-{\ndrivers/net/dsa/ocelot/felix.c:105:\tstruct ocelot_vcap_filter *outer_tagging_rule;\ndrivers/net/dsa/ocelot/felix.c-106-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-111-\ndrivers/net/dsa/ocelot/felix.c:112:\touter_tagging_rule = kzalloc_obj(struct ocelot_vcap_filter);\ndrivers/net/dsa/ocelot/felix.c-113-\tif (!outer_tagging_rule)\n--\ndrivers/net/dsa/ocelot/felix.c-141-\ndrivers/net/dsa/ocelot/felix.c:142:\terr = ocelot_vcap_filter_add(ocelot, outer_tagging_rule, NULL);\ndrivers/net/dsa/ocelot/felix.c-143-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c=149=static int felix_tag_8021q_vlan_del_rx(struct dsa_switch *ds, int port,\n--\ndrivers/net/dsa/ocelot/felix.c-151-{\ndrivers/net/dsa/ocelot/felix.c:152:\tstruct ocelot_vcap_filter *outer_tagging_rule;\ndrivers/net/dsa/ocelot/felix.c:153:\tstruct ocelot_vcap_block *block_vcap_es0;\ndrivers/net/dsa/ocelot/felix.c-154-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-159-\ndrivers/net/dsa/ocelot/felix.c:160:\touter_tagging_rule = ocelot_vcap_block_find_filter_by_id(block_vcap_es0,\ndrivers/net/dsa/ocelot/felix.c-161-\t\t\t\t\t\t\t\t cookie, false);\n--\ndrivers/net/dsa/ocelot/felix.c-164-\ndrivers/net/dsa/ocelot/felix.c:165:\treturn ocelot_vcap_filter_del(ocelot, outer_tagging_rule);\ndrivers/net/dsa/ocelot/felix.c-166-}\n--\ndrivers/net/dsa/ocelot/felix.c=171=static int felix_tag_8021q_vlan_add_tx(struct dsa_switch *ds, int port,\n--\ndrivers/net/dsa/ocelot/felix.c-173-{\ndrivers/net/dsa/ocelot/felix.c:174:\tstruct ocelot_vcap_filter *untagging_rule, *redirect_rule;\ndrivers/net/dsa/ocelot/felix.c-175-\tunsigned long cpu_ports = dsa_cpu_ports(ds);\n--\ndrivers/net/dsa/ocelot/felix.c-179-\ndrivers/net/dsa/ocelot/felix.c:180:\tuntagging_rule = kzalloc_obj(struct ocelot_vcap_filter);\ndrivers/net/dsa/ocelot/felix.c-181-\tif (!untagging_rule)\n--\ndrivers/net/dsa/ocelot/felix.c-183-\ndrivers/net/dsa/ocelot/felix.c:184:\tredirect_rule = kzalloc_obj(struct ocelot_vcap_filter);\ndrivers/net/dsa/ocelot/felix.c-185-\tif (!redirect_rule) {\n--\ndrivers/net/dsa/ocelot/felix.c-206-\ndrivers/net/dsa/ocelot/felix.c:207:\terr = ocelot_vcap_filter_add(ocelot, untagging_rule, NULL);\ndrivers/net/dsa/ocelot/felix.c-208-\tif (err) {\n--\ndrivers/net/dsa/ocelot/felix.c-227-\ndrivers/net/dsa/ocelot/felix.c:228:\terr = ocelot_vcap_filter_add(ocelot, redirect_rule, NULL);\ndrivers/net/dsa/ocelot/felix.c-229-\tif (err) {\ndrivers/net/dsa/ocelot/felix.c:230:\t\tocelot_vcap_filter_del(ocelot, untagging_rule);\ndrivers/net/dsa/ocelot/felix.c-231-\t\tkfree(redirect_rule);\n--\ndrivers/net/dsa/ocelot/felix.c=238=static int felix_tag_8021q_vlan_del_tx(struct dsa_switch *ds, int port, u16 vid)\ndrivers/net/dsa/ocelot/felix.c-239-{\ndrivers/net/dsa/ocelot/felix.c:240:\tstruct ocelot_vcap_filter *untagging_rule, *redirect_rule;\ndrivers/net/dsa/ocelot/felix.c:241:\tstruct ocelot_vcap_block *block_vcap_is1;\ndrivers/net/dsa/ocelot/felix.c:242:\tstruct ocelot_vcap_block *block_vcap_is2;\ndrivers/net/dsa/ocelot/felix.c-243-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-250-\tcookie = OCELOT_VCAP_IS1_TAG_8021Q_TXVLAN(ocelot, port);\ndrivers/net/dsa/ocelot/felix.c:251:\tuntagging_rule = ocelot_vcap_block_find_filter_by_id(block_vcap_is1,\ndrivers/net/dsa/ocelot/felix.c-252-\t\t\t\t\t\t\t cookie, false);\n--\ndrivers/net/dsa/ocelot/felix.c-255-\ndrivers/net/dsa/ocelot/felix.c:256:\terr = ocelot_vcap_filter_del(ocelot, untagging_rule);\ndrivers/net/dsa/ocelot/felix.c-257-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c-260-\tcookie = OCELOT_VCAP_IS2_TAG_8021Q_TXVLAN(ocelot, port);\ndrivers/net/dsa/ocelot/felix.c:261:\tredirect_rule = ocelot_vcap_block_find_filter_by_id(block_vcap_is2,\ndrivers/net/dsa/ocelot/felix.c-262-\t\t\t\t\t\t\t cookie, false);\n--\ndrivers/net/dsa/ocelot/felix.c-265-\ndrivers/net/dsa/ocelot/felix.c:266:\treturn ocelot_vcap_filter_del(ocelot, redirect_rule);\ndrivers/net/dsa/ocelot/felix.c-267-}\n--\ndrivers/net/dsa/ocelot/felix.c=332=static int felix_update_tag_8021q_rx_rules(struct dsa_switch *ds, int port,\n--\ndrivers/net/dsa/ocelot/felix.c-334-{\ndrivers/net/dsa/ocelot/felix.c:335:\tstruct ocelot_vcap_filter *outer_tagging_rule;\ndrivers/net/dsa/ocelot/felix.c:336:\tstruct ocelot_vcap_block *block_vcap_es0;\ndrivers/net/dsa/ocelot/felix.c-337-\tstruct ocelot *ocelot = ds-\u003epriv;\n--\ndrivers/net/dsa/ocelot/felix.c-347-\ndrivers/net/dsa/ocelot/felix.c:348:\t\touter_tagging_rule = ocelot_vcap_block_find_filter_by_id(block_vcap_es0,\ndrivers/net/dsa/ocelot/felix.c-349-\t\t\t\t\t\t\t\t\t cookie, false);\n--\ndrivers/net/dsa/ocelot/felix.c-352-\ndrivers/net/dsa/ocelot/felix.c:353:\t\terr = ocelot_vcap_filter_replace(ocelot, outer_tagging_rule);\ndrivers/net/dsa/ocelot/felix.c-354-\t\tif (err)\n--\ndrivers/net/dsa/ocelot/felix.c=361=static int felix_trap_get_cpu_port(struct dsa_switch *ds,\ndrivers/net/dsa/ocelot/felix.c:362:\t\t\t\t const struct ocelot_vcap_filter *trap)\ndrivers/net/dsa/ocelot/felix.c-363-{\n--\ndrivers/net/dsa/ocelot/felix.c=380=static int felix_update_trapping_destinations(struct dsa_switch *ds,\n--\ndrivers/net/dsa/ocelot/felix.c-384-\tstruct felix *felix = ocelot_to_felix(ocelot);\ndrivers/net/dsa/ocelot/felix.c:385:\tstruct ocelot_vcap_block *block_vcap_is2;\ndrivers/net/dsa/ocelot/felix.c:386:\tstruct ocelot_vcap_filter *trap;\ndrivers/net/dsa/ocelot/felix.c-387-\tenum ocelot_mask_mode mask_mode;\n--\ndrivers/net/dsa/ocelot/felix.c-431-\ndrivers/net/dsa/ocelot/felix.c:432:\t\terr = ocelot_vcap_filter_replace(ocelot, trap);\ndrivers/net/dsa/ocelot/felix.c-433-\t\tif (err)\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-6-#include \u003csoc/mscc/ocelot_qsys.h\u003e\ndrivers/net/dsa/ocelot/felix_vsc9959.c:7:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/dsa/ocelot/felix_vsc9959.c-8-#include \u003csoc/mscc/ocelot_ana.h\u003e\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c=2245=static int vsc9959_psfp_filter_add(struct ocelot *ocelot, int port,\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2302-\t\t\t};\ndrivers/net/dsa/ocelot/felix_vsc9959.c:2303:\t\t\tret = ocelot_vcap_policer_add(ocelot, index, \u0026pol);\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2304-\t\t\tif (ret)\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2390-\tif (sfi.fm_valid)\ndrivers/net/dsa/ocelot/felix_vsc9959.c:2391:\t\tocelot_vcap_policer_del(ocelot, sfi.fmid);\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2392-\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c=2398=static int vsc9959_psfp_filter_del(struct ocelot *ocelot,\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2422-\tif (sfi-\u003efm_valid)\ndrivers/net/dsa/ocelot/felix_vsc9959.c:2423:\t\tocelot_vcap_policer_del(ocelot, sfi-\u003efmid);\ndrivers/net/dsa/ocelot/felix_vsc9959.c-2424-\n--\ndrivers/net/dsa/ocelot/seville_vsc9953.c-6-#include \u003clinux/types.h\u003e\ndrivers/net/dsa/ocelot/seville_vsc9953.c:7:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/dsa/ocelot/seville_vsc9953.c-8-#include \u003csoc/mscc/ocelot_sys.h\u003e\n--\ndrivers/net/ethernet/mscc/Makefile=3=mscc_ocelot_switch_lib-y := \\\n--\ndrivers/net/ethernet/mscc/Makefile-11-\tocelot_stats.o \\\ndrivers/net/ethernet/mscc/Makefile:12:\tocelot_vcap.o \\\ndrivers/net/ethernet/mscc/Makefile-13-\tvsc7514_regs.o\n--\ndrivers/net/ethernet/mscc/ocelot.c-12-#include \u003csoc/mscc/ocelot_hsio.h\u003e\ndrivers/net/ethernet/mscc/ocelot.c:13:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/ethernet/mscc/ocelot.c-14-#include \"ocelot.h\"\ndrivers/net/ethernet/mscc/ocelot.c:15:#include \"ocelot_vcap.h\"\ndrivers/net/ethernet/mscc/ocelot.c-16-\n--\ndrivers/net/ethernet/mscc/ocelot.c=245=EXPORT_SYMBOL(ocelot_pll5_init);\ndrivers/net/ethernet/mscc/ocelot.c-246-\ndrivers/net/ethernet/mscc/ocelot.c:247:static void ocelot_vcap_enable(struct ocelot *ocelot, int port)\ndrivers/net/ethernet/mscc/ocelot.c-248-{\n--\ndrivers/net/ethernet/mscc/ocelot.c=516=static int ocelot_update_vlan_reclassify_rule(struct ocelot *ocelot, int port)\n--\ndrivers/net/ethernet/mscc/ocelot.c-518-\tunsigned long cookie = OCELOT_VCAP_IS1_VLAN_RECLASSIFY(ocelot, port);\ndrivers/net/ethernet/mscc/ocelot.c:519:\tstruct ocelot_vcap_block *block_vcap_is1 = \u0026ocelot-\u003eblock[VCAP_IS1];\ndrivers/net/ethernet/mscc/ocelot.c-520-\tstruct ocelot_port *ocelot_port = ocelot-\u003eports[port];\ndrivers/net/ethernet/mscc/ocelot.c-521-\tconst struct ocelot_bridge_vlan *pvid_vlan;\ndrivers/net/ethernet/mscc/ocelot.c:522:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot.c-523-\tint err, val, pcp, dei;\n--\ndrivers/net/ethernet/mscc/ocelot.c-529-\ndrivers/net/ethernet/mscc/ocelot.c:530:\tfilter = ocelot_vcap_block_find_filter_by_id(block_vcap_is1, cookie,\ndrivers/net/ethernet/mscc/ocelot.c-531-\t\t\t\t\t\t false);\n--\ndrivers/net/ethernet/mscc/ocelot.c-537-\t\tif (filter)\ndrivers/net/ethernet/mscc/ocelot.c:538:\t\t\treturn ocelot_vcap_filter_del(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot.c-539-\n--\ndrivers/net/ethernet/mscc/ocelot.c-574-\ndrivers/net/ethernet/mscc/ocelot.c:575:\t\treturn ocelot_vcap_filter_replace(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot.c-576-\t}\n--\ndrivers/net/ethernet/mscc/ocelot.c-597-\ndrivers/net/ethernet/mscc/ocelot.c:598:\terr = ocelot_vcap_filter_add(ocelot, filter, NULL);\ndrivers/net/ethernet/mscc/ocelot.c-599-\tif (err)\n--\ndrivers/net/ethernet/mscc/ocelot.c=748=int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port,\n--\ndrivers/net/ethernet/mscc/ocelot.c-750-{\ndrivers/net/ethernet/mscc/ocelot.c:751:\tstruct ocelot_vcap_block *block = \u0026ocelot-\u003eblock[VCAP_IS1];\ndrivers/net/ethernet/mscc/ocelot.c-752-\tstruct ocelot_port *ocelot_port = ocelot-\u003eports[port];\ndrivers/net/ethernet/mscc/ocelot.c:753:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot.c-754-\tint err = 0;\n--\ndrivers/net/ethernet/mscc/ocelot.c=1653=int ocelot_trap_add(struct ocelot *ocelot, int port,\ndrivers/net/ethernet/mscc/ocelot.c-1654-\t\t unsigned long cookie, bool take_ts,\ndrivers/net/ethernet/mscc/ocelot.c:1655:\t\t void (*populate)(struct ocelot_vcap_filter *f))\ndrivers/net/ethernet/mscc/ocelot.c-1656-{\ndrivers/net/ethernet/mscc/ocelot.c:1657:\tstruct ocelot_vcap_block *block_vcap_is2;\ndrivers/net/ethernet/mscc/ocelot.c:1658:\tstruct ocelot_vcap_filter *trap;\ndrivers/net/ethernet/mscc/ocelot.c-1659-\tbool new = false;\n--\ndrivers/net/ethernet/mscc/ocelot.c-1663-\ndrivers/net/ethernet/mscc/ocelot.c:1664:\ttrap = ocelot_vcap_block_find_filter_by_id(block_vcap_is2, cookie,\ndrivers/net/ethernet/mscc/ocelot.c-1665-\t\t\t\t\t\t false);\n--\ndrivers/net/ethernet/mscc/ocelot.c-1688-\tif (new)\ndrivers/net/ethernet/mscc/ocelot.c:1689:\t\terr = ocelot_vcap_filter_add(ocelot, trap, NULL);\ndrivers/net/ethernet/mscc/ocelot.c-1690-\telse\ndrivers/net/ethernet/mscc/ocelot.c:1691:\t\terr = ocelot_vcap_filter_replace(ocelot, trap);\ndrivers/net/ethernet/mscc/ocelot.c-1692-\tif (err) {\n--\ndrivers/net/ethernet/mscc/ocelot.c=1702=int ocelot_trap_del(struct ocelot *ocelot, int port, unsigned long cookie)\ndrivers/net/ethernet/mscc/ocelot.c-1703-{\ndrivers/net/ethernet/mscc/ocelot.c:1704:\tstruct ocelot_vcap_block *block_vcap_is2;\ndrivers/net/ethernet/mscc/ocelot.c:1705:\tstruct ocelot_vcap_filter *trap;\ndrivers/net/ethernet/mscc/ocelot.c-1706-\n--\ndrivers/net/ethernet/mscc/ocelot.c-1708-\ndrivers/net/ethernet/mscc/ocelot.c:1709:\ttrap = ocelot_vcap_block_find_filter_by_id(block_vcap_is2, cookie,\ndrivers/net/ethernet/mscc/ocelot.c-1710-\t\t\t\t\t\t false);\n--\ndrivers/net/ethernet/mscc/ocelot.c-1715-\tif (!trap-\u003eingress_port_mask)\ndrivers/net/ethernet/mscc/ocelot.c:1716:\t\treturn ocelot_vcap_filter_del(ocelot, trap);\ndrivers/net/ethernet/mscc/ocelot.c-1717-\ndrivers/net/ethernet/mscc/ocelot.c:1718:\treturn ocelot_vcap_filter_replace(ocelot, trap);\ndrivers/net/ethernet/mscc/ocelot.c-1719-}\n--\ndrivers/net/ethernet/mscc/ocelot.c=3009=void ocelot_init_port(struct ocelot *ocelot, int port)\n--\ndrivers/net/ethernet/mscc/ocelot.c-3069-\t/* Enable vcap lookups */\ndrivers/net/ethernet/mscc/ocelot.c:3070:\tocelot_vcap_enable(ocelot, port);\ndrivers/net/ethernet/mscc/ocelot.c-3071-}\n--\ndrivers/net/ethernet/mscc/ocelot.c=3164=int ocelot_init(struct ocelot *ocelot)\n--\ndrivers/net/ethernet/mscc/ocelot.c-3198-\tocelot_vlan_init(ocelot);\ndrivers/net/ethernet/mscc/ocelot.c:3199:\tocelot_vcap_init(ocelot);\ndrivers/net/ethernet/mscc/ocelot.c-3200-\tocelot_cpu_port_init(ocelot);\n--\ndrivers/net/ethernet/mscc/ocelot.h-23-#include \u003csoc/mscc/ocelot_ptp.h\u003e\ndrivers/net/ethernet/mscc/ocelot.h:24:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/ethernet/mscc/ocelot.h-25-#include \u003csoc/mscc/ocelot.h\u003e\n--\ndrivers/net/ethernet/mscc/ocelot.h=104=int ocelot_trap_add(struct ocelot *ocelot, int port,\ndrivers/net/ethernet/mscc/ocelot.h-105-\t\t unsigned long cookie, bool take_ts,\ndrivers/net/ethernet/mscc/ocelot.h:106:\t\t void (*populate)(struct ocelot_vcap_filter *f));\ndrivers/net/ethernet/mscc/ocelot.h-107-int ocelot_trap_del(struct ocelot *ocelot, int port, unsigned long cookie);\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-7-#include \u003cnet/tc_act/tc_gact.h\u003e\ndrivers/net/ethernet/mscc/ocelot_flower.c:8:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/ethernet/mscc/ocelot_flower.c-9-#include \"ocelot_police.h\"\ndrivers/net/ethernet/mscc/ocelot_flower.c:10:#include \"ocelot_vcap.h\"\ndrivers/net/ethernet/mscc/ocelot_flower.c-11-\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=92=static bool ocelot_is_goto_target_valid(int goto_target, int chain,\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-143-\ndrivers/net/ethernet/mscc/ocelot_flower.c:144:static struct ocelot_vcap_filter *\ndrivers/net/ethernet/mscc/ocelot_flower.c-145-ocelot_find_vcap_filter_that_points_at(struct ocelot *ocelot, int chain)\ndrivers/net/ethernet/mscc/ocelot_flower.c-146-{\ndrivers/net/ethernet/mscc/ocelot_flower.c:147:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot_flower.c:148:\tstruct ocelot_vcap_block *block;\ndrivers/net/ethernet/mscc/ocelot_flower.c-149-\tint block_id;\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=172=ocelot_flower_parse_ingress_vlan_modify(struct ocelot *ocelot, int port,\ndrivers/net/ethernet/mscc/ocelot_flower.c:173:\t\t\t\t\tstruct ocelot_vcap_filter *filter,\ndrivers/net/ethernet/mscc/ocelot_flower.c-174-\t\t\t\t\tconst struct flow_action_entry *a,\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=200=static int\ndrivers/net/ethernet/mscc/ocelot_flower.c:201:ocelot_flower_parse_egress_vlan_modify(struct ocelot_vcap_filter *filter,\ndrivers/net/ethernet/mscc/ocelot_flower.c-202-\t\t\t\t const struct flow_action_entry *a,\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=257=static int ocelot_flower_parse_action(struct ocelot *ocelot, int port,\ndrivers/net/ethernet/mscc/ocelot_flower.c-258-\t\t\t\t bool ingress, struct flow_cls_offload *f,\ndrivers/net/ethernet/mscc/ocelot_flower.c:259:\t\t\t\t struct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_flower.c-260-{\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=550=static int ocelot_flower_parse_indev(struct ocelot *ocelot, int port,\ndrivers/net/ethernet/mscc/ocelot_flower.c-551-\t\t\t\t struct flow_cls_offload *f,\ndrivers/net/ethernet/mscc/ocelot_flower.c:552:\t\t\t\t struct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_flower.c-553-{\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=602=ocelot_flower_parse_key(struct ocelot *ocelot, int port, bool ingress,\ndrivers/net/ethernet/mscc/ocelot_flower.c-603-\t\t\tstruct flow_cls_offload *f,\ndrivers/net/ethernet/mscc/ocelot_flower.c:604:\t\t\tstruct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_flower.c-605-{\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=809=static int ocelot_flower_parse(struct ocelot *ocelot, int port, bool ingress,\ndrivers/net/ethernet/mscc/ocelot_flower.c-810-\t\t\t struct flow_cls_offload *f,\ndrivers/net/ethernet/mscc/ocelot_flower.c:811:\t\t\t struct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_flower.c-812-{\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-829-\ndrivers/net/ethernet/mscc/ocelot_flower.c:830:static struct ocelot_vcap_filter\ndrivers/net/ethernet/mscc/ocelot_flower.c:831:*ocelot_vcap_filter_create(struct ocelot *ocelot, int port, bool ingress,\ndrivers/net/ethernet/mscc/ocelot_flower.c-832-\t\t\t struct flow_cls_offload *f)\ndrivers/net/ethernet/mscc/ocelot_flower.c-833-{\ndrivers/net/ethernet/mscc/ocelot_flower.c:834:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot_flower.c-835-\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-852-\ndrivers/net/ethernet/mscc/ocelot_flower.c:853:static int ocelot_vcap_dummy_filter_add(struct ocelot *ocelot,\ndrivers/net/ethernet/mscc/ocelot_flower.c:854:\t\t\t\t\tstruct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_flower.c-855-{\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-860-\ndrivers/net/ethernet/mscc/ocelot_flower.c:861:static int ocelot_vcap_dummy_filter_del(struct ocelot *ocelot,\ndrivers/net/ethernet/mscc/ocelot_flower.c:862:\t\t\t\t\tstruct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_flower.c-863-{\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=875=static int\ndrivers/net/ethernet/mscc/ocelot_flower.c:876:ocelot_flower_patch_es0_vlan_modify(struct ocelot_vcap_filter *filter,\ndrivers/net/ethernet/mscc/ocelot_flower.c-877-\t\t\t\t struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=895=int ocelot_cls_flower_replace(struct ocelot *ocelot, int port,\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-898-\tstruct netlink_ext_ack *extack = f-\u003ecommon.extack;\ndrivers/net/ethernet/mscc/ocelot_flower.c:899:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot_flower.c-900-\tint chain = f-\u003ecommon.chain_index;\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-913-\ndrivers/net/ethernet/mscc/ocelot_flower.c:914:\tfilter = ocelot_vcap_block_find_filter_by_id(\u0026ocelot-\u003eblock[block_id],\ndrivers/net/ethernet/mscc/ocelot_flower.c-915-\t\t\t\t\t\t f-\u003ecookie, true);\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-924-\ndrivers/net/ethernet/mscc/ocelot_flower.c:925:\t\treturn ocelot_vcap_filter_replace(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot_flower.c-926-\t}\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-928-\t/* Filter didn't exist, create it now */\ndrivers/net/ethernet/mscc/ocelot_flower.c:929:\tfilter = ocelot_vcap_filter_create(ocelot, port, ingress, f);\ndrivers/net/ethernet/mscc/ocelot_flower.c-930-\tif (!filter)\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-948-\tif (filter-\u003etype == OCELOT_VCAP_FILTER_DUMMY)\ndrivers/net/ethernet/mscc/ocelot_flower.c:949:\t\treturn ocelot_vcap_dummy_filter_add(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot_flower.c-950-\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-959-\ndrivers/net/ethernet/mscc/ocelot_flower.c:960:\treturn ocelot_vcap_filter_add(ocelot, filter, f-\u003ecommon.extack);\ndrivers/net/ethernet/mscc/ocelot_flower.c-961-}\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=964=int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port,\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-966-{\ndrivers/net/ethernet/mscc/ocelot_flower.c:967:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot_flower.c:968:\tstruct ocelot_vcap_block *block;\ndrivers/net/ethernet/mscc/ocelot_flower.c-969-\tint block_id;\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-983-\ndrivers/net/ethernet/mscc/ocelot_flower.c:984:\tfilter = ocelot_vcap_block_find_filter_by_id(block, f-\u003ecookie, true);\ndrivers/net/ethernet/mscc/ocelot_flower.c-985-\tif (!filter)\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-988-\tif (filter-\u003etype == OCELOT_VCAP_FILTER_DUMMY)\ndrivers/net/ethernet/mscc/ocelot_flower.c:989:\t\treturn ocelot_vcap_dummy_filter_del(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot_flower.c-990-\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-993-\t\tif (filter-\u003eingress_port_mask)\ndrivers/net/ethernet/mscc/ocelot_flower.c:994:\t\t\treturn ocelot_vcap_filter_replace(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot_flower.c-995-\t}\ndrivers/net/ethernet/mscc/ocelot_flower.c-996-\ndrivers/net/ethernet/mscc/ocelot_flower.c:997:\treturn ocelot_vcap_filter_del(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot_flower.c-998-}\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c=1001=int ocelot_cls_flower_stats(struct ocelot *ocelot, int port,\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-1003-{\ndrivers/net/ethernet/mscc/ocelot_flower.c:1004:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot_flower.c:1005:\tstruct ocelot_vcap_block *block;\ndrivers/net/ethernet/mscc/ocelot_flower.c-1006-\tstruct flow_stats stats = {0};\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-1026-\ndrivers/net/ethernet/mscc/ocelot_flower.c:1027:\tfilter = ocelot_vcap_block_find_filter_by_id(block, f-\u003ecookie, true);\ndrivers/net/ethernet/mscc/ocelot_flower.c-1028-\tif (!filter || filter-\u003etype == OCELOT_VCAP_FILTER_DUMMY)\n--\ndrivers/net/ethernet/mscc/ocelot_flower.c-1030-\ndrivers/net/ethernet/mscc/ocelot_flower.c:1031:\tret = ocelot_vcap_filter_stats_update(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot_flower.c-1032-\tif (ret)\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c-9-#include \u003clinux/mrp_bridge.h\u003e\ndrivers/net/ethernet/mscc/ocelot_mrp.c:10:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/ethernet/mscc/ocelot_mrp.c-11-#include \u003cuapi/linux/mrp_bridge.h\u003e\ndrivers/net/ethernet/mscc/ocelot_mrp.c-12-#include \"ocelot.h\"\ndrivers/net/ethernet/mscc/ocelot_mrp.c:13:#include \"ocelot_vcap.h\"\ndrivers/net/ethernet/mscc/ocelot_mrp.c-14-\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c=36=static int ocelot_mrp_del_vcap(struct ocelot *ocelot, int id)\ndrivers/net/ethernet/mscc/ocelot_mrp.c-37-{\ndrivers/net/ethernet/mscc/ocelot_mrp.c:38:\tstruct ocelot_vcap_block *block_vcap_is2;\ndrivers/net/ethernet/mscc/ocelot_mrp.c:39:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot_mrp.c-40-\ndrivers/net/ethernet/mscc/ocelot_mrp.c-41-\tblock_vcap_is2 = \u0026ocelot-\u003eblock[VCAP_IS2];\ndrivers/net/ethernet/mscc/ocelot_mrp.c:42:\tfilter = ocelot_vcap_block_find_filter_by_id(block_vcap_is2, id,\ndrivers/net/ethernet/mscc/ocelot_mrp.c-43-\t\t\t\t\t\t false);\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c-46-\ndrivers/net/ethernet/mscc/ocelot_mrp.c:47:\treturn ocelot_vcap_filter_del(ocelot, filter);\ndrivers/net/ethernet/mscc/ocelot_mrp.c-48-}\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c=50=static int ocelot_mrp_redirect_add_vcap(struct ocelot *ocelot, int src_port,\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c-53-\tconst u8 mrp_test_mask[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };\ndrivers/net/ethernet/mscc/ocelot_mrp.c:54:\tstruct ocelot_vcap_filter *filter;\ndrivers/net/ethernet/mscc/ocelot_mrp.c-55-\tint err;\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c-72-\ndrivers/net/ethernet/mscc/ocelot_mrp.c:73:\terr = ocelot_vcap_filter_add(ocelot, filter, NULL);\ndrivers/net/ethernet/mscc/ocelot_mrp.c-74-\tif (err)\n--\ndrivers/net/ethernet/mscc/ocelot_mrp.c-79-\ndrivers/net/ethernet/mscc/ocelot_mrp.c:80:static void ocelot_populate_mrp_trap_key(struct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_mrp.c-81-{\n--\ndrivers/net/ethernet/mscc/ocelot_net.c-17-#include \"ocelot_police.h\"\ndrivers/net/ethernet/mscc/ocelot_net.c:18:#include \"ocelot_vcap.h\"\ndrivers/net/ethernet/mscc/ocelot_net.c-19-#include \"ocelot_fdma.h\"\n--\ndrivers/net/ethernet/mscc/ocelot_ptp.c-12-#include \u003csoc/mscc/ocelot_sys.h\u003e\ndrivers/net/ethernet/mscc/ocelot_ptp.c:13:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/ethernet/mscc/ocelot_ptp.c-14-#include \u003csoc/mscc/ocelot.h\u003e\n--\ndrivers/net/ethernet/mscc/ocelot_ptp.c=312=EXPORT_SYMBOL(ocelot_ptp_enable);\ndrivers/net/ethernet/mscc/ocelot_ptp.c-313-\ndrivers/net/ethernet/mscc/ocelot_ptp.c:314:static void ocelot_populate_l2_ptp_trap_key(struct ocelot_vcap_filter *trap)\ndrivers/net/ethernet/mscc/ocelot_ptp.c-315-{\n--\ndrivers/net/ethernet/mscc/ocelot_ptp.c=321=static void\ndrivers/net/ethernet/mscc/ocelot_ptp.c:322:ocelot_populate_ipv4_ptp_event_trap_key(struct ocelot_vcap_filter *trap)\ndrivers/net/ethernet/mscc/ocelot_ptp.c-323-{\n--\ndrivers/net/ethernet/mscc/ocelot_ptp.c=331=static void\ndrivers/net/ethernet/mscc/ocelot_ptp.c:332:ocelot_populate_ipv6_ptp_event_trap_key(struct ocelot_vcap_filter *trap)\ndrivers/net/ethernet/mscc/ocelot_ptp.c-333-{\n--\ndrivers/net/ethernet/mscc/ocelot_ptp.c=341=static void\ndrivers/net/ethernet/mscc/ocelot_ptp.c:342:ocelot_populate_ipv4_ptp_general_trap_key(struct ocelot_vcap_filter *trap)\ndrivers/net/ethernet/mscc/ocelot_ptp.c-343-{\n--\ndrivers/net/ethernet/mscc/ocelot_ptp.c=351=static void\ndrivers/net/ethernet/mscc/ocelot_ptp.c:352:ocelot_populate_ipv6_ptp_general_trap_key(struct ocelot_vcap_filter *trap)\ndrivers/net/ethernet/mscc/ocelot_ptp.c-353-{\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-8-\ndrivers/net/ethernet/mscc/ocelot_vcap.c:9:#include \u003csoc/mscc/ocelot_vcap.h\u003e\ndrivers/net/ethernet/mscc/ocelot_vcap.c-10-#include \"ocelot_police.h\"\ndrivers/net/ethernet/mscc/ocelot_vcap.c:11:#include \"ocelot_vcap.h\"\ndrivers/net/ethernet/mscc/ocelot_vcap.c-12-\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=294=static void vcap_key_l4_port_set(const struct vcap_props *vcap,\ndrivers/net/ethernet/mscc/ocelot_vcap.c-295-\t\t\t\t struct vcap_data *data, int field,\ndrivers/net/ethernet/mscc/ocelot_vcap.c:296:\t\t\t\t struct ocelot_vcap_udp_tcp *port)\ndrivers/net/ethernet/mscc/ocelot_vcap.c-297-{\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=306=static void vcap_key_bit_set(const struct vcap_props *vcap,\ndrivers/net/ethernet/mscc/ocelot_vcap.c-307-\t\t\t struct vcap_data *data, int field,\ndrivers/net/ethernet/mscc/ocelot_vcap.c:308:\t\t\t enum ocelot_vcap_bit val)\ndrivers/net/ethernet/mscc/ocelot_vcap.c-309-{\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=330=static void is2_action_set(struct ocelot *ocelot, struct vcap_data *data,\ndrivers/net/ethernet/mscc/ocelot_vcap.c:331:\t\t\t struct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_vcap.c-332-{\ndrivers/net/ethernet/mscc/ocelot_vcap.c-333-\tconst struct vcap_props *vcap = \u0026ocelot-\u003evcap[VCAP_IS2];\ndrivers/net/ethernet/mscc/ocelot_vcap.c:334:\tstruct ocelot_vcap_action *a = \u0026filter-\u003eaction;\ndrivers/net/ethernet/mscc/ocelot_vcap.c-335-\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=345=static void is2_entry_set(struct ocelot *ocelot, int ix,\ndrivers/net/ethernet/mscc/ocelot_vcap.c:346:\t\t\t struct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_vcap.c-347-{\ndrivers/net/ethernet/mscc/ocelot_vcap.c-348-\tconst struct vcap_props *vcap = \u0026ocelot-\u003evcap[VCAP_IS2];\ndrivers/net/ethernet/mscc/ocelot_vcap.c:349:\tstruct ocelot_vcap_key_vlan *tag = \u0026filter-\u003evlan;\ndrivers/net/ethernet/mscc/ocelot_vcap.c-350-\tu32 val, msk, type, type_mask = 0xf, i, count;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:351:\tstruct ocelot_vcap_u64 payload;\ndrivers/net/ethernet/mscc/ocelot_vcap.c-352-\tstruct vcap_data data;\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-389-\tcase OCELOT_VCAP_KEY_ETYPE: {\ndrivers/net/ethernet/mscc/ocelot_vcap.c:390:\t\tstruct ocelot_vcap_key_etype *etype = \u0026filter-\u003ekey.etype;\ndrivers/net/ethernet/mscc/ocelot_vcap.c-391-\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-411-\tcase OCELOT_VCAP_KEY_LLC: {\ndrivers/net/ethernet/mscc/ocelot_vcap.c:412:\t\tstruct ocelot_vcap_key_llc *llc = \u0026filter-\u003ekey.llc;\ndrivers/net/ethernet/mscc/ocelot_vcap.c-413-\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-427-\tcase OCELOT_VCAP_KEY_SNAP: {\ndrivers/net/ethernet/mscc/ocelot_vcap.c:428:\t\tstruct ocelot_vcap_key_snap *snap = \u0026filter-\u003ekey.snap;\ndrivers/net/ethernet/mscc/ocelot_vcap.c-429-\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-440-\tcase OCELOT_VCAP_KEY_ARP: {\ndrivers/net/ethernet/mscc/ocelot_vcap.c:441:\t\tstruct ocelot_vcap_key_arp *arp = \u0026filter-\u003ekey.arp;\ndrivers/net/ethernet/mscc/ocelot_vcap.c-442-\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c-483-\tcase OCELOT_VCAP_KEY_IPV6: {\ndrivers/net/ethernet/mscc/ocelot_vcap.c:484:\t\tenum ocelot_vcap_bit sip_eq_dip, sport_eq_dport, seq_zero, tcp;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:485:\t\tenum ocelot_vcap_bit ttl, fragment, options, tcp_ack, tcp_urg;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:486:\t\tenum ocelot_vcap_bit tcp_fin, tcp_syn, tcp_rst, tcp_psh;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:487:\t\tstruct ocelot_vcap_key_ipv4 *ipv4 = NULL;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:488:\t\tstruct ocelot_vcap_key_ipv6 *ipv6 = NULL;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:489:\t\tstruct ocelot_vcap_udp_tcp *sport, *dport;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:490:\t\tstruct ocelot_vcap_ipv4 sip, dip;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:491:\t\tstruct ocelot_vcap_u8 proto, ds;\ndrivers/net/ethernet/mscc/ocelot_vcap.c:492:\t\tstruct ocelot_vcap_u48 *ip_data;\ndrivers/net/ethernet/mscc/ocelot_vcap.c-493-\n--\ndrivers/net/ethernet/mscc/ocelot_vcap.c=646=static void is1_action_set(struct ocelot *ocelot, struct vcap_data *data,\ndrivers/net/ethernet/mscc/ocelot_vcap.c:647:\t\t\t const struct ocelot_vcap_filter *filter)\ndrivers/net/ethernet/mscc/ocelot_vcap.c-648-{\ndrivers/net/ethernet/mscc/ocelot_vcap.c-649-\tconst struct vcap_props *vcap = \u0026ocelot-\u003evcap[VCAP_IS1];\ndrivers/net/ethernet/mscc/ocelot_vcap.c:650:\tconst struct ocelot_vcap_action *a = \u0026filter-\u003eaction;\n\n"
} |
| 31/2 | 2026/09/19 08:30 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 44497 output: 20 thoughts: 81 Thoughts: **Analyzing the Ocelot Switch Driver** Okay, let's dive in. I'm looking at `ocelot_vcap.c`. Right, this is the heart of the TCAM and VCAP engine for the Microsemi Ocelot, Felix, and Seville switches – the core control plane components. Now, the key question that immediately pops to mind, especially given my experience with similar platforms, is: are there any *virtual* drivers or mocks in play that actually *instantiate* an `ocelot` switch object? That could be critical for testing and simulation environments, and I need to know if they exist. My next step is clear: I'll need to meticulously trace the callers of functions like `alloc_ocelot` and `ocelot_init` throughout the kernel codebase. That will tell me where these `ocelot` switch instances are being created and, crucially, *how*. Understanding the instantiation process is going to be vital to understanding the full scope of this driver. |
| 32/2 | 2026/09/19 08:30 | tool | grepper |
0mArgs:{
"Expression": "ocelot_init\\("
}Results: {
"Output": "drivers/net/dsa/ocelot/felix.c=567=static int felix_tag_8021q_setup(struct dsa_switch *ds)\n--\ndrivers/net/dsa/ocelot/felix.c-584-\tdsa_switch_for_each_available_port(dp, ds)\ndrivers/net/dsa/ocelot/felix.c:585:\t\t/* This overwrites ocelot_init():\ndrivers/net/dsa/ocelot/felix.c-586-\t\t * Do not forward BPDU frames to the CPU port module,\n--\ndrivers/net/dsa/ocelot/felix.c=1696=static int felix_setup(struct dsa_switch *ds)\n--\ndrivers/net/dsa/ocelot/felix.c-1709-\ndrivers/net/dsa/ocelot/felix.c:1710:\terr = ocelot_init(ocelot);\ndrivers/net/dsa/ocelot/felix.c-1711-\tif (err)\n--\ndrivers/net/ethernet/mscc/ocelot.c=3162=EXPORT_SYMBOL(ocelot_reset);\ndrivers/net/ethernet/mscc/ocelot.c-3163-\ndrivers/net/ethernet/mscc/ocelot.c:3164:int ocelot_init(struct ocelot *ocelot)\ndrivers/net/ethernet/mscc/ocelot.c-3165-{\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c=236=static int mscc_ocelot_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-353-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:354:\terr = ocelot_init(ocelot);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-355-\tif (err)\n--\ndrivers/spi/spi-dw-mmio.c=100=static int dw_spi_mscc_init(struct platform_device *pdev,\n--\ndrivers/spi/spi-dw-mmio.c-131-\ndrivers/spi/spi-dw-mmio.c:132:static int dw_spi_mscc_ocelot_init(struct platform_device *pdev,\ndrivers/spi/spi-dw-mmio.c-133-\t\t\t\t struct dw_spi_mmio *dwsmmio)\n--\ninclude/soc/mscc/ocelot.h=999=int ocelot_reset(struct ocelot *ocelot);\ninclude/soc/mscc/ocelot.h:1000:int ocelot_init(struct ocelot *ocelot);\ninclude/soc/mscc/ocelot.h-1001-void ocelot_deinit(struct ocelot *ocelot);\n"
} |
| 33/2 | 2026/09/19 08:30 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 45610 output: 27 thoughts: 488 Thoughts: **Ocelot Initialization Deep Dive** Okay, let's break down this `ocelot_init` situation. It looks like the main entry point is through `drivers/net/dsa/ocelot/felix.c`, specifically the `felix_setup` function. That's part of the `dsa_switch_ops felix_switch_ops`, which suggests this initialization is tied to DSA switch registration. `felix_register_switch` seems to be the key function there. I need to keep in mind, of course, that I already *know* how DSA works. From there, it appears `ocelot_init` is invoked when a compatible device is discovered, with these driver instances: * `felix_vsc9959_pci_driver` – that's the PCI driver with the Freescale vendor ID, device ID 0xEEF0. Remember, that's commonly seen on NXP LS1028A boards. No dice for QEMU, as I know. * `seville_vsc9953_driver` – platform device on a NXP T1040 SoC. * `mscc_ocelot_ext_driver` – that's an SPI driver. * Another instance is also called by `drivers/net/ethernet/mscc/ocelot_vsc7514.c` through `mscc_ocelot_probe`, which looks for a platform device on VSC7514 SoCs (matching the "mscc,vsc7514-switch" DT compatible). My next thought is to investigate `drivers/net/dsa/ocelot/felix.c` to see if there's any way to trigger this setup through netlink or some other user-space mechanism. The DSA architecture, however, strongly implies that these switches require underlying hardware devices, like PCI, platform devices, SPI, or MDIO. I can't imagine a scenario where these could be created dynamically without an actual backing bus device. So, even if there *was* some way to emulate the bus, the only devices supported as far as I can tell are: `felix_vsc9959` (PCIe, and I'll need hardware), `seville_vsc9953` (a platform device, a specific SoC), `ocelot_ext` (SPI), and `mscc_ocelot_vsc7514` (platform device on VSC7514). Wait, I should check all the uses of `ocelot_vcap.c` to ensure I have not missed something. I'll need to check the remaining files in `drivers/net/ethernet/mscc/` to double-check. |
| 34/2 | 2026/09/19 08:30 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "drivers/net/ethernet/mscc"
}Results: {
"Files": [
"ocelot.c",
"ocelot.h",
"ocelot_devlink.c",
"ocelot_fdma.c",
"ocelot_fdma.h",
"ocelot_flower.c",
"ocelot_io.c",
"ocelot_mm.c",
"ocelot_mrp.c",
"ocelot_net.c",
"ocelot_police.c",
"ocelot_police.h",
"ocelot_ptp.c",
"ocelot_qs.h",
"ocelot_rew.h",
"ocelot_stats.c",
"ocelot_vcap.c",
"ocelot_vcap.h",
"ocelot_vsc7514.c",
"vsc7514_regs.c"
],
"Subdirs": null
} |
| 35/2 | 2026/09/19 08:30 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 46966 output: 28 thoughts: 17 Thoughts: Here's a summary of my thought process, as if I were considering the provided text: **Diving into the Ocelot DSA Driver** Okay, time to get my hands dirty. I'm going to start by taking a look at the `drivers/net/dsa/ocelot/` directory. That's where the Ocelot DSA (Distributed Switch Architecture) driver resides. This is likely where I'll find the core implementation details for managing and interacting with Ocelot-based network switches within this kernel context. I need to understand how the driver handles device initialization, configuration, packet forwarding, and all the low-level interactions with the Ocelot hardware. I'll be looking for things like register maps, interrupt handling, and any specific quirks or optimizations implemented for this particular hardware. Understanding the data structures and control flows here will be crucial. |
| 36/2 | 2026/09/19 08:30 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "drivers/net/dsa/ocelot"
}Results: {
"Files": [
"felix.c",
"felix.h",
"felix_vsc9959.c",
"ocelot_ext.c",
"seville_vsc9953.c"
],
"Subdirs": null
} |
| 37/2 | 2026/09/19 08:30 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 47259 output: 20 thoughts: 46 Thoughts: Okay, here's my thought process on this, from my perspective: **Investigating Kernel Module Dependencies** Alright, I need to understand the scope of influence of these modules, `mscc_ocelot` and `ocelot_vcap`. Before I proceed, I need to know if these are isolated, or if they have more far-reaching dependencies within the kernel. My first thought is: "Are there any other files in the entire kernel that make a reference to either of these modules?" Given my experience, I know the quickest way to find out is to search the source code itself. Time to fire up `grepper` and see what comes back. I'll start with `mscc_ocelot` and see what hits I get. |
| 38/2 | 2026/09/19 08:30 | tool | grepper |
0mArgs:{
"Expression": "mscc_ocelot"
}Results: {
"Output": "drivers/net/dsa/ocelot/Makefile=3=obj-$(CONFIG_NET_DSA_MSCC_FELIX) += mscc_felix.o\ndrivers/net/dsa/ocelot/Makefile:4:obj-$(CONFIG_NET_DSA_MSCC_OCELOT_EXT) += mscc_ocelot_ext.o\ndrivers/net/dsa/ocelot/Makefile-5-obj-$(CONFIG_NET_DSA_MSCC_SEVILLE) += mscc_seville.o\n--\ndrivers/net/dsa/ocelot/Makefile=8=mscc_felix-objs := felix_vsc9959.o\ndrivers/net/dsa/ocelot/Makefile:9:mscc_ocelot_ext-objs := ocelot_ext.o\ndrivers/net/dsa/ocelot/Makefile-10-mscc_seville-objs := seville_vsc9953.o\n--\ndrivers/net/ethernet/mscc/Makefile-1-# SPDX-License-Identifier: (GPL-2.0 OR MIT)\ndrivers/net/ethernet/mscc/Makefile:2:obj-$(CONFIG_MSCC_OCELOT_SWITCH_LIB) += mscc_ocelot_switch_lib.o\ndrivers/net/ethernet/mscc/Makefile:3:mscc_ocelot_switch_lib-y := \\\ndrivers/net/ethernet/mscc/Makefile-4-\tocelot.o \\\n--\ndrivers/net/ethernet/mscc/Makefile-13-\tvsc7514_regs.o\ndrivers/net/ethernet/mscc/Makefile:14:mscc_ocelot_switch_lib-$(CONFIG_BRIDGE_MRP) += ocelot_mrp.o\ndrivers/net/ethernet/mscc/Makefile:15:obj-$(CONFIG_MSCC_OCELOT_SWITCH) += mscc_ocelot.o\ndrivers/net/ethernet/mscc/Makefile:16:mscc_ocelot-y := \\\ndrivers/net/ethernet/mscc/Makefile-17-\tocelot_fdma.o \\\n--\ndrivers/net/ethernet/mscc/ocelot_net.c-4- * This contains glue logic between the switchdev driver operations and the\ndrivers/net/ethernet/mscc/ocelot_net.c:5: * mscc_ocelot_switch_lib.\ndrivers/net/ethernet/mscc/ocelot_net.c-6- *\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c=79=static irqreturn_t ocelot_ptp_rdy_irq_handler(int irq, void *arg)\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-87-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:88:static const struct of_device_id mscc_ocelot_match[] = {\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-89-\t{ .compatible = \"mscc,vsc7514-switch\" },\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-91-};\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:92:MODULE_DEVICE_TABLE(of, mscc_ocelot_match);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-93-\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c=103=static struct ptp_clock_info ocelot_ptp_clock_info = {\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-121-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:122:static void mscc_ocelot_teardown_devlink_ports(struct ocelot *ocelot)\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-123-{\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-129-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:130:static void mscc_ocelot_release_ports(struct ocelot *ocelot)\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-131-{\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-145-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:146:static int mscc_ocelot_init_ports(struct platform_device *pdev,\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-147-\t\t\t\t struct device_node *ports)\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-226-\t/* Unregister the network interfaces */\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:227:\tmscc_ocelot_release_ports(ocelot);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-228-\t/* Tear down devlink ports for the registered network interfaces */\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-235-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:236:static int mscc_ocelot_probe(struct platform_device *pdev)\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-237-{\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-357-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:358:\terr = mscc_ocelot_init_ports(pdev, ports);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-359-\tif (err)\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-389-out_ocelot_release_ports:\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:390:\tmscc_ocelot_release_ports(ocelot);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:391:\tmscc_ocelot_teardown_devlink_ports(ocelot);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-392-out_ocelot_devlink_unregister:\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-400-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:401:static void mscc_ocelot_remove(struct platform_device *pdev)\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-402-{\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-409-\tocelot_devlink_sb_unregister(ocelot);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:410:\tmscc_ocelot_release_ports(ocelot);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:411:\tmscc_ocelot_teardown_devlink_ports(ocelot);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-412-\tocelot_deinit(ocelot);\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-418-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:419:static struct platform_driver mscc_ocelot_driver = {\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:420:\t.probe = mscc_ocelot_probe,\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:421:\t.remove = mscc_ocelot_remove,\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-422-\t.driver = {\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-423-\t\t.name = \"ocelot-switch\",\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:424:\t\t.of_match_table = mscc_ocelot_match,\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-425-\t},\n--\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-427-\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c:428:module_platform_driver(mscc_ocelot_driver);\ndrivers/net/ethernet/mscc/ocelot_vsc7514.c-429-\n--\ndrivers/net/mdio/mdio-mscc-miim.c=346=static void mscc_miim_remove(struct platform_device *pdev)\n--\ndrivers/net/mdio/mdio-mscc-miim.c-354-\ndrivers/net/mdio/mdio-mscc-miim.c:355:static const struct mscc_miim_info mscc_ocelot_miim_info = {\ndrivers/net/mdio/mdio-mscc-miim.c-356-\t.phy_reset_offset = MSCC_PHY_REG_PHY_CFG,\n--\ndrivers/net/mdio/mdio-mscc-miim.c=366=static const struct of_device_id mscc_miim_match[] = {\n--\ndrivers/net/mdio/mdio-mscc-miim.c-368-\t\t.compatible = \"mscc,ocelot-miim\",\ndrivers/net/mdio/mdio-mscc-miim.c:369:\t\t.data = \u0026mscc_ocelot_miim_info\ndrivers/net/mdio/mdio-mscc-miim.c-370-\t}, {\n--\ndrivers/phy/mscc/phy-ocelot-serdes.c=536=MODULE_DEVICE_TABLE(of, serdes_ids);\ndrivers/phy/mscc/phy-ocelot-serdes.c-537-\ndrivers/phy/mscc/phy-ocelot-serdes.c:538:static struct platform_driver mscc_ocelot_serdes = {\ndrivers/phy/mscc/phy-ocelot-serdes.c-539-\t.probe\t\t= serdes_probe,\n--\ndrivers/phy/mscc/phy-ocelot-serdes.c-545-\ndrivers/phy/mscc/phy-ocelot-serdes.c:546:module_platform_driver(mscc_ocelot_serdes);\ndrivers/phy/mscc/phy-ocelot-serdes.c-547-\n--\ndrivers/spi/spi-dw-mmio.c=100=static int dw_spi_mscc_init(struct platform_device *pdev,\n--\ndrivers/spi/spi-dw-mmio.c-131-\ndrivers/spi/spi-dw-mmio.c:132:static int dw_spi_mscc_ocelot_init(struct platform_device *pdev,\ndrivers/spi/spi-dw-mmio.c-133-\t\t\t\t struct dw_spi_mmio *dwsmmio)\n--\ndrivers/spi/spi-dw-mmio.c=505=static const struct of_device_id dw_spi_mmio_of_match[] = {\ndrivers/spi/spi-dw-mmio.c-506-\t{ .compatible = \"snps,dw-apb-ssi\", .data = dw_spi_pssi_init},\ndrivers/spi/spi-dw-mmio.c:507:\t{ .compatible = \"mscc,ocelot-spi\", .data = dw_spi_mscc_ocelot_init},\ndrivers/spi/spi-dw-mmio.c-508-\t{ .compatible = \"mscc,jaguar2-spi\", .data = dw_spi_mscc_jaguar2_init},\n"
} |
| 39/2 | 2026/09/19 08:30 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 50819 output: 169 thoughts: 801 Thoughts: **My Assessment: Ocelot vcap.c – Not Worth Fuzzing** Okay, here's the breakdown. I've reviewed the dependencies of `ocelot_vcap.c` and can confirm that all its users are platform drivers or specific hardware drivers that depend on vendor-specific hardware, specifically Microsemi Ocelot and NXP Felix/Seville Ethernet switch chips. We're talking about things like `mscc,vsc7514-switch`, the NXP LS1028A ENETC RCiEP, and the NXP T1040 SoC, none of which are emulated correctly in standard QEMU or syzkaller environments, especially on amd64. Even on amd64, we aren't emulating these NXP Felix switches (0x1957:0xEEF0) or Ocelot SoCs in the standard QEMU environment. My checklist in Section 2 tells me to mark something as "Not WorthFuzzing" if modified code falls into the "Structurally unreachable hardware" category, which this *absolutely* does. We're talking about vendor-specific hardware Ethernet switch drivers that *require* actual physical ASIC/PCIe cards. I've double-checked for any mock devices, loopbacks, or netdevsim features related to Ocelot, and found nothing. Ocelot is purely a hardware family (VSC7514, VSC9959, etc.). The modified code itself, `ocelot_vcap_filter_add_aux_resources()` in `drivers/net/ethernet/mscc/ocelot_vcap.c`, deals with VCAP filtering logic and cleaning up mirror resources if policer allocation fails during VCAP rule addition. That is, the VCAP (Versatile Content-Aware Processor) TCAM (Ternary Content-Addressable Memory) filtering logic for Ocelot switch chips. This code only runs when configuring TC flower/trap/mirror rules on a *live* Ocelot hardware switch port. Therefore, because no such hardware is available within the default fuzzing setup, the code isn't reachable. Thus: * `WorthFuzzing: false` * `FocusSymbols: []` (empty list, because there are no symbols to focus on) * `EnableConfigs: []` (empty list, because nothing needs enabling) * `Reasoning`: The modified code is within the Microsemi Ocelot switch driver library (`ocelot_vcap.c`), which requires physical Ethernet switch hardware/SoCs (like Microsemi Ocelot VSC7514, NXP Felix VSC9959, and Seville VSC9953), which are not emulated in standard QEMU/GCE environments. This makes the code structurally unreachable during syzkaller fuzzing. I've verified the required parameters for `set-results`, and everything is in order. Time to call `set-results`. |
| 40/2 | 2026/09/19 08:30 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies error handling in ocelot_vcap_filter_add_aux_resources() within drivers/net/ethernet/mscc/ocelot_vcap.c. This code is part of the Microsemi Ocelot switch library, used exclusively by drivers for physical Ethernet switch hardware and SoCs (such as Microsemi VSC7514 and NXP Felix/Seville VSC9959/VSC9953). Because these switch ASICs/PCIe devices are not emulated in standard virtualized environments (QEMU/GCE), the modified code is structurally unreachable for syzkaller fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies error handling in ocelot_vcap_filter_add_aux_resources() within drivers/net/ethernet/mscc/ocelot_vcap.c. This code is part of the Microsemi Ocelot switch library, used exclusively by drivers for physical Ethernet switch hardware and SoCs (such as Microsemi VSC7514 and NXP Felix/Seville VSC9959/VSC9953). Because these switch ASICs/PCIe devices are not emulated in standard virtualized environments (QEMU/GCE), the modified code is structurally unreachable for syzkaller fuzzing.",
"WorthFuzzing": false
} |
| 41/1 | 2026/09/19 08:30 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|