UDP Multicast with MPC5121 FEC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UDP Multicast with MPC5121 FEC

ソリューションへジャンプ
1,665件の閲覧回数
NeverGoesSmooth
Contributor I

We are trying to get UDP Multicasting to work over the FEC controller on the MPC5121.  Sending packets works fine, but the device only receives multicast packets when the network interface is in promiscuous mode.  We are running an embedded Linux build and have tried kernel versions 2.6.33 and 2.6.34.  Both have this same problem.  Checking /proc/net/dev_mcast and /proc/net/igmp shows that our application has joined the correct group. 

 

I found another thread, https://community.freescale.com/message/52420#52420 on this message board that seems to have the same problem on different hardware.  The 10th poster said he had a fix for the FEC driver, but apparently didn't bother to share.

 

Has any else had problems with Multicast using the FEC driver, and if so, is there a known solution?

0 件の賞賛
1 解決策
737件の閲覧回数
gizero
Contributor I

 

Hi JBaker,
..Sorry for this late reply. The patch I posted was successful in fixing my multicast issue. After applying it, everything ran smoothly.
Your post remembered me that I never submitted it upstream. I'm going to check if this is still relevant for newer kernels. If so I'll post it to LKML and report here too.
Regards,
Andrea

 

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
737件の閲覧回数
gizero
Contributor I

Hi NeverGoesSmooth,

 

First of all, let me 100% agree with your nickname! It really rocks! Smiley Wink

 

Beside this, I wanted you to know we recently faced your exact same problem with our MPC5121FEC and UDP multicast application. Thank you for cross linking that other thread, which helped me a lot in solving this issue.

 

After digging a while for an already made patch and after finding none other than enabling promiscuous mode (not really a _solution_). I had to dive into the driver code. This provided me with an easy and working solution. Without going into details, the fec driver appears to fill the wrong register when initializing the multicast group address you join to.

 

The following should fix:

 

 

diff --exclude CVS --exclude .git -uNr linux-2.6.24/drivers/net/fs_enet/mac-fec.c linux-2.6.24.modified/drivers/net/fs_enet/mac-fec.c--- linux-2.6.24/drivers/net/fs_enet/mac-fec.c 2010-07-20 15:07:25.000000000 +0200+++ linux-2.6.24.modified/drivers/net/fs_enet/mac-fec.c 2010-07-20 14:26:52.000000000 +0200@@ -250,8 +250,8 @@  }   FC(fecp, r_cntrl, FEC_RCNTRL_PROM);- FW(fecp, hash_table_high, fep->fec.hthi);- FW(fecp, hash_table_low, fep->fec.htlo);+ FW(fecp, grp_hash_table_high, fep->fec.hthi);+ FW(fecp, grp_hash_table_low, fep->fec.htlo); }  static void set_multicast_list(struct net_device *dev)@@ -306,8 +306,8 @@  /*   * Reset all multicast.   */- FW(fecp, hash_table_high, fep->fec.hthi);- FW(fecp, hash_table_low, fep->fec.htlo);+ FW(fecp, grp_hash_table_high, fep->fec.hthi);+ FW(fecp, grp_hash_table_low, fep->fec.htlo);   /*   * Set maximum receive buffer size.

 

 

Please, let me know if this solves for you. I'm going to stress-test it from now on but, at first glance, it looks to be working fine.

 

Attached is the patch for 2.6.24 kernel: I'm building with ltib for a mpc5121ads derived board. The patch may require some rework for newer kernels. When I find some time I will try to post the patch upstream to the relevant lists.

 

Regards,

Andrea

 

 

 

 

 

0 件の賞賛
737件の閲覧回数
JBaker
Contributor I

Hi and thanks!

 

Used this on MPC5125 and it now works (as of about 5 minutes ago).

 

Did this provide a permanent fix for you?

 

Cheers

 

JBaker

0 件の賞賛
738件の閲覧回数
gizero
Contributor I

 

Hi JBaker,
..Sorry for this late reply. The patch I posted was successful in fixing my multicast issue. After applying it, everything ran smoothly.
Your post remembered me that I never submitted it upstream. I'm going to check if this is still relevant for newer kernels. If so I'll post it to LKML and report here too.
Regards,
Andrea

 

0 件の賞賛