[dpdk-dev] [PATCH 02/11] net/sfc/base: improve API to get supported filter matches

Ferruh Yigit ferruh.yigit at intel.com
Tue Mar 7 15:56:11 CET 2017


On 3/7/2017 2:47 PM, Andrew Rybchenko wrote:
> On 03/07/2017 04:25 PM, Ferruh Yigit wrote:
>> On 3/2/2017 4:03 PM, Andrew Rybchenko wrote:
>>> From: Mark Spender <mspender at solarflare.com>
>>>
>>> The previous API had various problems, including the length of the
>>> caller provided buffer not being specified, no means being available
>>> to discover how big the buffer needs to be, and a lack of clarity of
>>> what the resulting list contains.
>>>
>>> To improve it:
>>> - add the buffer length as a parameter
>>> - if the provided buffer is too short, fail with ENOSPC and return
>>>   the required length
>>> - ensure that the list contents are valid and add comments describing it
>>>
>>> It is safe to change this API as, unsuprisingly, it has no users.
>>>
>>> Signed-off-by: Mark Spender <mspender at solarflare.com>
>>> Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
>> <...>
>>
>>>  
>>> -	*length = index;
>>> -	memcpy(list, rx_matches, *length);
>>> +	memcpy(buffer, rx_matches, list_length * sizeof (rx_matches[0]));
>> Checkpatch warning:
>>
>> WARNING:SPACING: space prohibited between function name and open
>> parenthesis '('
>> #326: FILE: drivers/net/sfc/base/efx_filter.c:1410:
>> +       memcpy(buffer, rx_matches, list_length * sizeof (rx_matches[0]))
> 
> 
> Ferruh,
> 
> it is a base driver patch and base driver has a bit different coding
> conventions
> (due to usage on other operating systems). I hope it is not a problem.

It is a whitespace warning, I think it can be OK for base code.

> 
> Thanks,
> Andrew.



More information about the dev mailing list