From: Graeme Smecher <gsmecher@threespeedlogic.com>
To: Mugunthan V N <mugunthanvnm@ti.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 3/6] drivers: net: ethernet: cpsw: add multicast address to ALE table
Date: Wed, 03 Sep 2014 12:01:40 -0700 [thread overview]
Message-ID: <1409770900.15153.6.camel@fromme.threespeedlogic.local> (raw)
In-Reply-To: <5406D128.3080304@ti.com>
Hi Mungathan,
FYI, I think the multicast bug I'm working on also affects dual EMAC
mode in upstream cpsw.c. I will add a 2.6.37-specific patch on my e2e
forum post (link below), but this is a heads-up for code you maintain.
Symptoms: each port in dual EMAC mode trashes the other port's multicast
reception.
Cause: cpsw_ndo_set_rx_mode does the following:
cpsw_ale_flush_multicast(priv->ale, ALE_ALL_PORTS << priv->host_port);
if (!netdev_mc_empty(ndev)) {
struct netdev_hw_addr *ha;
/* program multicast address list into ALE register */
netdev_for_each_mc_addr(ha, ndev) {
cpsw_add_mcast(priv, (u8 *)ha->addr);
}
}
This code can be invoked by eth0 or eth1, which have potentially
differing multicast lists. However, cpsw_ale_flush_multicast() trashes
ALL multicast entries in the ALE, affecting both ports. Only the entries
for the net_device that invoked cpsw_ndo_set_rx_mode() are restored.
To fix this, you will have to pass a correct port_mask to
cpsw_ale_flush_multicast(), and correct the free-entry check at the
bottom of cpsw_ale_flush_mcast().
best,
Graeme
On Wed, 2014-09-03 at 13:58 +0530, Mugunthan V N wrote:
> Hi Graeme
>
> There is already a support for add multicast in v2.6.37 cpsw driver, if
> there is a bug and you found a fix, can go a head and fix that. The
> patch you have mentioned is an upstream patch with was done on top of
> am335x platform, so there might be bugs fixed and added into the patch
> which are not in v2.6.37 cpsw driver.
>
> Regards
> Mugunthan V N
>
> On Tuesday 02 September 2014 11:52 PM, Graeme Smecher wrote:
> > Hi Mugunthan,
> >
> >> On Wed, Oct 17, 2012 at 04:15:15AM +0530, Mugunthan V N wrote:
> >>> Adding multicast address to ALE table via netdev ops to subscribe, transmit
> >>> or receive multicast frames to and from the network
> >>
> >> Is this somehow related to the time stamping function? If so, how?
> >>
> >> Thanks,
> >> Richard
> >
> > Can you give me a brief description of this (relatively ancient) patch? Your
> > original e-mail is visible here:
> >
> > http://marc.info/?l=linux-netdev&m=135042754927177&w=2
> >
> > I'm wondering if this patch needs to be backported to older CPSW driver
> > snapshots (specifically, TI's 2.6.37 branch for dm81xx.) It appears to
> > fix a multicast bug I'm tracking down, but it's difficult to know for
> > sure without a good description of what problem the patch addresses. (I
> > don't want to commit code that fixes my hardware by accident.)
> >
> > For a little more information, you can refer to my e2e.ti.com post:
> >
> > http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/365586.aspx
> >
> > I'm slowly learning about ALE filtering, but a quick reply from a
> > domain expert would be very helpful.
> >
> > best,
> > Graeme
> >
>
next prev parent reply other threads:[~2014-09-03 19:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 18:22 [PATCH 3/6] drivers: net: ethernet: cpsw: add multicast address to ALE table Graeme Smecher
2014-09-03 8:28 ` Mugunthan V N
2014-09-03 19:01 ` Graeme Smecher [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-10-16 22:45 [PATCH 0/6] Add CPTS PTP driver support Mugunthan V N
2012-10-16 22:45 ` [PATCH 3/6] drivers: net: ethernet: cpsw: add multicast address to ALE table Mugunthan V N
2012-10-18 2:49 ` Richard Cochran
2012-10-21 11:26 ` Richard Cochran
2012-10-22 10:46 ` N, Mugunthan V
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=1409770900.15153.6.camel@fromme.threespeedlogic.local \
--to=gsmecher@threespeedlogic.com \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
/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).