Fall 2004FSU CIS 5930 Internet Protocols1 Network Devices Reading: Chapter 5.

Slides:



Advertisements
Similar presentations
Principles of I/O Hardware I/O Devices Block devices, Character devices, Others Speed Device Controllers Separation of electronic from mechanical components.
Advertisements

Device Layer and Device Drivers
Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
Network Devices COMS W6998 Spring 2010 Erich Nahum.
Socket Programming.
CIS 235: Networks Fall, 2007 Western State College Welcome to CIS 235 Computer Networks Fall, 2007 Prof Peterson.
Chapter 14 TCP/IP and Routing Part #1 Unix System Administration.
EET 450 Chapter 2 – How hardware and Software Work Together.
Students:Gilad Goldman Lior Kamran Supervisor:Mony Orbach Mid-Semester Presentation Spring 2005 Network Sniffer.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 I/O Management in Representative Operating Systems.
Chapter 5 Input/Output I/O Hardware I/O Software Software Layers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights.
 The Open Systems Interconnection model (OSI model) is a product of the Open Systems Interconnection effort at the International Organization for Standardization.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
UART and UART Driver B. Ramamurthy.
Traffic control and Quality of Service
Real-time Systems Lab, Computer Science and Engineering, ASU Linux Input Systems (ESP – Fall 2014) Computer Science & Engineering Department Arizona State.
Lecture 12 Page 1 CS 111 Online Device Drivers and the Kernel Drivers are usually systems code But they’re not kernel code Most drivers are optional –
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-1: I/O Management Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-2: I/O Management (Review) Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2:00-3:00 PM.
Fall 2004FSU CIS 5930 Internet Protocols1 Architecture of Network Implementation Reading: Chapters 3 and 4.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
11 NETWORK CONNECTION HARDWARE Chapter 3. Chapter 3: NETWORK CONNECTION HARDWARE2 NETWORK INTERFACE ADAPTER  Provides the link between a computer and.
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.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Chapter 13: I/O Systems. 13.2/34 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware.
1 Network Administration Module 3 ARP/RARP. 2 Address Resolution The problem Physical networks use physical addresses, not IP addresses Need the physical.
An initial study on Multi Path Routing Over Multiple Devices in Linux 2.4.x kernel Towards CS522 term project By Syama Sundar Kosuri.
Chapter 2 Protocols and the TCP/IP Suite 1 Chapter 2 Protocols and the TCP/IP Suite.
Fall 2004FSU CIS 5930 Internet Protocols1 Transparent Bridges Reading: Chapter 12.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 2 How Hardware and Software Work Together.
Chapter 18 IP: Internet Protocol Addresses. Internet protocol software used to make the internet appear to be a single, seamless communication system.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Linux Operations and Administration Chapter Eight Network Communications.
Computer Studies (AL) I/O Management. Reference Silberschatz, Galvin, Gagne “Operating System Concepts 6 th edition”, 2003, Wiley Stallings, “Operating.
Transmission Control Protocol (TCP) Internet Protocol (IP)
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. Overview of Ethernet Networking A Rev /31/2011.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Chapter Overview  Network Cables  Network Interface Adapters  Network Hubs.
FSU CIS 5930 Internet Protocols
Fall 2004FSU CIS 5930 Internet Protocols1 Address Resolution Protocol (ARP) Reading: Chapter 15.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Zero-copy Receive Path in Virtio
Linux Details: Device Drivers
sudo ./snull_load Two interfaces created: sn0, sn1
Input/Output 1 1.
Understanding the OSI Reference Model
Chapter 3: Windows7 Part 4.
Introduction to Data Link Layer
I/O Systems I/O Hardware Application I/O Interface
Chapter 5: I/O Systems.
Linux Details: Device Drivers
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Ch 17 - Binding Protocol Addresses
Chapter 13: I/O Systems.
Client Communication NIC is Really The physical hardware plus
ECE 671 – Lecture 8 Network Adapters.
Memory Addresses.
Presentation transcript:

Fall 2004FSU CIS 5930 Internet Protocols1 Network Devices Reading: Chapter 5

Fall 2004FSU CIS 5930 Internet Protocols2 Network devices Interface between network adapters and software protocols Asynchronous input/output point of protocol stack

Fall 2004FSU CIS 5930 Internet Protocols3 (Network) Hardware Properties I/O ports (base address) –Address of the hardware (in I/O address space) Interrupt ReQuest (IRQ) –Informing kernel something happens at hardware DMA channel –Direct Memory Access

Fall 2004FSU CIS 5930 Internet Protocols4 Network device interface Abstract from technical details of network adapters Uniform interface for access by protocol instances –dev.c (net/core/dev.c) Providing interface/functions for upper layer –net_device structure (include/linux/netdevice.h) Hiding specific details in network drivers –xxx_driver.c (drivers/net/xxx_driver.c) Implementation of specific network drivers

Fall 2004FSU CIS 5930 Internet Protocols5 Network device interface (Cont’d) driver.c net_tx net_interrupt net_rx skb net_start_xmit net_opennet_stop net_device dev.c netif_rx dev->hard_start_xmitdev->opendev->stop dev_queue_xmit dev_opendev_close Higher protocol instances Network devices (Adapter-independent) Network-devices interface Network driver (Adapter-specifics) Abstraction from Adapter specfics

Fall 2004FSU CIS 5930 Internet Protocols6 net_device structure Defined in include/linux/netdevice.h –Abtract from network adapter specifics –Containing network adapter information –Configuration data of the adapter –General fields of a network device –Hardware-specific fields –Data on physical layer –Data on network layer –Device-driver methods/functions

Fall 2004FSU CIS 5930 Internet Protocols7 General fields of a network device Name –For example, eth0, lo ifindex State –For example, if the adapter is up qdisc –Queue discipline –How packets are served And other fields

Fall 2004FSU CIS 5930 Internet Protocols8 Hardware-specific fields rmem_start, rmem_end, mem_start, mem_end –Memory for sending/receiving packets base_addr –I/O base address irq –Interrupt ReQuest DMA channel And other fields

Fall 2004FSU CIS 5930 Internet Protocols9 Data on physical layer hard_header_length –Layer-2 packet header length mtu –Maximum transfer unit addr_len, dev_addr[MAX_ADDR_LEN] –Layer-2 address length and address And other fields

Fall 2004FSU CIS 5930 Internet Protocols10 Data on network layer ip_ptr, ip6_ptr, etc –Corresponding layer-3 pointers family –Address family, e.g., AF_INET for IP pa_alen –Address length for the family, e.g, 4 for IP pa_addr, pa_mask –Address and mask And other fields

Fall 2004FSU CIS 5930 Internet Protocols11 Device-driver methods They are function pointers. Adapter drivers need to implement and map to them Initialization/activation/de-activation –init(), destructor(), open(), close() Transmission of data –hard_start_xmit() Control functions –do_ioctl(), set_config() Helpful functions –dard_header(), hard_header_parse(), etc Other functions

Fall 2004FSU CIS 5930 Internet Protocols12 Managing Network Devices dev_base name: eth0 state next priv net_device... Hardware MAC Layer Network layer local1 private driver structure name: eth1 state next priv net_device... Hardware MAC Layer Network layer local2 private driver structure net_device open stop hard_start_xmit... adapter_open() adapter_stop() adapter_start_xmit() open stop hard_start_xmit... adapter2_open() adapter2_stop() adapter2_start_xmit()

Fall 2004FSU CIS 5930 Internet Protocols13 Functions to manage devices Registering/unregistering devices Opening/closing devices Creating/finding devices Transmitting over devices Provided in the following two files –net/core/dev.c –drivers/net/net_init.c

Fall 2004FSU CIS 5930 Internet Protocols14 Registering/unregistering devices init_netdev(dev, sizeof_priv, mask, setup) init_etherdev(dev, priv_size) ether_setup(dev) register_netdevice(dev) unregister_netdevice(dev)

Fall 2004FSU CIS 5930 Internet Protocols15 Opening/closing devices dev_open(dev) dev_close(dev)

Fall 2004FSU CIS 5930 Internet Protocols16 Creating/finding devices dev_alloc_name(dev, name) dev_alloc(name, err) dev_get_by_name(name) dev_get(name) dev_getbyhwaddr(type, ha) dev_load(name)

Fall 2004FSU CIS 5930 Internet Protocols17 Transmitting over network devices dev_queue_xmit(skb)

Fall 2004FSU CIS 5930 Internet Protocols18 Network drivers They implement adapter specific functions –Initializing adapters –Opening and closing network adapters –Transmitting/receiving data –We use sample driver isa_skeleton.c to discuss functions (drivers/net/isa_skeleton.c)

Fall 2004FSU CIS 5930 Internet Protocols19 Initializing adapters net_init()/net_probe() –netcard_probe(dev) –netcard_probe1(dev, ioaddr) Helper functions to allocate system resources –Request_region(), release_region(), check_region() –Request_irq(), free_irq() –Request_dma(), free_dma()

Fall 2004FSU CIS 5930 Internet Protocols20 Opening/closing adapters net_open(dev) net_stop(dev)

Fall 2004FSU CIS 5930 Internet Protocols21 Transmitting data net_send_packet(skb, dev) net_interrupt(irq, dev_id, regs) –net_tx(dev) –net_rx(dev) dev.c driver.c net_interrupt netif_rx net_rxnet_tx Receiving a packet Completing A transmission process net_error Errow situation

Fall 2004FSU CIS 5930 Internet Protocols22 About the project Progress, problems encountered