[dpdk-dev] [PATCH v2 04/13] ethdev: change promiscuous callbacks to return status

Andrew Rybchenko arybchenko at solarflare.com
Fri Sep 13 22:33:21 CEST 2019


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 <arybchenko at 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.



More information about the dev mailing list