From: John Fastabend <john.fastabend@gmail.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Hubert Sokolowski <h.sokolowski@wit.edu.pl>,
Roopa Prabhu <roopa@cumulusnetworks.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Vlad Yasevich <vyasevic@redhat.com>
Subject: Re: [PATCH net-next RESEND] net: Do not call ndo_dflt_fdb_dump if ndo_fdb_dump is defined.
Date: Fri, 12 Dec 2014 12:05:56 -0800 [thread overview]
Message-ID: <548B4AA4.1020804@gmail.com> (raw)
In-Reply-To: <548AFD41.3010801@mojatatu.com>
On 12/12/2014 06:35 AM, Jamal Hadi Salim wrote:
> On 12/12/14 08:36, Hubert Sokolowski wrote:
>>> On 12/12/14 06:38, Hubert Sokolowski wrote:
>>>>> On 12/11/14, 9:06 AM, Hubert Sokolowski wrote:
>>>
>>>> Please see how the ndo_dflt_fdb_add and del are called:
>>>> if (dev->netdev_ops->ndo_fdb_add)
>>>> err = dev->netdev_ops->ndo_fdb_add(ndm, tb, dev, addr,
>>>> vid,
>>>> nlh->nlmsg_flags);
>>>> else
>>>> err = ndo_dflt_fdb_add(ndm, tb, dev, addr, vid,
>>>> nlh->nlmsg_flags);
>>>>
>>>
>>> Semantically add and dump are not the same.
>>> Add adds a specific entry.
>>> Dump not only dumps the fdb table but also the unicast and multicast
>>> addresses.
>> this is not true for 3.16 and before. Please see:
>> http://lxr.free-electrons.com/source/net/core/rtnetlink.c?v=3.16#L2545
>> It lets you fully manage the FDB table by overwriding fdb_add, del and
>> dump
>> in the same way.
>>
> >
>>
>>>
>>>
>>>> As it was suggested by Ronen I can modify the patch so the dflt
>>>> callback
>>>> is always called for bridge devices if this is desirable. Either by
>>>> calling
>>>> it when following expression is true:
>>>> (dev->priv_flags & IFF_BRIDGE_PORT)
>>>> or by modifying br_fdb_dump to call ndo_dflt_fdb_dump.
>>>>
>>>
>>> Are you saying the above is going to work? You need to TEST please.
>> yes, it works and it is not a rocket science :). we just need to agree
>> on the approach to use.
>>
>
> I am happy if this solves wont break
> any of the use cases Vlad made me test and make sure work.
> When i said "test" - I mean run the testcases outlined in the
> commit log; if those work i dont see what the issue is.
>
I'll wake up ;)
First quick grep of code finds some strange uses of ndo_fdb_dump like
this in macvlan,
./drivers/net/macvlan.c
.ndo_fdb_dump = ndo_dflt_fdb_dump,
I'll be sending a patch once net-next opens up again to resolve it. Its
harmless though so not really a fix for net.
There seem to be a few places that have the potential to return
different values then the uc/mc lists.
./drivers/net/vxlan.c
./drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
./drivers/net/ethernet/rocker/rocker.c
./net/bridge/br_device.c
So I guess we can walk through the list and analyse them a bit.
vxlan:
Try stacking devices on top of the vxlan device this will call a uc_add
routine if you then change the mac addr on the vlan. This would get
reported by the dflt fdb dump handlers but not the drivers fdb dump
handlers. So removing the dflt dump handler from this patch at least
changes things. We should either explain why this is OK or accept that
the driver needs to be fixed. Or I guess that the patch is just wrong.
My guess is one of the latter options.
Also Jamal, your original patch seems like it might of changed this
and Hubert's patch is reverting back to its original case. Was this
specific part of your patch intentional?
qlcnic:
hmm again this is changed a bit. In the case of !learning and no
eswitch or sriov (side-bar question how do you do SR-IOV without
some sort of embedded switch?) then we return idx? See qlcnic_fdb_dump.
So at least this is different after the patch as well. Same questions
as above, explain why this is OK, fix it, or solve the issue some other
way. Although again it was this way before Jamal's patch.
rocker.c:
rocker never calls dflt dump either. Should it or is it not necessary?
br_device:
same story.
Hubert, can you run the set of commands in Jamal's patch and repost
your patch for us with them in the commit msg and call out any
differences?
Note the above is just from reading the code I never really ran any
tests to sort it out completely.
Thanks!
John
> cheers,
> jamal
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
John Fastabend Intel Corporation
next prev parent reply other threads:[~2014-12-12 20:06 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 19:37 [PATCH net-next RESEND] net: Do not call ndo_dflt_fdb_dump if ndo_fdb_dump is defined Hubert Sokolowski
2014-12-11 4:32 ` David Miller
2014-12-11 11:49 ` Jamal Hadi Salim
2014-12-11 16:51 ` Hubert Sokolowski
2014-12-11 7:31 ` Roopa Prabhu
2014-12-11 16:39 ` Hubert Sokolowski
2014-12-11 18:47 ` Arad, Ronen
2014-12-11 17:06 ` Hubert Sokolowski
2014-12-11 17:32 ` Roopa Prabhu
2014-12-11 20:40 ` Jamal Hadi Salim
2014-12-12 11:38 ` Hubert Sokolowski
2014-12-12 11:54 ` Jamal Hadi Salim
2014-12-12 13:36 ` Hubert Sokolowski
2014-12-12 14:35 ` Jamal Hadi Salim
2014-12-12 20:05 ` John Fastabend [this message]
2014-12-15 14:29 ` Jamal Hadi Salim
2014-12-16 0:45 ` John Fastabend
2014-12-16 13:06 ` Jamal Hadi Salim
2014-12-16 14:35 ` Hubert Sokolowski
2014-12-16 16:35 ` John Fastabend
2014-12-16 17:21 ` Samudrala, Sridhar
2014-12-16 19:30 ` Roopa Prabhu
2014-12-16 20:11 ` Samudrala, Sridhar
2014-12-17 5:54 ` Roopa Prabhu
2014-12-21 14:27 ` SRIOV as bridge " Jamal Hadi Salim
[not found] ` <443500166.23675449.1419179623398.JavaMail.zimbra@cumulusnetworks.com>
2014-12-21 16:33 ` Shrijeet Mukherjee
2014-12-21 19:08 ` Roopa Prabhu
2014-12-21 19:19 ` Jamal Hadi Salim
2014-12-21 19:36 ` Roopa Prabhu
2014-12-21 20:06 ` Jamal Hadi Salim
2014-12-21 20:46 ` Roopa Prabhu
2014-12-22 3:13 ` Jamal Hadi Salim
2014-12-22 6:24 ` Roopa Prabhu
2014-12-22 12:10 ` Jamal Hadi Salim
2014-12-22 13:04 ` Jamal Hadi Salim
2014-12-21 19:52 ` John Fastabend
2014-12-22 2:59 ` Jamal Hadi Salim
2014-12-21 14:46 ` SRIOV fdb and modes WAS(Re: " Jamal Hadi Salim
2014-12-17 5:51 ` Roopa Prabhu
2014-12-17 15:39 ` Vlad Yasevich
2014-12-17 16:18 ` Hubert Sokolowski
2014-12-18 22:32 ` Jamal Hadi Salim
2014-12-19 15:17 ` Hubert Sokolowski
2014-12-19 16:32 ` Roopa Prabhu
2015-01-05 12:56 ` Hubert Sokolowski
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=548B4AA4.1020804@gmail.com \
--to=john.fastabend@gmail.com \
--cc=h.sokolowski@wit.edu.pl \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).