提交 909fb9ae 编写于 作者: E Egil Hjelmeland 提交者: David S. Miller

net: dsa: lan9303: Transmit using ALR when unicast

lan9303_xmit_use_arl() introduced in previous patch set is wrong.
The chip flood broadcast and unknown multicast frames. The effect is that
broadcasts and multicasts are duplicated on egress. It is not possible to
configure the chip to direct unknown multicasts to CPU port only.

This means that only unicast frames can be transmitted using ALR lookup.
Signed-off-by: NEgil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a95157d7
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
/* Decide whether to transmit using ALR lookup, or transmit directly to /* Decide whether to transmit using ALR lookup, or transmit directly to
* port using tag. ALR learning is performed only when using ALR lookup. * port using tag. ALR learning is performed only when using ALR lookup.
* If the two external ports are bridged and the packet is not STP BPDU, * If the two external ports are bridged and the frame is unicast,
* then use ALR lookup to allow ALR learning on CPU port. * then use ALR lookup to allow ALR learning on CPU port.
* Otherwise transmit directly to port with STP state override. * Otherwise transmit directly to port with STP state override.
* See also: lan9303_separate_ports() and lan9303.pdf 6.4.10.1 * See also: lan9303_separate_ports() and lan9303.pdf 6.4.10.1
...@@ -55,7 +55,7 @@ static int lan9303_xmit_use_arl(struct dsa_port *dp, u8 *dest_addr) ...@@ -55,7 +55,7 @@ static int lan9303_xmit_use_arl(struct dsa_port *dp, u8 *dest_addr)
{ {
struct lan9303 *chip = dp->ds->priv; struct lan9303 *chip = dp->ds->priv;
return chip->is_bridged && !ether_addr_equal(dest_addr, eth_stp_addr); return chip->is_bridged && !is_multicast_ether_addr(dest_addr);
} }
static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device *dev) static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册