Skip to content

[doc] High frequency telemetry support of MIXED tam tel type mode HLD#2379

Open
DavidZagury wants to merge 7 commits into
sonic-net:masterfrom
DavidZagury:master_hft_mixed_mode
Open

[doc] High frequency telemetry support of MIXED tam tel type mode HLD#2379
DavidZagury wants to merge 7 commits into
sonic-net:masterfrom
DavidZagury:master_hft_mixed_mode

Conversation

@DavidZagury

@DavidZagury DavidZagury commented Jun 10, 2026

Copy link
Copy Markdown

Summary

Extends the existing High frequency telemetry HLD (https://github.com/sonic-net/SONiC/blob/master/doc/high-frequency-telemetry/high-frequency-telemetry-hld.md) to add support for SAI_TAM_TEL_TYPE_MODE_MIXED_TYPE. Some vendor SAI implementations advertise only MIXED_TYPE, on which SONiC HFT cannot be enabled today because the orchagent hardcodes SAI_TAM_TEL_TYPE_MODE_SINGLE_TYPE.

The change is additive and orchagent-internal:

  • HFTelOrch auto-detects which mode(s) the SAI advertises via sai_query_attribute_enum_values_capability(SAI_TAM_TEL_TYPE_ATTR_MODE) at init and stores the chosen mode for the lifetime of the orchagent.
  • Selection rule: MIXED_TYPE when advertised (the default via HFTelOrch::DEFAULT_TEL_TYPE_MODE); SINGLE_TYPE otherwise; HFT disabled with a clear log when neither is advertised.

No changes to CONFIG_DB, YANG, CLI, STATE_DB schema, IPFIX wire format, or the OpenTelemetry exporter. The mode is selected once at orchagent init and fixed for its lifetime — no runtime mode switching in this phase.

Related implementation PR

Repo PR title state
sonic-swss [HFT][countersyncd]: Support SAI_TAM_TEL_TYPE_MODE_MIXED_TYPE GitHub issue/pull request detail
sonic-sairedis [vslib][HFT] Advertise SAI_TAM_TEL_TYPE_ATTR_MODE capability GitHub issue/pull request detail
sonic-utilities [hft] Target per-key path in JSON Patch ops to avoid wiping the table GitHub issue/pull request detail

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

Signed-off-by: david.zagury <davidza@nvidia.com>
What I did
Add a new §7.6.1 "CounterSyncd label resolution in MIXED" that
describes the aggregating per-record lookup CounterSyncd performs
across the per-group sessions that share a template_id in MIXED.
Tighten the surrounding "no CounterSyncd changes" claims in §2, §5,
§6, and §7.6 so they distinguish the unchanged public interface
(STATE_DB schema, IPFIX wire format, OpenTelemetry export) from the
contained internal extension. Add a sentence to the §12
m_next_label limitation bullet making explicit that the monotonic
per-profile allocation is the design contract that the §7.6.1
aggregation relies on. Update the table of contents to include
§7.6.1.

Why I did it
The original HLD claimed "no CounterSyncd changes" in three places
on the assumption that per-profile-unique labels alone would let
the existing single-session lookup resolve every field. In practice
CounterSyncd routes data records to sessions by template_id, and in
MIXED multiple per-group sessions share a template_id, so the
single-session lookup picks one session by last-writer-wins and
labels owned by sibling sessions fall back to unknown_<N>. The
implementation adds session_template_ids and an aggregating lookup
that unions every contributing session's object_id_name_map; the
HLD now documents this and is consistent with the shipped behavior.
The Enterprise=0 padding-field defensive filter in CounterSyncd
remains out of scope here - it is vendor-quirk handling and not
part of the MIXED design.

Signed-off-by: david.zagury <davidza@nvidia.com>
@DavidZagury
DavidZagury force-pushed the master_hft_mixed_mode branch from a673312 to 00a7d61 Compare June 10, 2026 15:40
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

Comment thread doc/high-frequency-telemetry/high-frequency-telemetry-mixed-mode-hld.md Outdated
Comment thread doc/high-frequency-telemetry/high-frequency-telemetry-mixed-mode-hld.md Outdated
| `MIXED_TYPE` only | MIXED_TYPE | yes |
| neither | - | no (logged) |

SINGLE_TYPE is preferred when both are advertised so that the behavior of all existing platforms is unchanged. This is consistent with the SAI specification, which declares `SAI_TAM_TEL_TYPE_MODE_SINGLE_TYPE` as the default value of `SAI_TAM_TEL_TYPE_ATTR_MODE`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMHO, MIXED_TYPE can be the default behavior in the Orchagent, since mixed_type mode is more efficient and uses fewer states and SAI objects.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have no objection to using MIXED_TYPE as default. I was just not sure there will be no issues with other vendors with changing that behavior. If you think there shouldn't be an issue with changing the behavior I will agree.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's not an issue. I can discuss it with other vendors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please update the default mode to mixed_type in this document?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would also vote for mixed_type, because it is much better. If mixed_type is not supported, we can always fallback to single type anyway.

Comment thread doc/high-frequency-telemetry/high-frequency-telemetry-mixed-mode-hld.md Outdated
Comment thread doc/high-frequency-telemetry/high-frequency-telemetry-mixed-mode-hld.md Outdated
Comment thread doc/high-frequency-telemetry/high-frequency-telemetry-mixed-mode-hld.md Outdated
Signed-off-by: david.zagury <davidza@nvidia.com>
Signed-off-by: david.zagury <davidza@nvidia.com>
Signed-off-by: david.zagury <davidza@nvidia.com>
Signed-off-by: david.zagury <davidza@nvidia.com>
@Pterosaur

Copy link
Copy Markdown
Contributor

Hi @DavidZagury , It looks like the local commit hasn’t been pushed yet.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@DavidZagury

Copy link
Copy Markdown
Author

Hi @DavidZagury , It looks like the local commit hasn’t been pushed yet.

@Pterosaur pushed

Comment thread doc/high-frequency-telemetry/high-frequency-telemetry-mixed-mode-hld.md Outdated
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

…de-hld.md

Co-authored-by: Ze Gan <ganze718@gmail.com>

Signed-off-by: david.zagury <davidza@nvidia.com>
@DavidZagury
DavidZagury force-pushed the master_hft_mixed_mode branch from 6d7edd7 to 2aa7816 Compare June 30, 2026 12:47
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

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.

4 participants