commit 7362190ac553005e70d1be148997b67d93587fc2
parent 50ce0800b7341ebf25cf8352707eb22faf1de193
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date: Thu, 27 Jun 2019 13:05:40 -0700
SDK-182661: For configuring PSAMP on BCM56980, BCM_MIRROR_PORT_PSAMP and BCM_...
Devices: AllChips
Module: mirroring
Symptom:
PSAMP mirroring sampling rate is not working
For configuring PSAMP on BCM56980, BCM_MIRROR_PORT_PSAMP and
BCM_MIRROR_PORT_SFLOW flags must be passed in 'flags' argument of API
bcm_mirror_port_dest_add.
Diffstat:
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/sdk-6.5.16/src/bcm/esw/mirror.c b/sdk-6.5.16/src/bcm/esw/mirror.c
@@ -23471,6 +23471,12 @@ _bcm_mirror_sflow_dest_delete(int unit, uint32 flags, bcm_gport_t mirror_dest)
check_flags |= BCM_MIRROR_PORT_PSAMP;
}
#endif
+#ifdef BCM_TOMAHAWK3_SUPPORT
+ if (SOC_IS_TOMAHAWK3(unit)) {
+ check_flags |= BCM_MIRROR_PORT_PSAMP;
+ }
+#endif /* BCM_TOMAHAWK3_SUPPORT */
+
/* only support BCM_MIRROR_PORT_INGRESS */
if (flags & ~check_flags) {
return BCM_E_UNAVAIL;
@@ -23712,6 +23718,12 @@ _bcm_mirror_sflow_dest_get(int unit, uint32 flags, int mirror_dest_size,
}
#endif
+#ifdef BCM_TOMAHAWK3_SUPPORT
+ if (SOC_IS_TOMAHAWK3(unit)) {
+ check_flags |= BCM_MIRROR_PORT_PSAMP;
+ }
+#endif /* BCM_TOMAHAWK3_SUPPORT */
+
/* only support BCM_MIRROR_PORT_INGRESS */
if (flags & ~check_flags) {
return BCM_E_UNAVAIL;
@@ -23915,6 +23927,13 @@ _bcm_mirror_sflow_dest_add(int unit, uint32 flags, bcm_gport_t mirror_dest)
check_flags |= BCM_MIRROR_PORT_PSAMP;
}
#endif
+
+#ifdef BCM_TOMAHAWK3_SUPPORT
+ if (SOC_IS_TOMAHAWK3(unit)) {
+ check_flags |= BCM_MIRROR_PORT_PSAMP;
+ }
+#endif /* BCM_TOMAHAWK3_SUPPORT */
+
if (flags & ~check_flags) {
return BCM_E_UNAVAIL;
}