Hardware Reference
In-Depth Information
length, so determining the destination network number is nontrivial
and made worse by the fact that multiple matches are possible and the
longest one counts. Often a custom ASIC is used in this step.
6. Route lookup. Once the number of the destination network is
known, the outgoing line to use can be looked up in a table in the
SRAM. Again, a custom ASIC may be used in this step.
7. Fragmentation and reassembly. Programmers like to present large
payloads to the TCP layer to reduce the number of system calls need-
ed, but TCP, IP, and Ethernet all have maximum sizes for the packets
they can handle. As a consequence of these limits, payloads and
packets may have to be fragmented at the sending side and the pieces
reassembled at the receiving side. These are tasks the network proc-
essor can perform.
8. Computation. Heavy-duty computation on the payload is sometimes
required, for example, data compression/decompression and en-
cryption/decryption. These are tasks a network processor can per-
form.
9. Header management. Sometimes headers have to be added, re-
moved, or have some of their fields modified. For example, the IP
header has a field that counts the number of hops the packet may yet
make before being discarded. Every time it is retransmitted, this field
must be decremented, something the network processor can do.
10. Queue management. Incoming and outgoing packets often have to
be queued while waiting their turn at being processed. Multimedia
applications may need a certain interpacket spacing in time to avoid
jitter. A firewall or router may need to distribute the incoming load
among multiple outgoing lines according to certain rules. All of these
tasks can be done by the network processor.
11. Checksum generation. Outgoing packets need to be checksummed.
The IP checksum can be generated by the network processor, but the
Ethernet CRC is generally computed by hardware.
12. Accounting. In some cases, accounting for packet traffic is needed,
especially when one network is forwarding traffic for other networks
as a commercial service. The network processor can do the ac-
counting.
13. Statistics gathering. Finally, many organizations like to collect
statistics about their traffic. They want to know how many packets
came and and how many went out, at what times of day, and more.
The network processor is a good place to collect them.
 
Search WWH ::




Custom Search