From: Mugunthan V N <mugunthanvnm@ti.com>
To: Zheng Yi <yzheng@techyauld.com>
Cc: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
Lokesh Vutla <lokeshvutla@ti.com>
Subject: Re: [CPSW driver] broadcast ethernet pkg will be dropped?
Date: Mon, 5 Jan 2015 23:56:51 +0530 [thread overview]
Message-ID: <54AAD76B.6030508@ti.com> (raw)
In-Reply-To: <20141229013606.GR970@techyauld.com>
On Monday 29 December 2014 07:06 AM, Zheng Yi wrote:
> Hi Sir
>
> I found your mail address from Linux kernel git repo. I think there
> is a problem in CPSW driver. If it is not your duty to maintain
> those code, could you please tell me the ones who are in charge of
> it?
>
> I found that when a AM3352 board boot, I use a laptop to send ARP
> request to it, the board do not reponse. Even ifconfig do not show
> that there is any pkg sent to the CPSW device. I'm sure that the
> ARP request PKG received by SoC(confirmed by my oscilloscope).
Can you check the hardware statistics counters in CPSW also?
>
> After reading the SoC doc (Tech ref manual) and reading the driver code, i found that:
> 15.3.2.7 Address Lookup Engine (ALE)
> "Broadcast packets will be dropped unless the broadcast address is entered into the table with the super bit set."
>
> and in driver: drivers/net/ether/ti/cpsw_ale.c
>
> int cpsw_ale_add_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask,
> int flags, u16 vid, int mcast_state)
> {
> /* ....... */
>
> cpsw_ale_set_super(ale_entry, (flags & ALE_BLOCKED) ? 1 : 0);
>
> /* ....... */
> }
>
> I have searched all of the calling of that function, and found no
> ALE_BLOCKED flag was set. Especially, in
> cpsw_add_dual_emac_def_ale_entries(), only ALE_VLAN was provided
> for the broadcast address.
>
> After change the flag(brutally), my board can response to the ARP broadcast requests correctly.
>
> Here are some questions I do not found the answer:
> 1. the macro ALE_BLOCKED seems be used uncorrectly.
> If one want the pkg should be "blocked", the "super" bit should be cleared, not be set.
> So, in cpsw_ale_add_mcast(), we should do like this:
> cpsw_ale_set_super(ale_entry, (flags & ALE_BLOCKED) ? 0 : 1);
When Super Bit is set, the packet will never be dropped by any ALE rules
or rate limit. It is made sure that the packet will reach cpu port
irrespective of any rules in the switch. So this is not the correct fix,
need to root cause a bit more.
>
> Do you think the current logic is reversed?
>
> 2. broadcast ethernet pkg from "FF:FF:FF:FF:FF:FF" should be alowed.
> If by default, it desiged to be filtered out, why not add an interface to support
> restore it? I do not found any code that can change filtering the broadcast pkg in runtime.
broadcast is not filtered out, it is always allowed to CPU port in CPSW
driver. Can you dump ALE table entry and check whether something else is
not correct in your setup.
Regards
Mugunthan V N
prev parent reply other threads:[~2015-01-05 18:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-29 1:36 [CPSW driver] broadcast ethernet pkg will be dropped? Zheng Yi
2015-01-05 18:26 ` Mugunthan V N [this message]
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=54AAD76B.6030508@ti.com \
--to=mugunthanvnm@ti.com \
--cc=davem@davemloft.net \
--cc=lokeshvutla@ti.com \
--cc=netdev@vger.kernel.org \
--cc=yzheng@techyauld.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.