EmbeddedRelated.com
Forums

TCP/IP software overhead ?

Started by Anton Erasmus January 30, 2005
Nayanip wrote:
> Hello, > I happened to see this thread only today and therefore a very belated > query. I am currently developing firmware for networking application. > For small to medium LAN networks, only hubs are used and thefore the > traffic not meant is also sent on the copper. How to filter this > unwanted packets without the processor spending its resources, which > will contribute to processor overhead? I some times keep wondering > the very purpose of MAC address, if all the data gets into the > receive buffer? > > Any comments will be highly appreciated. Thank you. > > Nayani P >
Please get a book on TCP/IP protocols. My favourite is: W. Richard Stevens, TCP/IP Illustrated, Volume 1, The Protocols. If the data link is Ethernet (or some similar LAN), the frames are sent with MAC addresses. The receiving interface chip will pick only those packets intended for it (own MAC or local broadcast), so no CPU overhead is associated with it. There is a small overhead in translating the IP addresses to MAC addresses at the start of a packet interchange. This is taken care of by the ARP (Address Resolution Protocol). HTH -- Tauno Voipio tauno voipio (at) iki fi
Nayanip <nps@spectrasmart-dot-com.no-spam.invalid> wrote:

> For small to medium LAN networks, only hubs are used
I'm reasonably sure that's not any longer the case. Even 5-node home networks tend to have a switch in the center, these days. Nobody in their right mind would try to build a 'medium' LAN using only hubs anymore. Nobody ever should have.
> I some times keep wondering the very purpose of MAC address, if all > the data gets into the receive buffer?
No need to wonder --- because it doesn't. Not into the buffer your CPU has to worry about, anyway. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Nayanip wrote:
> For small to medium LAN networks, only hubs are used and thefore the > traffic not meant is also sent on the copper. How to filter this > unwanted packets without the processor spending its resources, which > will contribute to processor overhead?
In the datasheet for your Ethernet controller: * Find the field for MAC address - fill it in. * Find a flag for promiscuous mode - turn it off. * Find the multicast mask - you can typically disable all of them. * Find the broadcast flag - enable it (or you won't get ARPs). The Ethernet driver should then see only traffic to your MAC, or to the broadcast address (which may still require a lot of discards; broadcasts will arrive regardless of hub vs. switch)
Hello

Thank you very much (Tauno Voipio, Richard. H, Hans etc.) for the ver
valuable information. Will try to get the suggested book.

Regard
Nayan