On 9/13/19 7:43 PM, Ferruh Yigit wrote:
On 9/9/2019 12:58 PM, Andrew Rybchenko wrote:
Enabling/disabling of promiscuous mode is not always successful and
it should be taken into account to be able to handle it properly.
When correct return status is unclear from driver code, -EAGAIN is used.
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
<...>
@@ -376,8 +384,11 @@ mlx4_rxmode_toggle(struct rte_eth_dev *dev, enum
rxmode_toggle toggle)
*
* @param dev
* Pointer to Ethernet device structure.
+ *
+ * @return
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
*/
-void
+int
mlx4_promiscuous_enable(struct rte_eth_dev *dev)
{
mlx4_rxmode_toggle(dev, RXMODE_TOGGLE_PROMISC_ON);
@@ -388,8 +399,11 @@ mlx4_promiscuous_enable(struct rte_eth_dev *dev)
*
* @param dev
* Pointer to Ethernet device structure.
+ *
+ * @return
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
*/
-void
+int
mlx4_promiscuous_disable(struct rte_eth_dev *dev)
{
mlx4_rxmode_toggle(dev, RXMODE_TOGGLE_PROMISC_OFF);
error: control reaches end of non-void function [-Werror=return-type]
Thanks, will fix in the next version and install libverbs-dev to
be able to test build.