]> git.droids-corp.org - dpdk.git/blobdiff - drivers/common/mlx5/mlx5_common_mp.h
common/mlx5: share MR mempool registration
[dpdk.git] / drivers / common / mlx5 / mlx5_common_mp.h
index 527bf3cad8ef7e5e206ac44226e64d5d5fa36abd..2276dc921c5ce9628ed81bc6fd5cc6f50f59f27e 100644 (file)
@@ -64,6 +64,17 @@ struct mlx5_mp_id {
        uint16_t port_id;
 };
 
+/** Key string for IPC. */
+#define MLX5_MP_NAME "common_mlx5_mp"
+
+/** Initialize a multi-process ID. */
+static inline void
+mlx5_mp_id_init(struct mlx5_mp_id *mp_id, uint16_t port_id)
+{
+       mp_id->port_id = port_id;
+       strlcpy(mp_id->name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN);
+}
+
 /** Request timeout for IPC. */
 #define MLX5_MP_REQ_TIMEOUT_SEC 5