-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SFLOW] Fixed SFLOW DROPMON patch to align with 2.0.45 version (#15948)
- Why I did it Fixed build failure when flag ENABLE_SFLOW_DROPMON=y set - How I did it Fixed sflow dropmon patch to align with hsflowd version 2.0.45 Signed-off-by: rajkumar38 <[email protected]>
- Loading branch information
1 parent
5774ce2
commit 2db19c2
Showing
1 changed file
with
6 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,47 +3,27 @@ From: Vadym Hlushko <[email protected]> | |
Date: Tue, 25 Jan 2022 12:59:40 +0000 | ||
Subject: [PATCH] [sflow] enabled drop monitor support for SONiC | ||
|
||
Signed-off-by: Vadym Hlushko <[email protected]> | ||
--- | ||
src/Linux/Makefile | 2 +- | ||
src/Linux/hsflowd.c | 8 ++++++++ | ||
src/Linux/scripts/hsflowd.conf.sonic | 2 ++ | ||
3 files changed, 11 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/Linux/Makefile b/src/Linux/Makefile | ||
index 8128cf2..cf538e7 100644 | ||
--- a/src/Linux/Makefile | ||
+++ b/src/Linux/Makefile | ||
@@ -34,7 +34,7 @@ FEATURES_DENT= DENT PSAMPLE SYSTEMD DROPMON | ||
FEATURES_EOS= EAPI | ||
FEATURES_OS10= OS10 DBUS SYSTEMD | ||
FEATURES_OPX= OPX DBUS SYSTEMD | ||
-FEATURES_SONIC= SONIC PSAMPLE DOCKER | ||
+FEATURES_SONIC= SONIC PSAMPLE DOCKER DROPMON | ||
FEATURES_XEN= XEN OVS | ||
FEATURES_HOST= NFLOG PCAP TCP DOCKER KVM OVS DBUS SYSTEMD | ||
|
||
diff --git a/src/Linux/hsflowd.c b/src/Linux/hsflowd.c | ||
index 5d94e79..25031d1 100644 | ||
index a29da54..4b6acc1 100644 | ||
--- a/src/Linux/hsflowd.c | ||
+++ b/src/Linux/hsflowd.c | ||
@@ -1877,6 +1877,14 @@ extern "C" { | ||
@@ -1922,6 +1922,14 @@ extern "C" { | ||
sp->psample.ingress = YES; | ||
sp->psample.egress = NO; | ||
sp->psample.group = 1; | ||
sp->psample.egress = YES; | ||
sp->psample.group = 1; // Ingress PSAMPLE group number. Expects egress on (group+1). | ||
+ // drop-monitor support | ||
+ myLog(LOG_INFO, "drop-monitor support for SONiC"); | ||
+ sp->dropmon.dropmon = YES; | ||
+ sp->dropmon.group = 1; | ||
+ sp->dropmon.start = NO; | ||
+ sp->dropmon.limit = 1000; | ||
+ sp->dropmon.sw = NO; | ||
+ sp->dropmon.hw = YES; | ||
+ | ||
#endif /* HSP_LOAD_SONIC */ | ||
|
||
#ifdef HSP_LOAD_XEN | ||
diff --git a/src/Linux/scripts/hsflowd.conf.sonic b/src/Linux/scripts/hsflowd.conf.sonic | ||
index e675730..fb52a54 100644 | ||
index e675730..0604c5d 100644 | ||
--- a/src/Linux/scripts/hsflowd.conf.sonic | ||
+++ b/src/Linux/scripts/hsflowd.conf.sonic | ||
@@ -4,6 +4,8 @@ | ||
|
@@ -55,6 +35,3 @@ index e675730..fb52a54 100644 | |
# ====== detect new interfaces ====== | ||
refreshAdaptors=60 | ||
# ====== Agent IP selection ====== | ||
-- | ||
2.17.1 | ||
|