summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_prm.h
diff options
context:
space:
mode:
authorDekel Peled <dekelp@mellanox.com>2018-12-27 13:09:38 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-01-03 12:56:43 +0100
commit4bb14c83df952bdb54a735873d4a5347b38e1117 (patch)
tree2de06890e0fbddb8306042abea965df2747646e3 /drivers/net/mlx5/mlx5_prm.h
parent89760a006b826ec3f85f46f2c7a04efe75a8d6fa (diff)
downloaddpdk-4bb14c83df952bdb54a735873d4a5347b38e1117.zip
dpdk-4bb14c83df952bdb54a735873d4a5347b38e1117.tar.gz
dpdk-4bb14c83df952bdb54a735873d4a5347b38e1117.tar.xz
net/mlx5: support modify header using Direct Verbs
This patch implements the set of actions to support offload of packet header modifications to MLX5 NIC. Implementation is based on RFC [1]. [1] http://mails.dpdk.org/archives/dev/2018-November/119971.html Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_prm.h')
-rw-r--r--drivers/net/mlx5/mlx5_prm.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 29742b1..5c39036 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -280,8 +280,14 @@ struct mlx5_cqe {
/* CQE format value. */
#define MLX5_COMPRESSED 0x3
+/* Write a specific data value to a field. */
+#define MLX5_MODIFICATION_TYPE_SET 1
+
+/* Add a specific data value to a field. */
+#define MLX5_MODIFICATION_TYPE_ADD 2
+
/* The field of packet to be modified. */
-enum mlx5_modificaiton_field {
+enum mlx5_modification_field {
MLX5_MODI_OUT_SMAC_47_16 = 1,
MLX5_MODI_OUT_SMAC_15_0,
MLX5_MODI_OUT_ETHERTYPE,
@@ -337,23 +343,17 @@ struct mlx5_modification_cmd {
union {
uint32_t data0;
struct {
- unsigned int bits:5;
+ unsigned int length:5;
unsigned int rsvd0:3;
- unsigned int src_offset:5; /* Start bit offset. */
+ unsigned int offset:5;
unsigned int rsvd1:3;
- unsigned int src_field:12;
- unsigned int type:4;
+ unsigned int field:12;
+ unsigned int action_type:4;
};
};
union {
uint32_t data1;
uint8_t data[4];
- struct {
- unsigned int rsvd2:8;
- unsigned int dst_offset:8;
- unsigned int dst_field:12;
- unsigned int rsvd3:4;
- };
};
};