From: Alex Vesker <valex@nvidia.com>
To: <valex@nvidia.com>, <viacheslavo@nvidia.com>,
<thomas@monjalon.net>, "Matan Azrad" <matan@nvidia.com>
Cc: <dev@dpdk.org>, <orika@nvidia.com>
Subject: [v2 15/16] net/mlx5/hws: rename pattern cache object
Date: Wed, 1 Feb 2023 09:28:14 +0200 [thread overview]
Message-ID: <20230201072815.1329101-16-valex@nvidia.com> (raw)
In-Reply-To: <20230201072815.1329101-1-valex@nvidia.com>
To have the same name convention for future caches, use
cache and cache item naming.
Signed-off-by: Alex Vesker <valex@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_pat_arg.c | 22 +++++++++++-----------
drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 6 +++---
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_pat_arg.c b/drivers/net/mlx5/hws/mlx5dr_pat_arg.c
index 152025d302..6ed04dac6d 100644
--- a/drivers/net/mlx5/hws/mlx5dr_pat_arg.c
+++ b/drivers/net/mlx5/hws/mlx5dr_pat_arg.c
@@ -94,13 +94,13 @@ static bool mlx5dr_pat_compare_pattern(enum mlx5dr_action_type cur_type,
return true;
}
-static struct mlx5dr_pat_cached_pattern *
+static struct mlx5dr_pattern_cache_item *
mlx5dr_pat_find_cached_pattern(struct mlx5dr_pattern_cache *cache,
struct mlx5dr_action *action,
uint16_t num_of_actions,
__be64 *actions)
{
- struct mlx5dr_pat_cached_pattern *cached_pat;
+ struct mlx5dr_pattern_cache_item *cached_pat;
LIST_FOREACH(cached_pat, &cache->head, next) {
if (mlx5dr_pat_compare_pattern(cached_pat->type,
@@ -115,13 +115,13 @@ mlx5dr_pat_find_cached_pattern(struct mlx5dr_pattern_cache *cache,
return NULL;
}
-static struct mlx5dr_pat_cached_pattern *
+static struct mlx5dr_pattern_cache_item *
mlx5dr_pat_get_existing_cached_pattern(struct mlx5dr_pattern_cache *cache,
struct mlx5dr_action *action,
uint16_t num_of_actions,
__be64 *actions)
{
- struct mlx5dr_pat_cached_pattern *cached_pattern;
+ struct mlx5dr_pattern_cache_item *cached_pattern;
cached_pattern = mlx5dr_pat_find_cached_pattern(cache, action, num_of_actions, actions);
if (cached_pattern) {
@@ -134,11 +134,11 @@ mlx5dr_pat_get_existing_cached_pattern(struct mlx5dr_pattern_cache *cache,
return cached_pattern;
}
-static struct mlx5dr_pat_cached_pattern *
+static struct mlx5dr_pattern_cache_item *
mlx5dr_pat_get_cached_pattern_by_action(struct mlx5dr_pattern_cache *cache,
struct mlx5dr_action *action)
{
- struct mlx5dr_pat_cached_pattern *cached_pattern;
+ struct mlx5dr_pattern_cache_item *cached_pattern;
LIST_FOREACH(cached_pattern, &cache->head, next) {
if (cached_pattern->mh_data.pattern_obj->id == action->modify_header.pattern_obj->id)
@@ -148,14 +148,14 @@ mlx5dr_pat_get_cached_pattern_by_action(struct mlx5dr_pattern_cache *cache,
return NULL;
}
-static struct mlx5dr_pat_cached_pattern *
+static struct mlx5dr_pattern_cache_item *
mlx5dr_pat_add_pattern_to_cache(struct mlx5dr_pattern_cache *cache,
struct mlx5dr_devx_obj *pattern_obj,
enum mlx5dr_action_type type,
uint16_t num_of_actions,
__be64 *actions)
{
- struct mlx5dr_pat_cached_pattern *cached_pattern;
+ struct mlx5dr_pattern_cache_item *cached_pattern;
cached_pattern = simple_calloc(1, sizeof(*cached_pattern));
if (!cached_pattern) {
@@ -189,7 +189,7 @@ mlx5dr_pat_add_pattern_to_cache(struct mlx5dr_pattern_cache *cache,
}
static void
-mlx5dr_pat_remove_pattern(struct mlx5dr_pat_cached_pattern *cached_pattern)
+mlx5dr_pat_remove_pattern(struct mlx5dr_pattern_cache_item *cached_pattern)
{
LIST_REMOVE(cached_pattern, next);
simple_free(cached_pattern->mh_data.data);
@@ -200,7 +200,7 @@ static void
mlx5dr_pat_put_pattern(struct mlx5dr_pattern_cache *cache,
struct mlx5dr_action *action)
{
- struct mlx5dr_pat_cached_pattern *cached_pattern;
+ struct mlx5dr_pattern_cache_item *cached_pattern;
pthread_spin_lock(&cache->lock);
cached_pattern = mlx5dr_pat_get_cached_pattern_by_action(cache, action);
@@ -225,7 +225,7 @@ static int mlx5dr_pat_get_pattern(struct mlx5dr_context *ctx,
size_t pattern_sz,
__be64 *pattern)
{
- struct mlx5dr_pat_cached_pattern *cached_pattern;
+ struct mlx5dr_pattern_cache_item *cached_pattern;
int ret = 0;
pthread_spin_lock(&ctx->pattern_cache->lock);
diff --git a/drivers/net/mlx5/hws/mlx5dr_pat_arg.h b/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
index d9353e9a3e..92db6d6aee 100644
--- a/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
+++ b/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
@@ -24,10 +24,10 @@ enum {
struct mlx5dr_pattern_cache {
/* Protect pattern list */
pthread_spinlock_t lock;
- LIST_HEAD(pattern_head, mlx5dr_pat_cached_pattern) head;
+ LIST_HEAD(pattern_head, mlx5dr_pattern_cache_item) head;
};
-struct mlx5dr_pat_cached_pattern {
+struct mlx5dr_pattern_cache_item {
enum mlx5dr_action_type type;
struct {
struct mlx5dr_devx_obj *pattern_obj;
@@ -36,7 +36,7 @@ struct mlx5dr_pat_cached_pattern {
uint16_t num_of_actions;
} mh_data;
uint32_t refcount;
- LIST_ENTRY(mlx5dr_pat_cached_pattern) next;
+ LIST_ENTRY(mlx5dr_pattern_cache_item) next;
};
enum mlx5dr_arg_chunk_size
--
2.18.1
next prev parent reply other threads:[~2023-02-01 7:30 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 9:33 [v1 00/16] net/mlx5/hws: support range and partial hash matching Alex Vesker
2023-01-31 9:33 ` [v1 01/16] net/mlx5/hws: support synchronous drain Alex Vesker
2023-01-31 9:33 ` [v1 02/16] net/mlx5/hws: matcher remove AT and MT limitation Alex Vesker
2023-01-31 9:33 ` [v1 03/16] net/mlx5/hws: support GTA WQE write using FW command Alex Vesker
2023-01-31 9:33 ` [v1 04/16] net/mlx5/hws: add capability query for gen wqe command Alex Vesker
2023-01-31 9:33 ` [v1 05/16] net/mlx5/hws: align RTC create command with PRM format Alex Vesker
2023-01-31 9:33 ` [v1 06/16] net/mlx5/hws: add send FW match STE using gen WQE Alex Vesker
2023-01-31 9:33 ` [v1 07/16] net/mlx5/hws: add send FW range STE WQE Alex Vesker
2023-01-31 9:33 ` [v1 08/16] net/mlx5/hws: move matcher size check to function Alex Vesker
2023-01-31 9:33 ` [v1 09/16] net/mlx5/hws: support range match Alex Vesker
2023-01-31 9:33 ` [v1 10/16] net/mlx5/hws: redesign definer create Alex Vesker
2023-01-31 9:33 ` [v1 11/16] net/mlx5/hws: support partial hash Alex Vesker
2023-01-31 9:33 ` [v1 12/16] net/mlx5/hws: add range definer creation support Alex Vesker
2023-01-31 9:33 ` [v1 13/16] net/mlx5/hws: add FW WQE rule creation logic Alex Vesker
2023-01-31 9:33 ` [v1 14/16] net/mlx5/hws: add debug dump support for range and hash Alex Vesker
2023-01-31 9:33 ` [v1 15/16] net/mlx5/hws: rename pattern cache object Alex Vesker
2023-01-31 9:33 ` [v1 16/16] net/mlx5/hws: cache definer for reuse Alex Vesker
2023-02-01 7:27 ` [v2 00/16] net/mlx5/hws: support range and partial hash matching Alex Vesker
2023-02-01 7:28 ` [v2 01/16] net/mlx5/hws: support synchronous drain Alex Vesker
2023-02-01 7:28 ` [v2 02/16] net/mlx5/hws: matcher remove AT and MT limitation Alex Vesker
2023-02-01 7:28 ` [v2 03/16] net/mlx5/hws: support GTA WQE write using FW command Alex Vesker
2023-02-01 7:28 ` [v2 04/16] net/mlx5/hws: add capability query for gen wqe command Alex Vesker
2023-02-01 7:28 ` [v2 05/16] net/mlx5/hws: align RTC create command with PRM format Alex Vesker
2023-02-01 7:28 ` [v2 06/16] net/mlx5/hws: add send FW match STE using gen WQE Alex Vesker
2023-02-01 7:28 ` [v2 07/16] net/mlx5/hws: add send FW range STE WQE Alex Vesker
2023-02-01 7:28 ` [v2 08/16] net/mlx5/hws: move matcher size check to function Alex Vesker
2023-02-01 7:28 ` [v2 09/16] net/mlx5/hws: support range match Alex Vesker
2023-02-01 7:28 ` [v2 10/16] net/mlx5/hws: redesign definer create Alex Vesker
2023-02-01 7:28 ` [v2 11/16] net/mlx5/hws: support partial hash Alex Vesker
2023-02-01 7:28 ` [v2 12/16] net/mlx5/hws: add range definer creation support Alex Vesker
2023-02-01 7:28 ` [v2 13/16] net/mlx5/hws: add FW WQE rule creation logic Alex Vesker
2023-02-01 7:28 ` [v2 14/16] net/mlx5/hws: add debug dump support for range and hash Alex Vesker
2023-02-01 7:28 ` Alex Vesker [this message]
2023-02-01 7:28 ` [v2 16/16] net/mlx5/hws: cache definer for reuse Alex Vesker
2023-02-06 15:07 ` [v2 00/16] net/mlx5/hws: support range and partial hash matching Matan Azrad
2023-02-13 8:27 ` Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230201072815.1329101-16-valex@nvidia.com \
--to=valex@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).