Re: [patch v2, kernel version 3.2.1] Source mode for macvlaninterface

From: Eric Dumazet
Date: Tue Jan 24 2012 - 04:48:21 EST


Le mardi 24 janvier 2012 Ã 10:07 +0100, Åtefan Gula a Ãcrit :
> 2012/1/24 Eric Dumazet <eric.dumazet@xxxxxxxxx>:

> > How many 'sources' are expected per port ?
> >
> > Above a certain (small) threshold, macvlan_fill_info() will 'overflow'
> > skb capacity and return an error.
> >
> > Take a look at macvlan_get_size() ?
> There should be no defined limits on how many MAC addresses you can
> put under one macvlan interface - it should be fully dynamic. You are
> right about the function, but I have a difficulty with fixing that. It
> is no problem to calculate the space needed to dump all mac-address,
> but I tried to check how many times is macvlan_get_size called and it
> is called only once per macvlan interface initialization, which is
> obviously wrong in my case as I need that number to be changed each
> time before fill_info is called. I tried to find and example how to
> managed that from other drivers, but I was unsuccessful. Do you have
> any idea?

Take a look at commit c7ac8679bec9
(rtnetlink: Compute and store minimum ifinfo dump size)

and maybe extend it if necessary ?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/