[04/10] net/mlx5: add function to create send to kernel action
Checks
Commit Message
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@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_flow_os.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
@@ -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
*