[v2,27/41] net/mlx5: add flow control callbacks

Message ID 20211007184350.73858-28-srikanth.k@oneconvergence.com (mailing list archive)
State New
Delegated to: Raslan Darawsheh
Headers
Series add MLX5 FreeBSD support |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Srikanth Kaka Oct. 7, 2021, 6:43 p.m. UTC
  add flow control stub callbacks

Signed-off-by: Srikanth Kaka <srikanth.k@oneconvergence.com>
Signed-off-by: Vag Singh <vag.singh@oneconvergence.com>
Signed-off-by: Anand Thulasiram <avelu@juniper.net>
---
 drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 46 +++++++++++++++++++++++
 1 file changed, 46 insertions(+)
  

Patch

diff --git a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
index 5b66e1802b..48099d0fc5 100644
--- a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
@@ -372,6 +372,52 @@  mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 	return ret;
 }
 
+/**
+ * DPDK callback to get flow control status.
+ *
+ * @param dev
+ *   Pointer to Ethernet device structure.
+ * @param[out] fc_conf
+ *   Flow control output buffer.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+int
+mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev,
+		       struct rte_eth_fc_conf *fc_conf)
+{
+	RTE_SET_USED(fc_conf);
+	DRV_LOG(WARNING,
+		"port %u get flow control status operation not supported",
+		dev->data->port_id);
+
+	return -EOPNOTSUPP;
+}
+
+/**
+ * DPDK callback to modify flow control parameters.
+ *
+ * @param dev
+ *   Pointer to Ethernet device structure.
+ * @param[in] fc_conf
+ *   Flow control parameters.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+int
+mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev,
+		       struct rte_eth_fc_conf *fc_conf)
+{
+	RTE_SET_USED(fc_conf);
+	DRV_LOG(WARNING,
+		"port %u modify flow control operation not supported",
+		dev->data->port_id);
+
+	return -EOPNOTSUPP;
+}
+
 /**
  * Handle asynchronous removal event for entire multiport device.
  *