Subject: [forces] comments #17

From: Jamal Hadi Salim <[email-masked]>
Date: Sun, 21 Aug 2011 10:27:01 -0400

A bit long - but much easier to write it this way instead of 20 small comments:

----

Figure 1 (Section 3.2.3) shows a typical IPv4 forwarding processing
path by use of the base LFB classes.

A number of EtherPHYCop LFB(section XXX) instances are used to describe
physical layer functions of the ports. PHYPortID metadatum is
generated by EtherPHYCop LFB and is used by all the subsequent
downstream LFBs.  An EtherMACIn LFB(section XXX), which describe
the MAC layer processing, follows every EtherPHYCop LFB.
The EtherMACIn LFB may do a locality check of MAC addresses if
the CE configures the appropriate EtherMACIn LFB component.

Ethernet packets out of the EtherMACIn LFB are sent to an
EtherClassifier LFB (section XXX) to be decapsulated and classified
into network layer types like IPv4, IPv6, ARP, etc. In the example
use case, every physical Ethernet interface is associated with one Classifier
instance; although not illustrated, it is also feasible that all
physical interfaces are associated with only one Ethernet Classifier
instance.

EtherClassifier uses the PHYPortID metadatum, the Ethernet type of the
input packet, and VlanID (if present in the input Ethernet packets), to
decide the packet network layer type and the LFB output port to the
downstream LFB. The EtherClassifier LFB also assigns a new logical port
ID metadata to the packet for later use. The EtherClassifier
may also generate some new metadata for every
packet like EtherType, SrcMAC, DstMAC, LogicPortID, etc for consumption
by downstream LFBs.

If a packet is classified as an IPv4 packet, it is sent downstream to an
IPv4Validator LFB(section XXX) to validate the IPv4 packet. In the
validator LFB, IPv4 packets are validated and are additionally
classified into either IPv4 unicast packets and multicast packets.
IPv4 unicast packets are sent to downstream to the IPv4UcastLPM
LFB(section XXX).

The IPv4UcastLPM LFB is where the longest prefix match decision is made,
and a next hop selection is selected. The nexthop ID metadata is
generated by the IPv4UcastLPM LFB to be consumed downstream
by the IPv4NextHop LFB(section XXX).

The IPv4NextHop LFB uses the nexthop ID metadata to do derive
where the packet is to go next and the media encapsulation type for
the port, etc. The IPv4NextHop LFB generates the L3PortID metadata
used to identify a next hop output physical/logical port.
In the example use case, the next hop output port is an Ethernet type;
as a result, the packet and its L3 port ID metadatum are sent downstream
to an EtherEncap LFB(section XXX).

The EtherEncap LFB encapsulates the incoming packet into an Ethernet frame.
A BasicMetadataDispatch LFB (section XXX) follows the EtherEncap LFB.

The BasicMetadataDispatch LFB is where packets are finally dispatched to
different output physical/logical ports abased on the L3PortID metadatum
sent to the LFB.
------

cheers,
jamal