net/mlx5: share QUOTA indirect action
PATCH 1/1 net/mlx5: share QUOTA indirect action
Support shared indirect QUOTA action.
flow configure 1 queues_number 4 queues_size 64 quotas_number 32 flow configure 0 queues_number 4 queues_size 64 quotas_number 0 \
host_port 1 flags 2
flow indirect_action 1 create ingress action_id 8 \
action quota_create limit 18000 mode l3 / end
flow actions_template 0 create ingress actions_template_id 1 \
template shared_indirect / jump / end \
mask quota_create / jump group 0 / end
flow queue 0 create 0 template_table 1 \
pattern_template 0 actions_template 0 postpone no \
pattern eth / end \
actions shared_indirect 1 8 / jump group 2 / end--- drivers/net/mlx5/mlx5.h | 1 - drivers/net/mlx5/mlx5_flow_hw.c | 2 +- drivers/net/mlx5/mlx5_flow_quota.c | 92 ++++++++++++++++++++---------- 3 files changed, 63 insertions(+), 32 deletions(-)
drivers/net/mlx5/mlx5.h +0 -1
@@ -1716,7 +1716,6 @@ struct mlx5_quota {/* Bulk management structure for flow quota. */ struct mlx5_quota_ctx { -uint32_t nb_quotas;/* Total number of quota objects */ struct mlx5dr_action *dr_action;/* HWS action */ struct mlx5_devx_obj *devx_obj;/* DEVX ranged object. */ struct mlx5_pmd_mr mr;/* MR for READ from MTR ASO */
drivers/net/mlx5/mlx5_flow_hw.c +1 -1
@@ -7787,7 +7787,7 @@ flow_hw_configure(struct rte_eth_dev *dev, goto err; }/* Initialize quotas */ -if (port_attr->nb_quotas) { +if (port_attr->nb_quotas || (host_priv && host_priv->quota_ctx.devx_obj)) { ret =mlx5_flow_quota_init (dev, port_attr->nb_quotas);if (ret) goto err;
drivers/net/mlx5/mlx5_flow_quota.c +62 -30
137 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 23 lines
-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Thursday, June 29, 2023 7:48 PM
To: [email protected]
Cc: Maayan Kashani <[email protected]>; Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>
Subject: [PATCH] net/mlx5: share QUOTA indirect actionSupport shared indirect QUOTA action.
flow configure 1
queues_number4queues_size64quotas_number32 flow configure 0queues_number4queues_size64quotas_number0 \
host_port1 flags 2flow
indirect_action1 create ingressaction_id8 \
actionquota_createlimit 18000 mode l3 / endflow
actions_template0 create ingressactions_template_id1 \
templateshared_indirect/ jump / end \
maskquota_create/ jump group 0 / end
Quoted 6 lines
flow queue 0 create 0 template_table 1 \ pattern_template 0 actions_template 0 postpone no \ pattern eth / end \ actions shared_indirect 1 8 / jump group 2 / endSigned-off-by Gregory Etelson <[email protected]>
Hi,
Quoted 23 lines
-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Thursday, June 29, 2023 7:48 PM
To: [email protected]
Cc: Maayan Kashani <[email protected]>; Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>
Subject: [PATCH] net/mlx5: share QUOTA indirect actionSupport shared indirect QUOTA action.
flow configure 1
queues_number4queues_size64quotas_number32 flow configure 0queues_number4queues_size64quotas_number0 \
host_port1 flags 2flow
indirect_action1 create ingressaction_id8 \
actionquota_createlimit 18000 mode l3 / endflow
actions_template0 create ingressactions_template_id1 \
templateshared_indirect/ jump / end \
maskquota_create/ jump group 0 / end
Quoted 6 lines
flow queue 0 create 0 template_table 1 \ pattern_template 0 actions_template 0 postpone no \ pattern eth / end \ actions shared_indirect 1 8 / jump group 2 / endSigned-off-by Gregory Etelson <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh