Cogent 637 board

Camilo Alejandro Arboleda camilo.arboleda at spymac.com
Thu Nov 10 13:52:05 UTC 2005


It works now. But I have a question: do we know for sure that m_data is 
miss aligned? Shouldn't we test it first?

Jay Monkman wrote:

>Here's a patch that should fix the problem. Can you try it out and let me know
>if works for you?
>
>Did you also have a problem with current_tty in shared/console.c? I had to
>modify it to get it to compile.
>  
>
Yes, I didn't fix the problem, just commented out the offending lines.

>diff -Naur rtems-4.6.99.2/c/src/lib/libbsp/arm/csb337/network/network.c
>rtems-4.6.99.2-fixed/c/src/lib/libbsp/arm/csb337/network/network.c
>--- rtems-4.6.99.2/c/src/lib/libbsp/arm/csb337/network/network.c
>2005-04-26 18:00:38.000000000 -0500
>+++ rtems-4.6.99.2-fixed/c/src/lib/libbsp/arm/csb337/network/network.c
>2005-11-09 21:02:38.000000000 -0600
>@@ -525,9 +525,11 @@
>             /* set the type of mbuf to ifp (ethernet I/F) */
>             m->m_pkthdr.rcvif = ifp;
>             m->m_nextpkt = 0;
>-
>-            /* copy the packet into the cluster pointed to by the mbuf */
>-            memcpy((char *)m->m_ext.ext_buf,
>+
>+            /* Offset the ethernet header so the IP header will be aligned */
>+            m->m_data += 2;
>+
>+            memcpy((char *)m->m_data,
>                    (char *)(rxbuf_hdrs[sc->rx_buf_idx].address & 0xfffffffc),
>                    pktlen);
>
>
>  
>




More information about the users mailing list