summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5
diff options
context:
space:
mode:
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>2019-11-07 17:09:46 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-11 14:23:01 +0100
commitcff811c7240e10369845bc263aca34f2011bb8fd (patch)
treeb57b825a68830e1a3d2362e43f6f2f9b0e88cae3 /drivers/net/mlx5
parent46287eacc1b16600af036c8b7d5258b99ab6acbe (diff)
downloaddpdk-cff811c7240e10369845bc263aca34f2011bb8fd.zip
dpdk-cff811c7240e10369845bc263aca34f2011bb8fd.tar.gz
dpdk-cff811c7240e10369845bc263aca34f2011bb8fd.tar.xz
net/mlx5: convert internal tag endianness
Public API RTE_FLOW_ACTION_TYPE_TAG and RTE_FLOW_ITEM_TYPE_TAG present data in host-endian format, as all metadata related entities. The internal mlx5 tag related action and item should use the same endianness to be conformed. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5')
-rw-r--r--drivers/net/mlx5/mlx5_flow.c6
-rw-r--r--drivers/net/mlx5/mlx5_flow.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 38b7e4b..bcefc1b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2725,7 +2725,7 @@ flow_hairpin_split(struct rte_eth_dev *dev,
actions_rx++;
set_tag = (void *)actions_rx;
set_tag->id = flow_get_reg_id(dev, MLX5_HAIRPIN_RX, 0, &error);
- set_tag->data = rte_cpu_to_be_32(*flow_id);
+ set_tag->data = *flow_id;
tag_action->conf = set_tag;
/* Create Tx item list. */
rte_memcpy(actions_tx, actions, sizeof(struct rte_flow_action));
@@ -2733,8 +2733,8 @@ flow_hairpin_split(struct rte_eth_dev *dev,
item = pattern_tx;
item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
tag_item = (void *)addr;
- tag_item->data = rte_cpu_to_be_32(*flow_id);
- tag_item->id = flow_get_reg_id(dev, MLX5_HAIRPIN_TX, 0, &error);
+ tag_item->data = *flow_id;
+ tag_item->id = flow_get_reg_id(dev, MLX5_HAIRPIN_TX, 0, NULL);
item->spec = tag_item;
addr += sizeof(struct mlx5_rte_flow_item_tag);
tag_item = (void *)addr;
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index d33d856..f6f8f82 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -56,13 +56,13 @@ enum mlx5_rte_flow_action_type {
/* Matches on selected register. */
struct mlx5_rte_flow_item_tag {
uint16_t id;
- rte_be32_t data;
+ uint32_t data;
};
/* Modify selected register. */
struct mlx5_rte_flow_action_set_tag {
uint16_t id;
- rte_be32_t data;
+ uint32_t data;
};
/* Matches on source queue. */