Commit d8e7ab59 authored by Vlad Dogaru's avatar Vlad Dogaru Committed by Jakub Kicinski
Browse files

net/mlx5: HWS, Export rule skip logic



The bwc layer will use `mlx5hws_rule_skip` to keep track of numbers of
RX and TX rules individually, so export this function for future usage.

Signed-off-by: default avatarVlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: default avatarYevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: default avatarMark Bloch <mbloch@nvidia.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250703185431.445571-4-mbloch@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 26b06579
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -3,9 +3,7 @@

#include "internal.h"

static void hws_rule_skip(struct mlx5hws_matcher *matcher,
			  struct mlx5hws_match_template *mt,
			  u32 flow_source,
void mlx5hws_rule_skip(struct mlx5hws_matcher *matcher, u32 flow_source,
		       bool *skip_rx, bool *skip_tx)
{
	/* By default FDB rules are added to both RX and TX */
@@ -66,7 +64,8 @@ static void hws_rule_init_dep_wqe(struct mlx5hws_send_ring_dep_wqe *dep_wqe,
				attr->rule_idx : 0;

	if (tbl->type == MLX5HWS_TABLE_TYPE_FDB) {
		hws_rule_skip(matcher, mt, attr->flow_source, &skip_rx, &skip_tx);
		mlx5hws_rule_skip(matcher, attr->flow_source,
				  &skip_rx, &skip_tx);

		if (!skip_rx) {
			dep_wqe->rtc_0 = matcher->match_ste.rtc_0_id;
+3 −0
Original line number Diff line number Diff line
@@ -69,6 +69,9 @@ struct mlx5hws_rule {
			   */
};

void mlx5hws_rule_skip(struct mlx5hws_matcher *matcher, u32 flow_source,
		       bool *skip_rx, bool *skip_tx);

void mlx5hws_rule_free_action_ste(struct mlx5hws_action_ste_chunk *action_ste);

int mlx5hws_rule_move_hws_remove(struct mlx5hws_rule *rule,