Skip to content

Commit 7a871ef

Browse files
[sflow + dropmon] added missing patch for the sFlow + dropmon feature. (sonic-net#281)
* [sflow + dropmon] Add patch which add Nvivia-specific flag for the psample driver Signed-off-by: Vadym Hlushko <[email protected]> * Correct patch name Signed-off-by: Vadym Hlushko <[email protected]> This defines the macro PSAMPLE_MD_EXTENDED_ATTR
1 parent d0a010c commit 7a871ef

4 files changed

+31
-2
lines changed

patch/0001-psample-Encapsulate-packet-metadata-in-a-struct.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Date: Sun, 14 Mar 2021 14:19:30 +0200
44

55
[backport of upstream commit a03e99d39f1943ec88f6fd3b0b9f34c20663d401]
66

7-
Subject: [PATCH 1/2] psample: Encapsulate packet metadata in a struct
7+
Subject: [PATCH 1/3] psample: Encapsulate packet metadata in a struct
88

99
Currently, callers of psample_sample_packet() pass three metadata
1010
attributes: Ingress port, egress port and truncated size. Subsequent

patch/0002-psample-Add-additional-metadata-attributes.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Date: Sun, 14 Mar 2021 14:19:31 +0200
44

55
[backport of upstream commit 07e1a5809b595df6e125504dff6245cb2c8ed3de]
66

7-
Subject: [PATCH 2/2] psample: Add additional metadata attributes
7+
Subject: [PATCH 2/3] psample: Add additional metadata attributes
88

99
Extend psample to report the following attributes when available:
1010

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 7dbf2689eb841c51dca4dad51b0941c06aa09e26 Mon Sep 17 00:00:00 2001
2+
From: Vadym Hlushko <[email protected]>
3+
Date: Mon, 11 Apr 2022 15:41:46 +0000
4+
Subject: [PATCH 3/3] psample: Add Nvidia-specific wrapper function for the psample driver
5+
6+
Add a variable to notify the psample driver to use a wrapper function,
7+
which does preprocess before sending the sample packet to the userspace application.
8+
9+
Signed-off-by: Vadym Hlushko <[email protected]>
10+
---
11+
include/net/psample.h | 2 ++
12+
1 file changed, 2 insertions(+)
13+
14+
diff --git a/include/net/psample.h b/include/net/psample.h
15+
index e328c5127..b7c79f634 100644
16+
--- a/include/net/psample.h
17+
+++ b/include/net/psample.h
18+
@@ -14,6 +14,8 @@ struct psample_group {
19+
struct rcu_head rcu;
20+
};
21+
22+
+#define PSAMPLE_MD_EXTENDED_ATTR 1
23+
+
24+
struct psample_metadata {
25+
u32 trunc_size;
26+
int in_ifindex;
27+
--
28+
2.17.1

patch/series

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ cisco-hwmon-pmbus_core-pec-support-check.patch
153153
# sFlow + dropmon support
154154
0001-psample-Encapsulate-packet-metadata-in-a-struct.patch
155155
0002-psample-Add-additional-metadata-attributes.patch
156+
0003-psample-define-the-macro-PSAMPLE_MD_EXTENDED_ATTR.patch
156157

157158
#
158159
# Marvell platform patches for 4.19

0 commit comments

Comments
 (0)