Skip to content

Commit 6d52bc5

Browse files
rajkumar38sonic-otn
authored andcommitted
[SFLOW] Fixed SFLOW DROPMON patch to align with 2.0.45 version (sonic-net#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]>
1 parent ea6518b commit 6d52bc5

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

src/sflow/hsflowd/patch/dropmon/0001-sflow-enabled-drop-monitor-support-for-SONiC.patch

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,27 @@ From: Vadym Hlushko <[email protected]>
33
Date: Tue, 25 Jan 2022 12:59:40 +0000
44
Subject: [PATCH] [sflow] enabled drop monitor support for SONiC
55

6-
Signed-off-by: Vadym Hlushko <[email protected]>
7-
---
8-
src/Linux/Makefile | 2 +-
9-
src/Linux/hsflowd.c | 8 ++++++++
10-
src/Linux/scripts/hsflowd.conf.sonic | 2 ++
11-
3 files changed, 11 insertions(+), 1 deletion(-)
12-
13-
diff --git a/src/Linux/Makefile b/src/Linux/Makefile
14-
index 8128cf2..cf538e7 100644
15-
--- a/src/Linux/Makefile
16-
+++ b/src/Linux/Makefile
17-
@@ -34,7 +34,7 @@ FEATURES_DENT= DENT PSAMPLE SYSTEMD DROPMON
18-
FEATURES_EOS= EAPI
19-
FEATURES_OS10= OS10 DBUS SYSTEMD
20-
FEATURES_OPX= OPX DBUS SYSTEMD
21-
-FEATURES_SONIC= SONIC PSAMPLE DOCKER
22-
+FEATURES_SONIC= SONIC PSAMPLE DOCKER DROPMON
23-
FEATURES_XEN= XEN OVS
24-
FEATURES_HOST= NFLOG PCAP TCP DOCKER KVM OVS DBUS SYSTEMD
25-
266
diff --git a/src/Linux/hsflowd.c b/src/Linux/hsflowd.c
27-
index 5d94e79..25031d1 100644
7+
index a29da54..4b6acc1 100644
288
--- a/src/Linux/hsflowd.c
299
+++ b/src/Linux/hsflowd.c
30-
@@ -1877,6 +1877,14 @@ extern "C" {
10+
@@ -1922,6 +1922,14 @@ extern "C" {
3111
sp->psample.ingress = YES;
32-
sp->psample.egress = NO;
33-
sp->psample.group = 1;
12+
sp->psample.egress = YES;
13+
sp->psample.group = 1; // Ingress PSAMPLE group number. Expects egress on (group+1).
3414
+ // drop-monitor support
3515
+ myLog(LOG_INFO, "drop-monitor support for SONiC");
3616
+ sp->dropmon.dropmon = YES;
37-
+ sp->dropmon.group = 1;
3817
+ sp->dropmon.start = NO;
3918
+ sp->dropmon.limit = 1000;
4019
+ sp->dropmon.sw = NO;
4120
+ sp->dropmon.hw = YES;
21+
+
4222
#endif /* HSP_LOAD_SONIC */
4323

4424
#ifdef HSP_LOAD_XEN
4525
diff --git a/src/Linux/scripts/hsflowd.conf.sonic b/src/Linux/scripts/hsflowd.conf.sonic
46-
index e675730..fb52a54 100644
26+
index e675730..0604c5d 100644
4727
--- a/src/Linux/scripts/hsflowd.conf.sonic
4828
+++ b/src/Linux/scripts/hsflowd.conf.sonic
4929
@@ -4,6 +4,8 @@
@@ -55,6 +35,3 @@ index e675730..fb52a54 100644
5535
# ====== detect new interfaces ======
5636
refreshAdaptors=60
5737
# ====== Agent IP selection ======
58-
--
59-
2.17.1
60-

0 commit comments

Comments
 (0)