3

I am using a managed switch (e.g. 12 port) which consists of a switch engine + MIPS CPU all on one single chip. I came across a sentence while reading the switch documentation which said to get packets in and out of CPU use the FDMA driver.

From a layman's perspective what does it mean getting packets in and out of CPU? Does that mean all packets that ingress/egress a switch typically don't go through the CPU? If true, then what are some of the cases where you need to send the packet to a CPU?

2
  • 2
    Speaking of someone who worked for an embedded systems manufacturer, in its current form this question is so vague, it's hard to answer without too many assumptions Commented Mar 10, 2014 at 23:03
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Commented Aug 8, 2017 at 16:18

2 Answers 2

5

From a layman's perspective what does it mean getting packets in and out of CPU?

A switches primary function is to efficiently switch frames as fast as possible. In order to do that, they use FIBs to sustain a high, low latency throughput rate. This is generally achieved by using CAM that operates in an ASIC (i.e. hardware).

Does that mean all packets that ingress/egress a switch typically don't go through the CPU?

Most of the time, this is accurate. But not always.

There are packets that don’t just pass through a switch, but are destined for the switch. This requires processing. SSH, SVI’s, STP, etc. all require some sort of CPU processing by the switch. Whenever a switch is tasked with scrutinizing a packet further, it’s bound to take up resources that could be used elsewhere.

what are some of the cases where you need to send the packet to a CPU?

This is highly dependent on your platform. But if it’s destined for your switch, then it’s going to require CPU processing. Routing protocols (EIGRP/OSPF), spanning-tree protocols(RSTP/MSTP), management protocols(SNMP), remote access protocols(SSH) and discovery protocols(CDP/LLDP) are a few that initially come to mind.

2

Does that mean all packets that ingress/egress a switch typically don't go through the CPU?

That is correct. The point of the switch engine is to move packets, at line rate, between the necessary ports. The CPU is only used for things the switch cannot handle, or isn't setup to handle. (IGMP join/leave, spanning tree, port aggregation, etc.)

Unless you are programming the system, you don't need to worry about any of that.

Not the answer you're looking for? Browse other questions tagged or ask your own question.