From: Jamal Hadi Salim <jhs@mojatatu.com>
To: vyasevic@redhat.com, davem@davemloft.net, stephen@networkplumber.org
Cc: netdev@vger.kernel.org, sfeldma@cumulusnetworks.com,
john.r.fastabend@intel.com, roopa@cumulusnetworks.com
Subject: Re: [net-next PATCH 2/2] bridge: netlink dump interface at par with brctl
Date: Tue, 10 Jun 2014 07:41:53 -0400 [thread overview]
Message-ID: <5396EF01.7030009@mojatatu.com> (raw)
In-Reply-To: <5395E3C4.5080904@redhat.com>
On 06/09/14 12:41, Vlad Yasevich wrote:
> On 06/07/2014 10:27 AM, Jamal Hadi Salim wrote:
>> From: Jamal Hadi Salim <jhs@mojatatu.com>
>>
>> Actually better than brctl showmacs because we can filter by bridge
>> port in the kernel.
>> The current bridge netlink interface doesnt scale when you have many
>> bridges each with large fdbs or even bridges with many bridge ports
>>
>> For example usage look at accompanying iproute2 patch.
>
> The code was a bit tough to follow. I think the main reason is
> that you now always pass a filtering devices even when there was
> no filtering information requested.
>
> I am wondering if it could be made simpler...
>
The patch may be hard to follow i think. I cant think of a simple
way to do filtering by br and brport. If you have suggestions, shoot.
>> rcu_read_lock();
>> + if (br_idx) {
>> + br_dev = __dev_get_by_index(net, br_idx);
>> + if (!br_dev) {
>> + rcu_read_unlock();
>> + return -ENODEV;
>> + }
>> + ops = br_dev->netdev_ops;
>> + bdev = br_dev;
>> + }
>> +
>
> I think this can be outside of the rcu since you hold an rtnl at this time.
>
Will fix on next iteration.
cheers,
jamal
next prev parent reply other threads:[~2014-06-10 11:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-07 14:27 [net-next PATCH 1/2] bridge: fdb dumping takes a filter device Jamal Hadi Salim
2014-06-07 14:27 ` [net-next PATCH 2/2] bridge: netlink dump interface at par with brctl Jamal Hadi Salim
2014-06-07 14:34 ` Jamal Hadi Salim
2014-06-11 6:44 ` David Miller
2014-06-09 16:41 ` Vlad Yasevich
2014-06-10 11:41 ` Jamal Hadi Salim [this message]
2014-06-10 13:25 ` Vlad Yasevich
2014-06-15 15:28 ` Jamal Hadi Salim
2014-06-24 14:18 ` Jamal Hadi Salim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5396EF01.7030009@mojatatu.com \
--to=jhs@mojatatu.com \
--cc=davem@davemloft.net \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=sfeldma@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
--cc=vyasevic@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.