Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SFLOW] Fixed SFLOW DROPMON patch to align with 2.0.45 version #15948

Merged
merged 2 commits into from
Aug 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,27 @@ From: Vadym Hlushko <vadymh@nvidia.com>
Date: Tue, 25 Jan 2022 12:59:40 +0000
Subject: [PATCH] [sflow] enabled drop monitor support for SONiC

Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
---
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is DROPMON removed here? Is it no longer needed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

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;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why sp->dropmon.group=1 removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

struct variable "group" is removed in version 2.0.45. This was resulting in compilation failure. Hence removed it.

+ 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 @@
Expand All @@ -55,6 +35,3 @@ index e675730..fb52a54 100644
# ====== detect new interfaces ======
refreshAdaptors=60
# ====== Agent IP selection ======
--
2.17.1