mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
net/mlx5e: Add new prio for promiscuous mode
An optimization for promiscuous mode adds a high-priority steering
table with a single catch-all rule to steer all traffic directly to
the TTC table.
However, a gap exists between the creation of this table and the
insertion of the catch-all rule. Packets arriving in this brief window
would miss as no rule was inserted yet, unnecessarily incrementing the
'rx_steer_missed_packets' counter and dropped.
This patch resolves the issue by introducing a new prio for this
table, placing it between MLX5E_TC_PRIO and MLX5E_NIC_PRIO. By doing
so, packets arriving during the window now fall through to the next
prio (at MLX5E_NIC_PRIO) instead of being dropped.
Fixes: 1c46d7409f ("net/mlx5e: Optimize promiscuous mode")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/1752155624-24095-4-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
eb41a264a3
commit
4c9fce56fa
|
|
@ -18,7 +18,8 @@ enum {
|
|||
|
||||
enum {
|
||||
MLX5E_TC_PRIO = 0,
|
||||
MLX5E_NIC_PRIO
|
||||
MLX5E_PROMISC_PRIO,
|
||||
MLX5E_NIC_PRIO,
|
||||
};
|
||||
|
||||
struct mlx5e_flow_table {
|
||||
|
|
@ -68,9 +69,13 @@ struct mlx5e_l2_table {
|
|||
MLX5_HASH_FIELD_SEL_DST_IP |\
|
||||
MLX5_HASH_FIELD_SEL_IPSEC_SPI)
|
||||
|
||||
/* NIC prio FTS */
|
||||
/* NIC promisc FT level */
|
||||
enum {
|
||||
MLX5E_PROMISC_FT_LEVEL,
|
||||
};
|
||||
|
||||
/* NIC prio FTS */
|
||||
enum {
|
||||
MLX5E_VLAN_FT_LEVEL,
|
||||
MLX5E_L2_FT_LEVEL,
|
||||
MLX5E_TTC_FT_LEVEL,
|
||||
|
|
|
|||
|
|
@ -780,7 +780,7 @@ static int mlx5e_create_promisc_table(struct mlx5e_flow_steering *fs)
|
|||
ft_attr.max_fte = MLX5E_PROMISC_TABLE_SIZE;
|
||||
ft_attr.autogroup.max_num_groups = 1;
|
||||
ft_attr.level = MLX5E_PROMISC_FT_LEVEL;
|
||||
ft_attr.prio = MLX5E_NIC_PRIO;
|
||||
ft_attr.prio = MLX5E_PROMISC_PRIO;
|
||||
|
||||
ft->t = mlx5_create_auto_grouped_flow_table(fs->ns, &ft_attr);
|
||||
if (IS_ERR(ft->t)) {
|
||||
|
|
|
|||
|
|
@ -113,13 +113,16 @@
|
|||
#define ETHTOOL_PRIO_NUM_LEVELS 1
|
||||
#define ETHTOOL_NUM_PRIOS 11
|
||||
#define ETHTOOL_MIN_LEVEL (KERNEL_MIN_LEVEL + ETHTOOL_NUM_PRIOS)
|
||||
/* Promiscuous, Vlan, mac, ttc, inner ttc, {UDP/ANY/aRFS/accel/{esp, esp_err}}, IPsec policy,
|
||||
/* Vlan, mac, ttc, inner ttc, {UDP/ANY/aRFS/accel/{esp, esp_err}}, IPsec policy,
|
||||
* {IPsec RoCE MPV,Alias table},IPsec RoCE policy
|
||||
*/
|
||||
#define KERNEL_NIC_PRIO_NUM_LEVELS 11
|
||||
#define KERNEL_NIC_PRIO_NUM_LEVELS 10
|
||||
#define KERNEL_NIC_NUM_PRIOS 1
|
||||
/* One more level for tc */
|
||||
#define KERNEL_MIN_LEVEL (KERNEL_NIC_PRIO_NUM_LEVELS + 1)
|
||||
/* One more level for tc, and one more for promisc */
|
||||
#define KERNEL_MIN_LEVEL (KERNEL_NIC_PRIO_NUM_LEVELS + 2)
|
||||
|
||||
#define KERNEL_NIC_PROMISC_NUM_PRIOS 1
|
||||
#define KERNEL_NIC_PROMISC_NUM_LEVELS 1
|
||||
|
||||
#define KERNEL_NIC_TC_NUM_PRIOS 1
|
||||
#define KERNEL_NIC_TC_NUM_LEVELS 3
|
||||
|
|
@ -187,6 +190,8 @@ static struct init_tree_node {
|
|||
ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
|
||||
ADD_MULTIPLE_PRIO(KERNEL_NIC_TC_NUM_PRIOS,
|
||||
KERNEL_NIC_TC_NUM_LEVELS),
|
||||
ADD_MULTIPLE_PRIO(KERNEL_NIC_PROMISC_NUM_PRIOS,
|
||||
KERNEL_NIC_PROMISC_NUM_LEVELS),
|
||||
ADD_MULTIPLE_PRIO(KERNEL_NIC_NUM_PRIOS,
|
||||
KERNEL_NIC_PRIO_NUM_LEVELS))),
|
||||
ADD_PRIO(0, BY_PASS_MIN_LEVEL, 0, FS_CHAINING_CAPS,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user