git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: fix legacy inline multi-packet performance
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5_flow.c
diff --git
a/drivers/net/mlx5/mlx5_flow.c
b/drivers/net/mlx5/mlx5_flow.c
index
65a0e65
..
0087163
100644
(file)
--- a/
drivers/net/mlx5/mlx5_flow.c
+++ b/
drivers/net/mlx5/mlx5_flow.c
@@
-1998,8
+1998,8
@@
mlx5_flow_validate_item_gre_key(const struct rte_flow_item *item,
const rte_be32_t *mask = item->mask;
int ret = 0;
rte_be32_t gre_key_default_mask = RTE_BE32(UINT32_MAX);
const rte_be32_t *mask = item->mask;
int ret = 0;
rte_be32_t gre_key_default_mask = RTE_BE32(UINT32_MAX);
- const struct rte_flow_item_gre *gre_spec
= gre_item->spec
;
- const struct rte_flow_item_gre *gre_mask
= gre_item->mask
;
+ const struct rte_flow_item_gre *gre_spec;
+ const struct rte_flow_item_gre *gre_mask;
if (item_flags & MLX5_FLOW_LAYER_GRE_KEY)
return rte_flow_error_set(error, ENOTSUP,
if (item_flags & MLX5_FLOW_LAYER_GRE_KEY)
return rte_flow_error_set(error, ENOTSUP,
@@
-2013,8
+2013,10
@@
mlx5_flow_validate_item_gre_key(const struct rte_flow_item *item,
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"GRE key following a wrong item");
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"GRE key following a wrong item");
+ gre_mask = gre_item->mask;
if (!gre_mask)
gre_mask = &rte_flow_item_gre_mask;
if (!gre_mask)
gre_mask = &rte_flow_item_gre_mask;
+ gre_spec = gre_item->spec;
if (gre_spec && (gre_mask->c_rsvd0_ver & RTE_BE16(0x2000)) &&
!(gre_spec->c_rsvd0_ver & RTE_BE16(0x2000)))
return rte_flow_error_set(error, EINVAL,
if (gre_spec && (gre_mask->c_rsvd0_ver & RTE_BE16(0x2000)) &&
!(gre_spec->c_rsvd0_ver & RTE_BE16(0x2000)))
return rte_flow_error_set(error, EINVAL,
@@
-2945,16
+2947,16
@@
flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
mcp_res = (void *)mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id);
if (mcp_res) {
/* For non-default rule. */
mcp_res = (void *)mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id);
if (mcp_res) {
/* For non-default rule. */
- if (mark_id)
+ if (mark_id
!= MLX5_DEFAULT_COPY_ID
)
mcp_res->refcnt++;
mcp_res->refcnt++;
- assert(mark_id || mcp_res->refcnt == 1);
+ assert(mark_id
!= MLX5_DEFAULT_COPY_ID
|| mcp_res->refcnt == 1);
return mcp_res;
}
/* Provide the full width of FLAG specific value. */
if (mark_id == (priv->sh->dv_regc0_mask & MLX5_FLOW_MARK_DEFAULT))
tag_spec.data = MLX5_FLOW_MARK_DEFAULT;
/* Build a new flow. */
return mcp_res;
}
/* Provide the full width of FLAG specific value. */
if (mark_id == (priv->sh->dv_regc0_mask & MLX5_FLOW_MARK_DEFAULT))
tag_spec.data = MLX5_FLOW_MARK_DEFAULT;
/* Build a new flow. */
- if (mark_id) {
+ if (mark_id
!= MLX5_DEFAULT_COPY_ID
) {
items[0] = (struct rte_flow_item){
.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
.spec = &tag_spec,
items[0] = (struct rte_flow_item){
.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
.spec = &tag_spec,
@@
-3052,7
+3054,7
@@
flow_mreg_del_copy_action(struct rte_eth_dev *dev,
}
/*
* We do not check availability of metadata registers here,
}
/*
* We do not check availability of metadata registers here,
- * because copy resources are allocated in this case.
+ * because copy resources are
not
allocated in this case.
*/
if (--mcp_res->refcnt)
return;
*/
if (--mcp_res->refcnt)
return;
@@
-3131,7
+3133,8
@@
flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
/* Check if default flow is registered. */
if (!priv->mreg_cp_tbl)
return;
/* Check if default flow is registered. */
if (!priv->mreg_cp_tbl)
return;
- mcp_res = (void *)mlx5_hlist_lookup(priv->mreg_cp_tbl, 0ULL);
+ mcp_res = (void *)mlx5_hlist_lookup(priv->mreg_cp_tbl,
+ MLX5_DEFAULT_COPY_ID);
if (!mcp_res)
return;
assert(mcp_res->flow);
if (!mcp_res)
return;
assert(mcp_res->flow);
@@
-3164,7
+3167,7
@@
flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
!mlx5_flow_ext_mreg_supported(dev) ||
!priv->sh->dv_regc0_mask)
return 0;
!mlx5_flow_ext_mreg_supported(dev) ||
!priv->sh->dv_regc0_mask)
return 0;
- mcp_res = flow_mreg_add_copy_action(dev,
0
, error);
+ mcp_res = flow_mreg_add_copy_action(dev,
MLX5_DEFAULT_COPY_ID
, error);
if (!mcp_res)
return -rte_errno;
return 0;
if (!mcp_res)
return -rte_errno;
return 0;