Hardware ‘flow control’ How we can activate our NIC’s ability to avoid overwhelming the capacities of its ‘link partner’

Slides:



Advertisements
Similar presentations
Configuring Transparent Bridging and Integrated Routing and Bridging
Advertisements

1 SpaceWire Update NASA GSFC November 25, GSFC SpaceWire Status New Link core with split clock domains complete (Much faster) New Router core.
More 82573L details Getting ready to write and test a character-mode device-driver for our anchor-LAN’s ethernet controllers.
Fixing some driver problems Most software is discovered to have some ‘design-flaws’ after it has been put into use for awhile.
Receiver ‘packet-splitting’
Virtual Local Area Networks A look at how the Intel 82573L nic supports IEEE standard 802.1q for ethernet VLANs.
What’s needed to receive? A look at the minimum steps required for programming our 82573L nic to receive packets.
1 Fall 2005 Hardware Addressing and Frame Identification Qutaibah Malluhi CSE Department Qatar University.
1 Version 3.0 Module 6 Ethernet Fundamentals. 2 Version 3.0 Why is Ethernet so Successful? In 1973, it could carry data at 3 Mbps Now, it can carry data.
Hardware-address filtering How can we send packets to just one node on our ‘anchor’ cluster?
The RealTek interface Introduction to the RTL-8139 network controller registers.
Exploring a modern NIC An introduction to programming the Intel 82573L gigabit ethernet network interface controller.
82573L Initializing our Pro/1000. Chicken-and-Egg? We want to create a Linux Kernel Module that can serve application-programs as a character-mode device-driver.
RTL-8139 experimentation Setting up an environment for studying the Network Controller.
Computer Network 實踐資管 Wang-Jiunn Cheng 2004 PART IV-2 Local Area Networks (LANs) Frame.
Examining network packets Information about the RTL8139 needed for understanding our ‘watch235.c’ pseudo driver.
Our ‘recv1000.c’ driver Implementing a ‘packet-receive’ capability with the Intel 82573L network interface controller.
The hardware ringbuffer Understanding the RTL-8139 mechanism for packet reception.
Our ‘xmit1000.c’ driver Implementing a ‘packet-transmit’ capability with the Intel 82573L network interface controller.
Our ‘nic.c’ module We create a ‘character-mode’ device-driver for the 82573L NIC to use in futrure experiments.
Basic Input/Output Operations
Our ‘nic.c’ module We create a ‘character-mode’ device-driver for the 82573L NIC to use in future experiments.
What’s needed to transmit? A look at the minimum steps required for programming our 82573L nic to send packets.
Adjusting out device-driver Here we complete the job of modifying our ‘nicf.c’ Linux driver to support ‘raw’ packet-transfers.
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
What’s needed to transmit? A look at the minimum steps required for programming our anchor nic’s to send packets.
CS335 Networking & Network Administration Tuesday, April 13, 2010.
Hardware-address filtering How can we send packets to just one node on our ‘anchor’ cluster?
What’s needed to receive? A look at the minimum steps required for programming our anchor nic’s to receive packets.
Layer 2 Switch  Layer 2 Switching is hardware based.  Uses the host's Media Access Control (MAC) address.  Uses Application Specific Integrated Circuits.
1-1 Ethernet Ethernet Controller How do you interface with an Ethernet PHY?
CSC 311 IEEE STANDARD ETHERNET Common Bus topology Uses CSMA/CD Named after “ether”, the imaginary substance many once believed occupied all of space.
Ethernet, MAC podvrstva
Packet Transmission (Part III) Local Area Networks (LANs)
Brierley 1 Module 4 Module 4 Introduction to LAN Switching.
1 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network Waleed Ejaz
© 2002, Cisco Systems, Inc. All rights reserved..
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
S3C2 – LAN Switching Addressing LAN Problems. Congestion is Caused By Multitasking, Faster operating systems, More Web-based applications Client-Server.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
© 2004, The Technology Firm Ethertype 886 from the Intel website Probe Packets and Settings AFT and ALB teams use probe packets. Probes.
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
NS Training Hardware.
Cisco 3 - Switching Perrine. J Page 16/4/2016 Chapter 4 Switches The performance of shared-medium Ethernet is affected by several factors: data frame broadcast.
Chapter Six The Data Link Layer. Objectives Learn about physical addressing on the network. Explore the MAC and LLC sublayers of Data Link. Get introduced.
Copyright 2008 Kenneth M. Chipps Ph.D. Controlling Flow Last Update
1 Ch 9 Hardware Addressing and Frame Type Identification.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 3 v3.0 Module 9 Virtual Trunking Protocol.
CEN 5501C - Computer Networks - Spring UF/CISE - Newman1 Computer Networks Chapter 5 – Hubs, Switches, VLANs, Fast Ethernet.
Copyright Kenneth M. Chipps Ph.D. Ethernet Frame Format Last Update
Ch 13. Wired LANs: Ethernet IEEE Standards Project 802 launched in 1985 – To set standards to enable intercommunication among equipment from a variety.
1 Hardware Addressing and Frame Type Identification.
Optimization Problems in Wireless Coding Networks Alex Sprintson Computer Engineering Group Department of Electrical and Computer Engineering.
CCNA3 Module 4 Brierley Module 4. CCNA3 Module 4 Brierley Topics LAN congestion and its effect on network performance Advantages of LAN segmentation in.
Renesas Electronics America Inc. RX Ethernet Peripheral © 2011 Renesas Electronics America Inc. All rights reserved A Rev /16/2011.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015.
Introduction to Ethernet In 1985, the Institute of Electrical and Electronics Engineers (IEEE) published standards for LANs. These standards start with.
COMPUTER NETWORKS Lecture-8 Husnain Sherazi. Review Lecture 7  Shared Communication Channel  Locality of Reference Principle  LAN Topologies – Star.
Exploration 3 Chapter 4. What is VTP? VTP allows a network manager to configure a switch so that it will propagate VLAN configurations to other switches.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 8 TCP/IP Suite Error and Control Messages.
Protocols and layering Network protocols and software Layered protocol suites The OSI 7 layer model Common network design issues and solutions.
Local Area Networks: Topologies
Configuring EtherChannels and Switch Troubleshooting
Routing and Switching Essentials v6.0
© 2002, Cisco Systems, Inc. All rights reserved.
© 2002, Cisco Systems, Inc. All rights reserved.
Reliable transmission
Protocol layering and data
Protocol layering and data
Presentation transcript:

Hardware ‘flow control’ How we can activate our NIC’s ability to avoid overwhelming the capacities of its ‘link partner’

Our ‘txburst.c’ demo This module is intended to let us explore a problem that can arise in using our ‘nic.c’ character-mode device-driver It lets the user trigger the transmission of multiple ethernet-packets in a single ‘burst’ When using the ‘cat’ command, our ‘nic.c’ device-driver cannot seem to keep up with the amount of arriving packet-data

In-class demonstration Install ‘nic.ko’ on one of our anchor-cluster machines and execute the ‘cat’ command: $ cat /dev/nic Compile our ‘txburst.c’ module and install it on another of the anchor-cluster stations, then execute the following ‘cat’ command: $ cat /proc/txburst Timeout for this classroom demonstration

Some packets got ‘lost’ The burst of packets being transmitted are arriving too rapidly for our device-driver to service all of them – hence ‘lost’ packets! Modern ethernet controllers (like 82573L) offer a convenient way for the hardware to assist a device-driver in overcoming this ‘data-congestion’ problem It’s an IEEE ‘flow control’ standard

How it works An Overview of the IEEE Flow Control Sequence Courtesy of Cisco Systems Documentation online

Format a of PAUSE frame C source MAC-address delay-time frame checksum a special reserved multicast-address a special reserved frame Type the standard ‘pause’ opcode the desired maximum duration of the ‘pause’ (expressed in 512 ‘bit-times’)

Automatic XOFF/XON In principle it would be possible for the device-driver programmer to include code that would transmit a PAUSE frame But it’s much simpler to just delegate that functionality to the network hardware and avoid consuming CPU-time setting it up The 82573L makes it easy for a driver to “turn on” the ‘flow control’ mechanism

The ‘Flow Control’ registers enum{ E1000_FCAL= 0x0028,// Flow Control Address Low E1000_FCAH= 0x002C,// Flow Control Address High E1000_FCT= 0x0030,// Flow Control frame Type E1000_FCTTV= 0x0170,// Flow Control Tx Timer Value E1000_FCRTL= 0x2160,// Flow Control Rx Threshold Low E1000_FCRTH= 0x2168,// Flow Control Rx Threshold High };

Packet Buffer Allocation Receive FIFO 32-KB FIFO Transmit FIFO 000C 0014 PBA = the default allocation 20-KB for TX 12-KB for RX FCRXH FCRXL when space consumed in the Rx FIFO reaches the high-water mark, the NIC transmits an XOFF frame to PAUSE any further reception until some data drains from the FIFO enough that the space consumed drops beneath the low-water, at which time the NIC transmits an XON frame to request its Link-Partner to RESUME sending packets

Programming details # setting up the 82573L Flow Control registers iowrite32( 0x00C28001, io + E1000_FCAL ); iowrite32( 0x , io + E1000_FCAH ); iowrite32( 0x , io + E1000_FCT ); iowrite32( 0x , io + E1000_FCTTV ); iowrite32( 0x800047F8, io + E1000_FCRTL ); iowrite32( 0x , io + E1000_FCRTH );

The ‘Flow Control’ statistics enum{ E1000_XONRXC= 0x4048,// XON Received Count E1000_XONTXC = 0x404C,// XON Transmitted Count E1000_XOFFRXC= 0x4050,// XOFF Received Count E1000_XOFFRXC= 0x4054,// XOFF Transmitted Count };

Device Control (0x0000) PHY RST VME R =0 TFCERFCE RST R =0 R =0 R =0 R =0 R =0 ADV D3 WUC R =0 D/UD status R =0 R =0 R =0 R =0 R =0 FRC DPLX FRC SPD R =0 SPEED R =0 SLUSLU R =0 R =0 R =1 0 FDFD GIO M D R = FD = Full-DuplexSPEED (00=10Mbps, 01=100Mbps, 10=1000Mbps, 11=reserved) GIOMD = GIO Master DisableADVD3WUP = Advertise Cold Wake Up Capability SLU = Set Link UpD/UD = Dock/Undock statusRFCE = Rx Flow-Control Enable FRCSPD = Force SpeedRST = Device ResetTFCE = Tx Flow-Control Enable FRCDPLX = Force DuplexPHYRST = Phy ResetVME = VLAN Mode Enable 82573LWe used 0x040C0241 to initiate a ‘device reset’ operation

Receive Control (0x0100) R =0 00 FLXBUF SE CRC BSEX R =0 PMCF DPF R =0 CFI EN VFE BSIZE BAMBAM R =0 MODTYPRDMTS ILOSILOS SLUSLU LPEUPE 0 R = SBP ENEN LBMMPE EN = Receive Enable DTYP = Descriptor TypeDPF = Discard Pause Frames SBP = Store Bad Packets MO = Multicast OffsetPMCF = Pass MAC Control Frames UPE = Unicast Promiscuous Enable BAM = Broadcast Accept ModeBSEX = Buffer Size Extension MPE = Multicast Promiscuous Enable BSIZE = Receive Buffer SizeSECRC = Strip Ethernet CRC LPE = Long Packet reception Enable VFE = VLAN Filter EnableFLXBUF = Flexible Buffer size LBM = Loopback ModeCFIEN = Canonical Form Indicator Enable RDMTS = Rx-Descriptor Minimum Threshold SizeCFI = Canonical Form Indicator bit-value We used 0x E in RCTL to prepare the ‘receive engine’ for flow control

Transmit Control (0x0400) R =0 R =0 R =0 MULRTXCSCMT UNO RTX RTLC R =0 SW XOFF COLD (upper 6-bits) (COLLISION DISTANCE) COLD (lower 4-bits) (COLLISION DISTANCE) 0ASDV ILOSILOS SLUSLU TBI mode PSPPSP 0 R = R =0 ENEN SPEED CT (COLLISION THRESHOLD) EN = Transmit EnableSWXOFF = Software XOFF Transmission PSP = Pad Short PacketsRLTC = Retransmit on Late Collision CT = Collision Threshold (=0xF)UNORTX = Underrun No Re-Transmit COLD = Collision Distance (=0x3F)TXCSCMT = TxDescriptor Minimum Threshold MULR = Multiple Request Support 82573L We used 0x0103F0F8 in TCTL to setup the ‘transmit engine’ before enabling it

Our ‘txburst.c’ again The statement that enables flow control in the Device Control register originally was “commented out” for our earlier demo Now we restore that statement as part of the executable code during initialization This time we observe a different effect! Timeout for this second classroom demonstration

In-class exercise #1 Can you reduce the value in the FCTTV- register (to PAUSE for a briefer time) and still avoid losing any transmitted packets? How small can FCTTV be?

In-class exercise #2 Is it necessary to turn on BOTH of the bits in the Device Control register that enable the controller’s hardware flow control? –The RFCE-bit (bit 23) –The TFCE-bit (bit 24)

In-class exercise #3 Must the ‘receive’ engine be enabled? Must the PMCF-bit (bit #23) be turned on in the RCTL register? PMCF = Pass MAC Control Frames Could the DPF-bit (bit 324) be turned on? DPF = Drop PAUSE Frames

Out-of-class exercise Can you design module-code that would demonstrate the use of the SWXOFF-bit (bit #22) in the Transmit Control register?