lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] general lwip questions


From: Eric Shufro
Subject: [lwip-users] general lwip questions
Date: Tue, 14 Sep 2004 16:34:11 -0400

1) What is the difference between lwipopts.h and opt.h? They contain many of
the same fields. Should only one of them be used?

2) I don't have much memory to spare, and I think I read that the RAW API
was the least memory intensive API to use, is this correct? - To makes sure
I further understand, the RAW API means direct calls the functions in
tcpip.c etc. (like tcpwrite).

If my packets are never going to exceed, say 500 bytes, then what options
should I set in the config file to reduce the memory consumption? Number of
queues, number of tasks (using ucos-ii) etc.

I appreciate the help.

Thanks in advance,

--eric shufro


-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
address@hidden
Sent: Tuesday, September 14, 2004 11:57 AM
To: address@hidden
Subject: lwip-users Digest, Vol 13, Issue 14

Send lwip-users mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.nongnu.org/mailman/listinfo/lwip-users
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of lwip-users digest..."


Today's Topics:

   1. RE: I am new to LWIP,     do you have a 'port' for aknown ARM
      board? (Jan Hyla [Home])
   2. RE: I am new to LWIP, do you have a 'port' for aknown     ARM
      board? (K.J. Mansley)
   3. cs8900 driver and lwip 1.0.0 (Eric Shufro)
   4. cs8900 lwip 1.0.0 more specifically (Eric Shufro)
   5. lwip_chksum for H8  (Paul Clarke)


----------------------------------------------------------------------

Message: 1
Date: Mon, 13 Sep 2004 18:23:27 +0100
From: "Jan Hyla [Home]" <address@hidden>
Subject: RE: [lwip-users] I am new to LWIP,     do you have a 'port' for
        aknown ARM board?
To: "Mailing list for lwIP users" <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain;       charset="Windows-1252"

Thanks Kieran and Christiaan

I'll have a look.

Am I correct that http://savannah.nongnu.org/download/lwip/  has the latest
sources?

Best Regards

Jan

-----Original Message-----
From: K.J. Mansley [mailto:address@hidden
Sent: 13 September 2004 15:36
To: Mailing list for lwIP users
Subject: Re: [lwip-users] I am new to LWIP, do you have a 'port' for aknown
ARM board?

On Mon, 2004-09-13 at 16:31, Christiaan Simons wrote:
> On Mon, 2004-09-13 at 11:30, Jan Hyla [Home] wrote:
>
> > I"ve downloaded LWIP 0.7.2, and have tried to compile the sources as
> > far as I can.
>
> The latest release is 1.0.0.
>
> >  I have files missing such as cc.h, lwipopts.h, sys_arch and others.
>
> You need to create them yourself. You can peek into
> the other contrib modules to figure out the bits
> and pieces.

The original poster may not need to create them, if someone else has
already added a compatible port to the contrib section.

Basically, you (Jan) also need the "contrib" module as well as the
"lwip" module that you already have.  This has the files you mention,
and a lot of other stuff, for a set of different architectures (eg.
unix, and many embedded platforms).  However, if it doesn't already have
a port that you can use, you'll need to make your own, which isn't too
hard if you can base it on some of the existing work in contrib.

Thanks

Kieran








------------------------------

Message: 2
Date: 13 Sep 2004 18:26:15 +0100
From: "K.J. Mansley" <address@hidden>
Subject: RE: [lwip-users] I am new to LWIP, do you have a 'port' for
        aknown  ARM board?
To: Mailing list for lwIP users <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain

On Mon, 2004-09-13 at 18:23, Jan Hyla [Home] wrote:
> Thanks Kieran and Christiaan
> 
> I'll have a look.
> 
> Am I correct that http://savannah.nongnu.org/download/lwip/  has the
latest
> sources?

Yes, although interestingly there isn't a "contrib-1.0.0" available
there.  Does anyone know why not?

Kieran





------------------------------

Message: 3
Date: Mon, 13 Sep 2004 15:45:01 -0400
From: "Eric Shufro" <address@hidden>
Subject: [lwip-users] cs8900 driver and lwip 1.0.0
To: <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain;       charset="us-ascii"

The driver no longer compiles when used with lwip 1.0.0. I get the error
"type mismatch (expected 'pbuf *', given 'signed char ')"

And when I try it with my revised version of the driver, it says given NULL.

Not sure where the difference is. Anyone else having a similar problem?

The line causing the error is:

p = etharp_output(netif, ipaddr, p); (line 623 of the reference driver in
the contrib/c16x port)

Thanks in advance,

--eric



-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
address@hidden
Sent: Monday, September 13, 2004 11:56 AM
To: address@hidden
Subject: lwip-users Digest, Vol 13, Issue 13

Send lwip-users mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.nongnu.org/mailman/listinfo/lwip-users
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of lwip-users digest..."


Today's Topics:

   1. Re: I am new to LWIP, do you have a 'port' for a  known ARM
      board? (Christiaan Simons)
   2. Re: I am new to LWIP, do you have a 'port' for a  known ARM
      board? (K.J. Mansley)


----------------------------------------------------------------------

Message: 1
Date: Mon, 13 Sep 2004 17:31:48 +0200
From: Christiaan Simons <address@hidden>
Subject: Re: [lwip-users] I am new to LWIP, do you have a 'port' for a
        known ARM board?
To: Mailing list for lwIP users <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset=

On Mon, 2004-09-13 at 11:30, Jan Hyla [Home] wrote:

> Ibve downloaded LWIP 0.7.2, and have tried to compile the sources as
> far as I can.

The latest release is 1.0.0.

>  I have files missing such as cc.h, lwipopts.h, sys_arch and others.

You need to create them yourself. You can peek into
the other contrib modules to figure out the bits
and pieces.

Bye,
Christiaan Simons



The information contained in this communication is confidential and is
intended solely for the use of the individual or entity to whom it is
addressed. Axon Digital Design Group is neither liable for the proper nor
for the complete transmission of the information contained in this
communication nor for any delay in its receipt. Axon Digital Design Group
does not guarantee that the integrity of this communication has been
maintained nor that the communication is free of viruses, interceptions or
interference. If you are not the intended recipient of this communication,
you are hereby notified that reading, disseminating, distributing or copying
this message is strictly prohibited. In that case please return the
communication to the sender and delete and destroy all copies. In carrying
out its engagements, Axon Digital Design Group applies general terms and
conditions, which contain a clause that limits its liability. A copy of
these terms and conditions is available on request free of charge.






------------------------------

Message: 2
Date: 13 Sep 2004 15:35:53 +0100
From: "K.J. Mansley" <address@hidden>
Subject: Re: [lwip-users] I am new to LWIP, do you have a 'port' for a
        known ARM board?
To: Mailing list for lwIP users <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset=iso-8859-7

On Mon, 2004-09-13 at 16:31, Christiaan Simons wrote:
> On Mon, 2004-09-13 at 11:30, Jan Hyla [Home] wrote:
> 
> > I"ve downloaded LWIP 0.7.2, and have tried to compile the sources as
> > far as I can.
> 
> The latest release is 1.0.0.
> 
> >  I have files missing such as cc.h, lwipopts.h, sys_arch and others.
> 
> You need to create them yourself. You can peek into
> the other contrib modules to figure out the bits
> and pieces.

The original poster may not need to create them, if someone else has
already added a compatible port to the contrib section.

Basically, you (Jan) also need the "contrib" module as well as the
"lwip" module that you already have.  This has the files you mention,
and a lot of other stuff, for a set of different architectures (eg.
unix, and many embedded platforms).  However, if it doesn't already have
a port that you can use, you'll need to make your own, which isn't too
hard if you can base it on some of the existing work in contrib.

Thanks

Kieran





------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

End of lwip-users Digest, Vol 13, Issue 13
******************************************





------------------------------

Message: 4
Date: Mon, 13 Sep 2004 15:51:53 -0400
From: "Eric Shufro" <address@hidden>
Subject: [lwip-users] cs8900 lwip 1.0.0 more specifically
To: <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain;       charset="us-ascii"

In the cs8900 reference driver the below function exists. Notice that is
takes in a pbuf * p, and then tries to assign p to the result of
etharp_ouput(). However, etharp_output() returns an err_t which is an signed
char or something. 

This creates a compiler error.

Whats going on here?

thanks

--eric

err_t cs8900if_output(struct netif *netif, struct pbuf *p, struct ip_addr
*ipaddr)
{
  struct cs8900if *cs8900if = netif->state;
  err_t result;
  /* resolve the link destination hardware address */
  p = etharp_output(netif, ipaddr, p);
  /* network hardware address obtained? */
  if (p != NULL)
  {
    /* send out the packet */
    result = cs8900_output(netif, p);
    p = NULL;
  }
  /* { p == NULL } */
  else
  {
    /* we cannot tell if the packet was sent, the packet could have been
queued */
    /* on an ARP entry that was already pending. */
    return ERR_OK;
  }
  return result;
}





------------------------------

Message: 5
Date: Tue, 14 Sep 2004 09:18:59 +0930
From: "Paul Clarke" <address@hidden>
Subject: [lwip-users] lwip_chksum for H8 
To: <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain;       charset="iso-8859-1"


Heres my fix for the lwip_chksum of odd address data, it uses word access
so it should be as fast as the original lwip_chksum code and faster than the
byte access code posted earlier.

Paul


static u16_t
lwip_chksum(void *dataptr, int len)
{
  u32_t acc;
  u8_t  OddStart;

  OddStart = (u8_t)dataptr & 0x01;
  if (OddStart)
  {
    acc =  *(u8_t *)dataptr;
    dataptr = (void *)((u8_t *)dataptr + 1);
    len--;
  } else
  {
    acc = 0;
  }

  LWIP_DEBUGF(INET_DEBUG, ("lwip_chksum(%p, %d)\n", (void *)dataptr,
  len));
  for( ; len > 1; len -= 2) {
      /*    acc = acc + *((u16_t *)dataptr)++;*/
    acc += *(u16_t *)dataptr;
    dataptr = (void *)((u16_t *)dataptr + 1);
  }

  /* add up any odd byte */
  if (len == 1) {
    acc += htons((u16_t)((*(u8_t *)dataptr) & 0xff) << 8);
    LWIP_DEBUGF(INET_DEBUG, ("inet: chksum: odd byte %d\n", (unsigned
    int)(*(u8_t *)dataptr)));
  } else {
    LWIP_DEBUGF(INET_DEBUG, ("inet: chksum: no odd byte\n"));
  }
  acc = (acc >> 16) + (acc & 0xffffUL);

  if ((acc & 0xffff0000) != 0) {
    acc = (acc >> 16) + (acc & 0xffffUL);
  }

  if (OddStart) {
    acc = ((acc & 0xff00)>>8) | ((acc & 0x00ff)<<8);
  }

  return (u16_t)acc;
}







------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

End of lwip-users Digest, Vol 13, Issue 14
******************************************





reply via email to

[Prev in Thread] Current Thread [Next in Thread]