Skip to content

[multi-asic] add drop monitor patches to support multi-asic#576

Open
Yakiv-Huryk wants to merge 1 commit into
sonic-net:masterfrom
Yakiv-Huryk:dropmon-patches
Open

[multi-asic] add drop monitor patches to support multi-asic#576
Yakiv-Huryk wants to merge 1 commit into
sonic-net:masterfrom
Yakiv-Huryk:dropmon-patches

Conversation

@Yakiv-Huryk
Copy link
Copy Markdown
Contributor

@Yakiv-Huryk Yakiv-Huryk commented May 13, 2026

What I did
Added three downstream patches that extend Linux drop_monitor (net/core/drop_monitor.c):

  • 0003-drop_monitor-Allow-running-multiple-instances-of-dropwatch.patch — reference-count software and hardware drop tracing so more than one dropwatch client can enable tracing without tripping “already enabled” errors; monitoring state is derived from those refcounts.
  • 0004-drop_monitor-Send-hardware-drop-notifications-to-the.patch — multicast hardware drop notifications to the correct network namespace.
  • 0005-drop_monitor-Do-not-block-a-configuration-change-if-it-is-a.patch — consolidate config handling so a no-op config (unchanged alert mode, trunc length, queue length) succeeds even while monitoring is active; real changes still return -EBUSY while monitoring.

Why I did it
On multi-ASIC SONIC, multiple drop monitor subscribers need to configure/subscribe without fighting the global “trace already on” / “HW monitoring already enabled” state.
Hardware drops are tied to a device’s netns; sending HW notifications only in the initial netns is wrong for per-ASIC namespaces.
Allowing idempotent config while monitoring avoids unnecessary -EBUSY when different applications resend the same parameters.

How I verified it
Manual functional tests in multi-ASIC SONiC (multiple drop monitor subscribers in per-ASIC namespaces)

Details if related

Patch upstreaming plan
These patches will not be upstreamed.

@Yakiv-Huryk Yakiv-Huryk requested a review from a team as a code owner May 13, 2026 13:46
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Patch list:
 * 0003-drop_monitor-Allow-running-multiple-instances-of-dropwatch.patch
 * 0004-drop_monitor-Send-hardware-drop-notifications-to-the.patch
 * 0005-drop_monitor-Do-not-block-a-configuration-change-if-it-is-a.patch

Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@oleksandrivantsiv oleksandrivantsiv marked this pull request as draft May 13, 2026 20:43
@Yakiv-Huryk Yakiv-Huryk marked this pull request as ready for review May 15, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants