Skip to content

Commit 87996f9

Browse files
ogerlitzdavem330
authored andcommitted
mlxsw: spectrum_flower: Add support for ip tos
Support offloading rules that match on ip tos. Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent abac7b0 commit 87996f9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,13 @@ static int mlxsw_sp_flower_parse_ip(struct mlxsw_sp *mlxsw_sp,
235235
f->mask);
236236
mlxsw_sp_acl_rulei_keymask_u32(rulei, MLXSW_AFK_ELEMENT_IP_TTL_,
237237
key->ttl, mask->ttl);
238+
239+
mlxsw_sp_acl_rulei_keymask_u32(rulei, MLXSW_AFK_ELEMENT_IP_ECN,
240+
key->tos & 0x3, mask->tos & 0x3);
241+
242+
mlxsw_sp_acl_rulei_keymask_u32(rulei, MLXSW_AFK_ELEMENT_IP_DSCP,
243+
key->tos >> 6, mask->tos >> 6);
244+
238245
return 0;
239246
}
240247

0 commit comments

Comments
 (0)