-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mlxsw-spectrum_acl-Include-delta-bits-into-hashtable-key'
Ido Schimmel says: ==================== mlxsw: spectrum_acl: Include delta bits into hashtable key The Spectrum-2 ASIC allows multiple rules to use the same mask provided that the difference between their masks is small enough (up to 8 consecutive delta bits). A more detailed explanation is provided in merge commit 756cd36 ("Merge branch 'mlxsw-Introduce-algorithmic-TCAM-support'"). These delta bits are part of the rule's key and therefore rules that only differ in their delta bits can be inserted with the same A-TCAM mask. In case two rules share the same key and only differ in their priority, then the second will spill to the C-TCAM. Current code does not take the delta bits into account when checking for duplicate rules, which leads to unnecessary spillage to the C-TCAM. This may result in reduced scale and performance. Patch #1 includes the delta bits in the rule's key to avoid the above mentioned problem. Patch #2 adds a tracepoint when a rule is inserted into the C-TCAM. Patches #3-#5 add test cases to make sure unnecessary spillage into the C-TCAM does not occur. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
5 changed files
with
174 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ | ||
/* Copyright (c) 2019 Mellanox Technologies. All rights reserved */ | ||
|
||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM mlxsw | ||
|
||
#if !defined(_MLXSW_TRACEPOINT_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _MLXSW_TRACEPOINT_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
struct mlxsw_sp; | ||
struct mlxsw_sp_acl_atcam_region; | ||
|
||
TRACE_EVENT(mlxsw_sp_acl_atcam_entry_add_ctcam_spill, | ||
TP_PROTO(const struct mlxsw_sp *mlxsw_sp, | ||
const struct mlxsw_sp_acl_atcam_region *aregion), | ||
|
||
TP_ARGS(mlxsw_sp, aregion), | ||
|
||
TP_STRUCT__entry( | ||
__field(const void *, mlxsw_sp) | ||
__field(const void *, aregion) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->mlxsw_sp = mlxsw_sp; | ||
__entry->aregion = aregion; | ||
), | ||
|
||
TP_printk("mlxsw_sp %p, aregion %p", | ||
__entry->mlxsw_sp, __entry->aregion) | ||
); | ||
|
||
#endif /* _MLXSW_TRACEPOINT_H */ | ||
|
||
/* This part must be outside protection */ | ||
#include <trace/define_trace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters