Broadcom Teaming Services: Broadcom NetXtreme II Network Adapter User Guidefile:///T|/htdocs/NETWORK/BroadCom/71921/NetXtremeII/en/teamsvcs.htm[9/26/2012 3:29:14 PM]performs load balancing on a TCP session basis and not on a packet-by-packet basis.In the Outbound Flow Hash Entries, statistics counters are also updated after classification. The load-balancing engine usesthese counters to periodically distribute the flows across teamed ports. The outbound code path has been designed to achievebest possible concurrency where multiple concurrent accesses to the Outbound Flow Hash Table are allowed.For protocols other than TCP/IP, the first physical adapter will always be selected for outbound packets. The exception isAddress Resolution Protocol (ARP), which is handled differently to achieve inbound load balancing.Inbound Traffic Flow (SLB Only)The Broadcom intermediate driver manages the inbound traffic flow for the SLB teaming mode. Unlike outbound loadbalancing, inbound load balancing can only be applied to IP addresses that are located in the same subnet as the load-balancing server. Inbound load balancing exploits a unique characteristic of Address Resolution Protocol (RFC0826), in whicheach IP host uses its own ARP cache to encapsulate the IP Datagram into an Ethernet frame. BASP carefully manipulates theARP response to direct each IP host to send the inbound IP packet to the desired physical adapter. Therefore, inbound loadbalancing is a plan-ahead scheme based on statistical history of the inbound flows. New connections from a client to theserver will always occur over the primary physical adapter (because the ARP Reply generated by the operating systemprotocol stack will always associate the logical IP address with the MAC address of the primary physical adapter).Like the outbound case, there is an Inbound Flow Head Hash Table. Each entry inside this table has a singly linked list andeach link (Inbound Flow Entries) represents an IP host located in the same subnet.When an inbound IP Datagram arrives, the appropriate Inbound Flow Head Entry is located by hashing the source IP addressof the IP Datagram. Two statistics counters stored in the selected entry are also updated. These counters are used in thesame fashion as the outbound counters by the load-balancing engine periodically to reassign the flows to the physicaladapter.On the inbound code path, the Inbound Flow Head Hash Table is also designed to allow concurrent access. The link lists ofInbound Flow Entries are only referenced in the event of processing ARP packets and the periodic load balancing. There is noper packet reference to the Inbound Flow Entries. Even though the link lists are not bounded; the overhead in processingeach non-ARP packet is always a constant. The processing of ARP packets, both inbound and outbound, however, depends onthe number of links inside the corresponding link list.On the inbound processing path, filtering is also employed to prevent broadcast packets from looping back through thesystem from other physical adapters.Protocol SupportARP and IP/TCP/UDP flows are load balanced. If the packet is an IP protocol only, such as ICMP or IGMP, then all data flowingto a particular IP address will go out through the same physical adapter. If the packet uses TCP or UDP for the L4 protocol,then the port number is added to the hashing algorithm, so two separate L4 flows can go out through two separate physicaladapters to the same IP address.For example, assume the client has an IP address of 10.0.0.1. All IGMP and ICMP traffic will go out the same physical adapterbecause only the IP address is used for the hash. The flow would look something like this:IGMP ------> PhysAdapter1 ------> 10.0.0.1ICMP ------> PhysAdapter1 ------> 10.0.0.1If the server also sends an TCP and UDP flow to the same 10.0.0.1 address, they can be on the same physical adapter asIGMP and ICMP, or on completely different physical adapters from ICMP and IGMP. The stream may look like this:IGMP ------> PhysAdapter1 ------> 10.0.0.1ICMP ------> PhysAdapter1 ------> 10.0.0.1TCP------> PhysAdapter1 ------> 10.0.0.1UDP------> PhysAdatper1 ------> 10.0.0.1Or the streams may look like this:IGMP ------> PhysAdapter1 ------> 10.0.0.1ICMP ------> PhysAdapter1 ------> 10.0.0.1