-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <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 | ||
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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why sp->dropmon.group=1 removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 @@ | ||
|
@@ -55,6 +35,3 @@ index e675730..fb52a54 100644 | |
# ====== detect new interfaces ====== | ||
refreshAdaptors=60 | ||
# ====== Agent IP selection ====== | ||
-- | ||
2.17.1 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saiarcot895 This patch is removed, because its already part of 2.0.45 version
https://github.com/sflow/host-sflow/blob/0de668dd9e7a19ceef2dfc22ec46485fe829498b/src/Linux/Makefile#L49