Hi Marcin,
On dim., mars 06 2016, Marcin Wojtas wrote:
> Hi Gregory,
>
>
>> +int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num, gfp_t
>> gfp)
>> +{
>> + int err, i;
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(&bm_pool->lock, flags);
>> + if (b
Hi Gregory,
> +int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num, gfp_t gfp)
> +{
> + int err, i;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&bm_pool->lock, flags);
> + if (bm_pool->buf_num == bm_pool->size) {
'size' field is used as a 'frag_size'
This basic implementation allows to share code between driver using
hardware buffer management. As the code is hardware agnostic, there is
few helpers, most of the optimization brought by the an HW BM has to be
done at driver level.
Signed-off-by: Gregory CLEMENT
---
include/net/hwbm.h | 26