aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/vcap
diff options
context:
space:
mode:
authorGravatar Steen Hegelund <steen.hegelund@microchip.com> 2023-01-27 14:08:27 +0100
committerGravatar David S. Miller <davem@davemloft.net> 2023-01-30 07:36:22 +0000
commitb95d9e2c20c912806f5427d7bbf1a63207575f13 (patch)
tree31480442e83c18d2ae8955f06af2f9df917fa9a9 /drivers/net/ethernet/microchip/vcap
parentnet: microchip: sparx5: Add ES2 VCAP model and updated KUNIT VCAP model (diff)
downloadlinux-b95d9e2c20c912806f5427d7bbf1a63207575f13.tar.gz
linux-b95d9e2c20c912806f5427d7bbf1a63207575f13.tar.bz2
linux-b95d9e2c20c912806f5427d7bbf1a63207575f13.zip
net: microchip: sparx5: Add ES2 VCAP keyset configuration for Sparx5
This adds the ES2 VCAP port keyset configuration for Sparx5 and also updates the debugFS support to show the keyset configuration and the egress port mask. Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/microchip/vcap')
-rw-r--r--drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c b/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
index d49b1cf7712f..08b18c9360f2 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
@@ -44,11 +44,14 @@ static void vcap_debugfs_show_rule_keyfield(struct vcap_control *vctrl,
out->prf(out->dst, "%pI4h/%pI4h", &data->u32.value,
&data->u32.mask);
} else if (key == VCAP_KF_ETYPE ||
- key == VCAP_KF_IF_IGR_PORT_MASK) {
+ key == VCAP_KF_IF_IGR_PORT_MASK ||
+ key == VCAP_KF_IF_EGR_PORT_MASK) {
hex = true;
} else {
u32 fmsk = (1 << keyfield[key].width) - 1;
+ if (keyfield[key].width == 32)
+ fmsk = ~0;
out->prf(out->dst, "%u/%u", data->u32.value & fmsk,
data->u32.mask & fmsk);
}