add flow control stub callbacks

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

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.
  *
-- 
2.30.2

Reply via email to