Skip to content

Commit

Permalink
Add drop reason aggregation enums to MoD config
Browse files Browse the repository at this point in the history
Summary: Add drop reason aggregation enums to MoD config so that they can be easily fine-tuned in prod

Reviewed By: nivinl

Differential Revision: D66850344

fbshipit-source-id: 4b98944b2a1b46ff94f1f9d5f65b42160f942141
  • Loading branch information
maxwindiff authored and facebook-github-bot committed Dec 9, 2024
1 parent a29ea53 commit 6bbd92e
Show file tree
Hide file tree
Showing 3 changed files with 2,959 additions and 2,886 deletions.
17 changes: 17 additions & 0 deletions fboss/agent/switch_config.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,21 @@ struct Mirror {
5: optional i32 samplingRate;
}

/*
* Aggregation of mirror-on-drop reasons. The exact drop reasons corresponding to each
* enum is platform-specific and is converted in the platform-specific SaiTamManagers.
*/
enum MirrorOnDropReasonAggregation {
UNEXPECTED_REASON_DISCARDS = 0,

INGRESS_MISC_DISCARDS = 1,
INGRESS_PACKET_PROCESSING_DISCARDS = 2,
INGRESS_QUEUE_RESOLUTION_DISCARDS = 3,
INGRESS_SOURCE_CONGESTION_DISCARDS = 4, // e.g. VSQ
INGRESS_DESTINATION_CONGESTION_DISCARDS = 5, // e.g. VOQ
INGRESS_GLOBAL_CONGESTION_DISCARDS = 6,
}

struct MirrorOnDropReport {
1: string name;
/*
Expand All @@ -389,6 +404,8 @@ struct MirrorOnDropReport {
8: byte dscp = 0;
// At most one mirrored packet will be sent per port/PG/VOQ within an interval. Granularity is not configurable as of now.
9: optional i32 agingIntervalUsecs;
// Mapping from drop ID / event ID to groups of reasons.
10: map<byte, list<MirrorOnDropReasonAggregation>> eventIdToDropReasons;
}

/**
Expand Down
4 changes: 4 additions & 0 deletions fboss/agent/switch_state.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ struct MirrorOnDropReportFields {
10: optional i32 agingIntervalUsecs;
11: string switchMac; // Populated at runtime
12: string firstInterfaceMac; // Populated at runtime
13: map<
byte,
list<switch_config.MirrorOnDropReasonAggregation>
> eventIdToDropReasons;
}

struct ControlPlaneFields {
Expand Down
Loading

0 comments on commit 6bbd92e

Please sign in to comment.