diff mbox series

[04/10] net/mlx5: add function to create send to kernel action

Message ID 20220920140422.98165-5-michaelsav@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Raslan Darawsheh
Headers show
Series net/mlx5: implement send to kernel action | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Michael Savisko Sept. 20, 2022, 2:04 p.m. UTC
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(+)
diff mbox series

Patch

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
  *