AV5282 Network driver

Joel Sherrill joel.sherrill at OARcorp.com
Thu Jan 8 18:42:18 UTC 2009


frank.ueberschar at dsa-volgmann.de wrote:
> To whom it may concern,
>  
> we are using parts of the network driver from
> the AV5282 BSP with our own BSP-Code. We have
> enountered Problems when transmitting fragmented
> IP Packets (i.e. send ICMP Ping with high amount
> of dataload).
>  
> We think that we might have found a bug in that
> code in network.c so someone please could verify that.
> (We still work on rtems-4.5.1 - nevertheless :-))
OK!  You saw the recent lecture on old RTEMS versions.
No need to repeat it here.  Quit living in the Clinton years
and move into the Bush and Obama years.  If 4.5.1 were
a child, it would be in elementary school.  Does that
give you an idea how old it it? LOL! :D

This BSP didn't show up in a tree until 4.7.  Did you
guys backport it?

Any particular reason you are staying with old stuff?
The Coldfire in particular has had GREAT improvements
in the tools in the past 2 years.
>  
> If in the fec_sendpacket(..) an IP Fragment mbuffer
> with zero length if(m->m_len) occurs then this packet
> will be put on the mbuf chain, however. This will
> result in used buffer descriptors that will never
> be freed again.
>  
The patch applies cleanly to 4.7, 4.8, 4.9, and the CVS head.
I have cc'ed the original author so he can comment but would
appreciate a confirmation from anyone.

Please file a PR in http://www.rtems.org/bugzilla.  I would like
a confirmation but believe you that this fixes a problem.
> In our opinion/experience the following patch resolves
> this problem:
>  
>  
> *** network-orig.c Thu Jan  8 12:04:21 2009
> --- network.c Thu Jan  8 12:06:05 2009
> *************** fec_sendpacket(struct ifnet *ifp, struct
> *** 548,557 ****
>     * The IP fragmentation routine in ip_output
>     * can produce fragments with zero length.
>     */
> -   txBd = sc->txBdBase + sc->txBdHead;
>     if (m->m_len){
>      char *p = mtod(m, char *);
>      int offset = (int) p & 0x3;
>      if (offset == 0) {
>       txBd->buffer = p;
>       txBd->length = m->m_len;
> --- 548,557 ----
>     * The IP fragmentation routine in ip_output
>     * can produce fragments with zero length.
>     */
>     if (m->m_len){
>      char *p = mtod(m, char *);
>      int offset = (int) p & 0x3;
> +    txBd = sc->txBdBase + sc->txBdHead;
>      if (offset == 0) {
>       txBd->buffer = p;
>       txBd->length = m->m_len;
>  
>  
> Best regards,
> Frank Ueberschar
> ---------------------------------------
> DSA-Volgmann
> Thomas Volgmann
> Redcarstr. 20
> 53842 Troisdorf
>  
> Tel:    02241 23416 16
> Fax:    02241 23416 666
> email : _frank.ueberschar_ at dsa-volgmann.de 
> <mailto:frank.ueberschar at dsa-volgmann.de>
> web:    www.dsa-volgmann.de <http://www.dsa-volgmann.de/>
> ---------------------------------------


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list