LWIP on Gigabit Ethernet MAC (raw api)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

LWIP on Gigabit Ethernet MAC (raw api)

Daniel Klingler
Hello together,

does anybody implemented lwip (raw api) with a Gigabit Ethernet MAC?

We use a PPC on a Virtex 4 with his tri mode MAC (in Virtex 4 integrated)
with a corresponding PHY (Marvell 88E1111). If it's possible then we want to
use lwip with this MAC.

Best regards,
Daniel Klingler

---------------------------------
TES Electronic Solutions GmbH
Daniel Klingler, Dipl.-Ing.
Consultant Digital Design

Zettachring 8
70567 Stuttgart
Tel.: +49 (0)711/7287 7450
Fax:  +49 (0)711/7287 7451
[hidden email]
www.tesbv.com
---------------------------------



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: LWIP on Gigabit Ethernet MAC (raw api)

Sathya Thammanur
Hi Daniel,
Xilinx EDK8.2iSP1 release does support the Trimode Emac for V4 with PPC. However this is supported only for the sockets API mode and not the RAW API.

Sathya

On 9/14/06, Daniel Klingler <[hidden email]> wrote:
Hello together,

does anybody implemented lwip (raw api) with a Gigabit Ethernet MAC?

We use a PPC on a Virtex 4 with his tri mode MAC (in Virtex 4 integrated)
with a corresponding PHY (Marvell 88E1111). If it's possible then we want to
use lwip with this MAC.

Best regards,
Daniel Klingler

---------------------------------
TES Electronic Solutions GmbH
Daniel Klingler, Dipl.-Ing.
Consultant Digital Design

Zettachring 8
70567 Stuttgart
Tel.: +49 (0)711/7287 7450
Fax:  +49 (0)711/7287 7451
[hidden email]
www.tesbv.com
---------------------------------



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: LWIP on Gigabit Ethernet MAC (raw api)

Christiaan Simons
In reply to this post by Daniel Klingler

Hi Sathya,

> Xilinx EDK8.2iSP1 release does support the Trimode Emac for V4 with
> PPC. However this is supported only for the sockets API mode and not
> the RAW API.

Huh? Why this limitation?

The sockets API builds upon the raw-API,
thus the port must support both APIs!

I can't see why a specific port should
impose such a severe limitation.

One of the features of lwIP is that you
_can_ use it without a kernel and thus
without a socket layer.

Even if the driver requires a kernel,
the raw-API should work just fine as long
as the network code runs in same
task/thread.

Regards,

Christiaan Simons

Hardware Designer
Axon Digital Design

http://www.axon.tv




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: LWIP on Gigabit Ethernet MAC (raw api)

Sathya Thammanur
Hi Christiaan,
Is it true that Sockets API builds on RAW API? The Sockets port requires a kernel and hence this port does the same. Can you explain how the Sockets API works on RAW ? Although the functions for packet processing are the same at the ethernet level, the fact that there are multiple threads that are used to take care of packet processing, reading packets from ethernet and the tcpip thread which is used for communication between application and stack makes the working different unless I am missing something. The RAW API port always has been working based on the call backs being set up by the application for various stack events.

Sathya

On 9/15/06, Christiaan Simons <[hidden email]> wrote:

Hi Sathya,

> Xilinx EDK8.2iSP1 release does support the Trimode Emac for V4 with
> PPC. However this is supported only for the sockets API mode and not
> the RAW API.

Huh? Why this limitation?

The sockets API builds upon the raw-API,
thus the port must support both APIs!

I can't see why a specific port should
impose such a severe limitation.

One of the features of lwIP is that you
_can_ use it without a kernel and thus
without a socket layer.

Even if the driver requires a kernel,
the raw-API should work just fine as long
as the network code runs in same
task/thread.

Regards,

Christiaan Simons

Hardware Designer
Axon Digital Design

http://www.axon.tv




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: LWIP on Gigabit Ethernet MAC (raw api)

Christiaan Simons
In reply to this post by Daniel Klingler

Sathya,

> Is it true that Sockets API builds on RAW API?

Yes.

> The Sockets port requires a kernel and hence this port does the same.

True except for "hence", ports generally can (and do)
make this assumption. It would be good practice to make
this clear in the port name.

E.g. the eCos port was clearly designed for a
specific  kernel in mind.  Thus apps using this port
will most likely use the socket API, though
they are not obliged to use the socket API.

Other ports like the c16x or the original 6502 do
not depend on a kernel, but may be used with it
if the user wishes todo so.

> Can you explain how the Sockets API works on RAW ?

Well I'm not an expert on the sockets thing,
but if you have a look at e.g. api_msg.c do_write()
you can clearly see a call to tcp_write() which is in turn
part of the raw-API as documented in doc/rawapi.txt

So a write on a socket eventually ends up as
a raw-API write. This isn't very clear because of
the mailbox stuff, but it actually _is_ using the raw-API.

> Although the functions for packet processing are the same at the
> ethernet level,
> the fact that there are multiple threads that are used to take care
> of packet processing,
> reading packets from ethernet and the tcpip thread which is used for
> communication
> between application and stack makes the working different unless I
> am missing something.

This separation of tasks does not separate the APIs.
The socket layer is just stacked on top of a lot of other things.
(and therefore it is quite inefficient and slow,
mainly because of overused mailboxes)

application (top)

[ sockets-API ]
[ netconn-API ]
[ lwIP core (raw-API) ]
[ netif i/o, driver  ]

network (bottom)

The raw API is just a collection of lwIP core functions.
They are always there, and always available.

>  The RAW API port always has been working based on the call backs
> being set up by the application for various stack events.

True, this is exactly what is needed by some users
that want to run lwIP without a kernel and sockets.

They can leave out the netconn and socket files
from their build.

Bye,

Christiaan Simons

Hardware Designer
Axon Digital Design

http://www.axon.tv




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

AW: LWIP on Gigabit Ethernet MAC (raw api)

Daniel Klingler
Hi together,

relating to Christiaan's answer we can use the raw api with gigabit Ethernet
in the same way how we used it with fast Ethernet.

If anybody will see still some problems, they will answer here. In the other
case I will try it out.

Thanks for all the commentaries!

Regards,
Daniel Klingler


-----Urspr√ľngliche Nachricht-----
Von: lwip-users-bounces+daniel.klingler=[hidden email]
[mailto:lwip-users-bounces+daniel.klingler=[hidden email]] Im Auftrag
von Christiaan Simons
Gesendet: Montag, 18. September 2006 14:32
An: [hidden email]
Betreff: Re: [lwip-users] LWIP on Gigabit Ethernet MAC (raw api)


Sathya,

> Is it true that Sockets API builds on RAW API?

Yes.

> The Sockets port requires a kernel and hence this port does the same.

True except for "hence", ports generally can (and do)
make this assumption. It would be good practice to make
this clear in the port name.

E.g. the eCos port was clearly designed for a
specific  kernel in mind.  Thus apps using this port
will most likely use the socket API, though
they are not obliged to use the socket API.

Other ports like the c16x or the original 6502 do
not depend on a kernel, but may be used with it
if the user wishes todo so.

> Can you explain how the Sockets API works on RAW ?

Well I'm not an expert on the sockets thing,
but if you have a look at e.g. api_msg.c do_write()
you can clearly see a call to tcp_write() which is in turn
part of the raw-API as documented in doc/rawapi.txt

So a write on a socket eventually ends up as
a raw-API write. This isn't very clear because of
the mailbox stuff, but it actually _is_ using the raw-API.

> Although the functions for packet processing are the same at the
> ethernet level,
> the fact that there are multiple threads that are used to take care
> of packet processing,
> reading packets from ethernet and the tcpip thread which is used for
> communication
> between application and stack makes the working different unless I
> am missing something.

This separation of tasks does not separate the APIs.
The socket layer is just stacked on top of a lot of other things.
(and therefore it is quite inefficient and slow,
mainly because of overused mailboxes)

application (top)

[ sockets-API ]
[ netconn-API ]
[ lwIP core (raw-API) ]
[ netif i/o, driver  ]

network (bottom)

The raw API is just a collection of lwIP core functions.
They are always there, and always available.

>  The RAW API port always has been working based on the call backs
> being set up by the application for various stack events.

True, this is exactly what is needed by some users
that want to run lwIP without a kernel and sockets.

They can leave out the netconn and socket files
from their build.

Bye,

Christiaan Simons

Hardware Designer
Axon Digital Design

http://www.axon.tv




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users