Skip to contentSkip to conversation

drivers: net: ethernet: cpsw: add multicast address to ALE table

PATCH Graeme Smecher 2 participants 3 messages Sep 2, 2014 – Sep 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Mugunthan,

Quoted 8 lines · Mugunthan V N
Quoted 2 lines

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

#1 lore raw

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

Quoted 32 lines · Graeme Smecher

Hi Mugunthan,

Quoted 8 lines · Mugunthan V N
Quoted 2 lines

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

#2 lore raw

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

Quoted 45 lines · Mugunthan V N

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

Quoted 32 lines · Graeme Smecher

Hi Mugunthan,

Quoted 8 lines · Mugunthan V N
Quoted 2 lines

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