Exploring a modern NIC An introduction to programming the Intel 82573L gigabit ethernet network interface controller.

Slides:



Advertisements
Similar presentations
Data Link Layer B. Konkoth. PDU  Protocol Data Unit  A unit of data which is specified in a protocol of a given layer  Layer 5, 6, 7 – Data  Layer.
Advertisements

Ethernet “dominant” LAN technology: cheap $20 for 100Mbs!
Dr A Sahu Dept of Comp Sc & Engg. IIT Guwahati. PCI Devices NIC Cards NIC card architecture Access to NIC register – PCI access.
The RealTek interface Introduction to the RTL-8139 network controller registers.
A look at memory issues Data-transfers must occur between system memory and the network interface controller.
1 Chapter 9 Computer Networks. 2 Chapter Topics OSI network layers Network Topology Media access control Addressing and routing Network hardware Network.
CCNA 1 v3.1 Module 6 Review. 2 What 3 things happen on an Ethernet network after a collision occurs? A backoff algorithm is invoked and transmission is.
t Popularity of the Internet t Provides universal interconnection between individual groups that use different hardware suited for their needs t Based.
Internetworking School of Business Eastern Illinois University © Abdou Illia, Spring 2007 (Week 4, Tuesday 1/30/2007)
TDC 461 Basic Communications Systems Local Area Networks 29 May, 2001.
Detecting PCI devices On identifying the peripheral equipment installed in our PC.
Chapter 15: LAN Systems Business Data Communications, 4e.
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
Service Providers & Data Link & Physical layers Week 4 Lecture 1.
LAN Risanuri Hidayat. LAN-Local Area Network A LAN is a high-speed data network that covers a relatively small geographic area. It typically connects.
What’s needed to transmit? A look at the minimum steps required for programming our anchor nic’s to send packets.
Understanding Networks II. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
Module 6 Chapter 5. Ethernet Ethernet is now the dominant LAN technology in the world. Ethernet is not one technology but a family of LAN technologies.
Accessing the NIC A look at the mechanisms that software can use to interact with our 82573L network interface.
Understanding Network Architecture Access Methods –CSMA/CD Carrier Sense Multiple Access/Collision Detect –CSMA/CA Carrier Sense Multiple Access/Collision.
1 LAN Topologies, Access methods (Week 1, Wednesday 1/10/2007) © Abdou Illia, Spring 2007.
COMPUTER NETWORKS.
CCNA 1 Module1. Objectives Internet Connections Physical – NIC card to connect to local net Logical – Use a standard set of protocols (TCP/IP) Applications.
1 Computer Networks Course: CIS 3003 Fundamental of Information Technology.
Connecting LANs, Backbone Networks, and Virtual LANs
Thin Ethernet (10B2 / IEEE 802.3a) Segment length 0.5 m Up to 30 attached nodes Cable flexible and cheap Integrated or external transceiver connected via.
Enhanced CSMA Additional improvement  Use CSMA access  Listen while transmitting  Stop immediately if collision sensed  Called collision detection.
Chapter 6 High-Speed LANs Chapter 6 High-Speed LANs.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 17.
SIMS-201 Computer Networks. 2 Introduction to Computer Networks Chapter 19 The Local Area Network  Overview.
1 Chapter 2: LAN Standards, Physical Connectivity, and Media Access.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
1 LAN Technologies and Network Topology. 2 Direct Point-to-Point Communication.
1 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network Waleed Ejaz
Basic LAN techniques IN common with all other computer based systems networks require both HARDWARE and SOFTWARE to function. Networks are often explained.
Introduction network Protocol
Local Area Network Daniel Shin CS 147, Section 3 November 18, 2008.
Logical & Physical Topologies A logical technology is how the hosts are connected logically example token Ring can be laid out in a physical star but.
Access to Shared Media - Media Access Control protocols RD-CSY10171.
11 NETWORK CONNECTION HARDWARE Chapter 3. Chapter 3: NETWORK CONNECTION HARDWARE2 NETWORK INTERFACE ADAPTER  Provides the link between a computer and.
CCNA 3 Week 4 Switching Concepts. Copyright © 2005 University of Bolton Introduction Lan design has moved away from using shared media, hubs and repeaters.
Data Link Layer Moving Frames. Link Layer Protocols: ethernet, wireless, Token Ring and PPP Has node-to-node job of moving network layer.
Cisco 3 – Switching Concepts Perrine. J Page 16/1/2016 Module 4 The use of bridges and switches for segmentation results in ____? 1.Multiple broadcast.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 3 v3.0 Module 4 Switching Concepts.
Networks and Protocols CE Week 2b. Topologies, CSMA/CD, CSMA/CA.
Version 4.0 Ethernet Network Fundamentals – Chapter 9 Sandra Coleman, CCNA, CCAI.
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.
Day10 LAN. Why? Allow more than one machine to share –Resources –Internet connectivity –Information.
LAN Switching and Wireless Basic Switch Concepts and Configuration.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
Networks. Ethernet  Invented by Dr. Robert Metcalfe in 1970 at Xerox Palo Alto Research Center  Allows group of computers to communicate in a Local.
Ch 13. Wired LANs: Ethernet IEEE Standards Project 802 launched in 1985 – To set standards to enable intercommunication among equipment from a variety.
Ethernet Overview it the IEEE standard for Ethernet.
IEEE 802.X Standards The Institute of Electrical and Electronics Engineers (IEEE) has developed a series of networking standards to ensure that networking.
Programmable Logic Controllers LO1: Understand the design and operational characteristics of a PLC system.
Local-Area Networks. Topology Defines the Structure of the Network – Physical topology – actual layout of the wire (media) – Logical topology – defines.
Internetworking School of Business Eastern Illinois University © Abdou Illia, Spring 2016 (February 3, 2016)
CCNA3 Module 4 Brierley Module 4. CCNA3 Module 4 Brierley Topics LAN congestion and its effect on network performance Advantages of LAN segmentation in.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 6 Ethernet Fundamentals.
CCNA3 v3 Module 4 v3 CCNA 3 Module 4 JEOPARDY K. Martin.
Chapter Objectives After completing this chapter you will be able to: Describe in detail the following Local Area Network (LAN) technologies: Ethernet.
Local Area Networks: Topologies. 2 Packet Identification & MAC Addresses Each packet specifies an intended recipient with an identifier. – Demultiplexing.
COMPUTER NETWORKS Lecture-8 Husnain Sherazi. Review Lecture 7  Shared Communication Channel  Locality of Reference Principle  LAN Topologies – Star.
SIMS-201 Computer Networks.
Network Protocols.
Local Area Networks: Topologies
LAN Risanuri Hidayat.
CCNA 1 v3 JEOPARDY Module 6 CCNA1 v3 Module 6 K. Martin.
SIMS-201 Computer Networks.
Presentation transcript:

Exploring a modern NIC An introduction to programming the Intel 82573L gigabit ethernet network interface controller

Token Ring host-1host-2host-3host-4 Token Ring Media Access Unit Technology developed by IBM in the 1960s

Ethernet Technology designed by Bob Metcalf in 1973

Ethernet LAN host-1host-2host-3 host-4 HUB “Collision Domain” CSMA/CD = “Carrier Sense Multiple Access/Collision Detection”

Ethernet Versus Token Ring ETHERNET Ethernet is the most widely used data sending protocol. Each computer listens to the cable before sending data over the network. If the network is clear, the computer will transmit. If another PC is already transmitting data, the computer will wait and try again when the line is clear. If two computers transmit at the same time a collision occurs. Each computer then waits a random amount of time before attempting to retransmit. The delay caused by collisions and retransmitting is minimal and does not normally affect the speed of transmission on the network. TOKEN RING The Token Ring protocol was developed by IBM but it has become obsolete in the face of ethernet technology. The computers are connected so that data travels around the network from one computer to another in a logical ring. If a computer does not have information to transmit, it simply passes the a token on to the next workstation. If a computer wishes to transmit and receives an empty token, it attaches data to the token. The token then proceeds around the ring until it comes to the computer for which the data is meant. Posted by Heather C Moll (Last Updated March )

D-Link 24-port GbE Switch Switched hub implements ‘store-and-forward’ technology

Our ‘anchor’ cluster D-Link 24-port 10/100/1000-Mbps Ethernet Switched Hub computer science department’s Local Area Network anchor00 anchor01 anchor02 anchor03 anchor04 anchor05 anchor06 anchor07

Acronyms PCI = Peripheral Component Interconnect MAC = Media Access Controller Phy = Physical-layer functions AMT = Active Management Technology LOM = LAN On Motherboard BOM = Bill Of Materials

Hardware Features 32K configurable RX and TX packet FIFO IEEE 802.3x Flow Control support Host-Memory Receive Buffers 16K/256K IEEE 802.3ab Auto-Negotiation TCP/UDP checksum off-loading Jumbo-frame support (up to 16KB) Interrupt-moderation controls

External Architecture PCI/PCI-e Bus 10/100/1000 PHY MAC/Controller MDI interface SM Bus interface EEPROM Flash interface LED indicators S/W Defined pins GMII/MII interface MDIO interface

Access to PRO/1000 registers Device registers are hardware mapped to a range of addresses in physical memory You obtain the location (and the length) of this memory-range from a BAR register in the nic device’s PCI Configuration Space Then you request the Linux kernel to setup an I/O ‘remapping’ of this memory-range to ‘virtual’ addresses within kernel-space

i/o-memory remapping dynamic ram nic registers vram IO-APIC Local-APIC user space APIC registers kernel code/data nic registers vram ‘virtual’ address-spacephysical address-space 1-GB 3-GB

portability syntax Linux provides device-driver writers with some macros for accessing i/o-memory: #include unsigned int datum; iowrite32( datum, address ); datum = ioread32( address );

module_init() #include #define E1000_STATUS0x0008 unsigned int iomem_base, iomem_size; void *io; // remap the device’s i/o-memory into kernel space devp = pci_get_device( VENDOR_ID, DEVICE_ID, NULL ); if ( !devp ) return –ENODEV; iomem_base = pci_resource_start( devp, 0 ); iomem_size = pci_resource_len( devp, 0 ); io = ioremap_nocache( iomem_base, iomem_size ); if ( !io ) return –ENOSPC; // read and display the nic’s STATUS register device_status = ioread32( io + E1000_STATUS ); printk( “ Device Status Register = 0x%08X \n”, status );

0 Device Status (0x0008) ? GIO Master EN PHY reset ASDV ILOSILOS SLUSLU 0 TX OFF 0 FDFD Function ID LULU SPEED FD = Full-Duplex LU = Link Up TXOFF = Transmission Paused SPEED (00=10Mbps,01=100Mbps, 10=1000Mbps, 11=reserved) ASDV = Auto-negotiation Speed Detection Value 82573L some undocumented functionality?

Confusion in vendor’s manual? The manual shows Device Status as a ‘read-only’ register, but later on it states that bit #10 “is cleared by writing 0b to it.” Bit #31 in Device Status register is marked ‘reserved’ in the Developer’s Manual (with initial value shown as ‘0’), but we observe it’s value being ‘1’ on ‘anchor’ machines Do these represent errata? omissions?

Quotation Many companies do an excellent job of providing information to help customers use their products... but in the end there's no substitute for real-life experiments: putting together the hardware, writing the program code, and watching what happens when the code executes. Then when the result isn't as expected -- as it often isn't -- it means trying something else or searching the documentation for clues. -- Jan Axelson, author, Lakeview Research (1998)

Development Tool Our ‘igbe.c’ module creates a pseudo-file that shows register-values of importance in receiving and transmitting data-packets using the Intel GigaBit Ethernet controller Can be useful for debugging device-driver software – and for gaining insights about confusing issues in the vendor’s manual

In-class exercise Experiment with writing all 0’s into the nic’s Device Status register, and see if values of any bits actually get changed; then also try writing all 1’s into this register, in order to discover which bits indeed are “read-only” You can use our ‘gbstatus.c’ module as a starting-point for these experimentations