Exadata virt edition, actively using IB partitions, is exposed to
excessive P_Key Violation Traps being sent to the SM. This is close to
a DoS attack. In addition, the OpenSM logs are flooded with these
messages, hiding potential other log messages deemed important to
investigate customer issues.
In fw version 2.35.6312, the traps are disabled, still counting the
P-Key Violations.
This commit will conditionally disable the P_Key Violation Traps
subject to fw version.
Orabug:
27693633
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
---
v1 -> v2:
* Incorporated review comments form jch
* Made the disabling dependent on fw version
Signed-off-by: Brian Maly <brian.maly@oracle.com>
if (dev->caps.flags & MLX4_DEV_CAP_FLAG_RSS_IP_FRAG)
*(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 13);
+ /* Disable P_Key Violation Traps for fw version 2.35.6312 and
+ * newer. This because said fw version counts the P_Key
+ * Violations, a feature missing from earlier versions.
+ */
+ if (dev->caps.fw_ver >= mlx4_fw_ver(2, 35, 6312)) {
+ *(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 15);
+ mlx4_info(dev, "P_Key Violation Traps disabled\n");
+ }
+
/* CX3 is capable of extending CQEs/EQEs from 32 to 64 bytes */
if (dev->caps.flags & MLX4_DEV_CAP_FLAG_64B_EQE) {
*(inbox + INIT_HCA_EQE_CQE_OFFSETS / 4) |= cpu_to_be32(1 << 29);