[PATCH 04/10] net/mlx5: add function to create send to kernel action
Michael Savisko
michaelsav at nvidia.com
Tue Sep 20 16:04:16 CEST 2022
Add static inline mlx5_flow_os_create_flow_action_send_to_kernel(),
which calls dr_create_flow_action_send_to_kernel glue callback.
Signed-off-by: Michael Savisko <michaelsav at nvidia.com>
---
drivers/net/mlx5/linux/mlx5_flow_os.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.h b/drivers/net/mlx5/linux/mlx5_flow_os.h
index bcb48b3e56..ed71289322 100644
--- a/drivers/net/mlx5/linux/mlx5_flow_os.h
+++ b/drivers/net/mlx5/linux/mlx5_flow_os.h
@@ -368,6 +368,28 @@ mlx5_flow_os_create_flow_action_default_miss(void **action)
return (*action) ? 0 : -1;
}
+/**
+ * Create flow action: send_to_kernel.
+ *
+ * @param[in] tbl
+ * Pointer to destination root table.
+ * @param[in] priority
+ * Priority to which traffic will arrive.
+ * @param[out] action
+ * Pointer to a valid action on success, NULL otherwise.
+ *
+ * @return
+ * 0 on success, or -1 on failure and errno is set.
+ */
+static inline int
+mlx5_flow_os_create_flow_action_send_to_kernel(void *tbl, uint16_t priority,
+ void **action)
+{
+ *action = mlx5_glue->dr_create_flow_action_send_to_kernel(tbl,
+ priority);
+ return (*action) ? 0 : -1;
+}
+
/**
* Create flow action: dest_devx_tir
*
--
2.27.0
More information about the dev
mailing list