Receiver ‘packet-splitting’

Slides:



Advertisements
Similar presentations
What is a packet checksum? Here we investigate the NIC’s capabilities for computing and detecting errors using checksums.
Advertisements

IPv6. Major goals 1.support billions of hosts, even with inefficient address space allocation. 2.reduce the size of the routing tables. 3.simplify the.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Utilizing NIC’s enhancements A look at how driver software needs to change when using newer features of our hardware.
Chapter 4 Conventional Computer Hardware Architecture
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.
Offloading TCP Segmentation Using Context Descriptors lets a driver offload ‘TCP Segmentation’ as well as checksum calculations.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 TCP/IP Stack Introduction: Looking Under the Hood! Shiv Kalyanaraman Rensselaer Polytechnic Institute.
Network Layer Packet Forwarding IS250 Spring 2010
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.
Hardware-address filtering How can we send packets to just one node on our ‘anchor’ cluster?
RTL-8139 experimentation Setting up an environment for studying the Network Controller.
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.
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.
Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if.
Adjusting out device-driver Here we complete the job of modifying our ‘nicf.c’ Linux driver to support ‘raw’ packet-transfers.
Students:Gilad Goldman Lior Kamran Supervisor:Mony Orbach Mid-Semester Presentation Spring 2005 Network Sniffer.
Checksum ‘offloading’ A look at how the Pro1000 NICs can be programmed to compute and insert TCP/IP checksums.
ARP Request/Reply Can we modify our previous device-driver so it will allow us to send and receive ‘raw’ packets?
What’s needed to transmit? A look at the minimum steps required for programming our anchor nic’s to send packets.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Anush Rengarajan Feng Zheng Thomas Madaelil
A ‘segmentation’ exercise What changes to our ‘segment.c’ device-driver module are needed for offloading of ‘UDP Segmentation’?
What’s needed to receive? A look at the minimum steps required for programming our anchor nic’s to receive packets.
Building TCP/IP packets A look at the computation-steps which need to be performed for utilizing the TCP/IP protocol.
The ‘zero-copy’ initiative A look at the ‘zero-copy’ concept and an x86 Linux implementation for the case of outgoing packets.
1 K. Salah Module 4.3: Repeaters, Bridges, & Switches Repeater Hub NIC Bridges Switches VLANs GbE.
Internet Protocol (IP)
High Performance User-Level Sockets over Gigabit Ethernet Pavan Balaji Ohio State University Piyush Shivam Ohio State University.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
LWIP TCP/IP Stack 김백규.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting.
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.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Queues, Pipes and Sockets. QUEUE A structure with a series of data elements with the first element waiting for an operation Used when an element is not.
1 DSP handling of Video sources and Etherenet data flow Supervisor: Moni Orbach Students: Reuven Yogev Raviv Zehurai Technion – Israel Institute of Technology.
Virtual Machine Queue Driver Development Sambhrama Mundkur Sr. Software Design Engineer Core Networking
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.
1 Kyung Hee University Chapter 8 ARP(Address Resolution Protocol)
6-1 Infineon 167 Interrupts The C167CS provides 56 separate interrupt sources that may be assigned to 16 priority levels. The C167CS uses a vectored interrupt.
EECB 473 Data Network Architecture and Electronics Lecture 1 Conventional Computer Hardware Architecture
PLUS 내부 세미나 1/22 The Libnet Library 이병영 2004/05/06.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
IP - Internet Protocol No. 1  Seattle Pacific University IP: The Internet Protocol Kevin Bolding Electrical Engineering Seattle Pacific University.
© 2003, Cisco Systems, Inc. All rights reserved.
IP Fragmentation. MTU Maximum Transmission Unit (MTU) –Largest IP packet a network will accept –Arriving IP packet may be larger IP Packet MTU.
Lecture 3 By Miss Irum Matloob.
Reference Router on NetFPGA 1G
Internet Protocol (IP)
Help! Tell me about Computer Data!
Chapter 20 Network Layer: Internet Protocol
Network Core and QoS.
Implementing an OpenFlow Switch on the NetFPGA platform
Chapter 20. Network Layer: IP
Reference Router on NetFPGA 1G
Who’s listening? Some experiments with an ‘echo’ service on our anchor-cluster’s local network of 82573L nic’s.
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Network Core and QoS.
Presentation transcript:

Receiver ‘packet-splitting’ A look at how a driver can cause the 82573L NIC to separate a packet’s headers from its data

NIC can do packet-parsing Intel’s newest gigabit Ethernet controllers offer an enhancement to the ‘extended’ Receive Descriptor, called ‘packet-split’ format, which empowers the hardware to recognize the packet ‘headers’ used with the most common network protocols and to automatically separate those headers from their accompanying packet ‘data’

‘Extended’ RX-Descriptors CPU writes this, NIC reads it: NIC writes this, CPU reads it: Base-address (64-bits) Packet- checksum IP identification MRQ (multiple receive queues) reserved (=0) VLAN tag Packet- length Extended errors Extended status The device-driver initializes the ‘base-address’ field with the physical address of a packet-buffer, and it initializes the ‘reserved’ field with a zero-value… … the network hardware will later modify both fields The network controller will ‘write-back’ the values for these fields when it has transferred a received packet’s data into the packet-buffer

‘Packet-Split’ RX-Descriptors CPU writes this, NIC reads it: NIC writes this, CPU reads it: Base-address 0 (64-bits) Packet- checksum IP identification MRQ (multiple receive queues) Base-address 1 (64-bits) VLAN tag Packet- Length 0 Extended errors Extended status Base-address 2 (64-bits) Packet Length 3 Packet Length 2 Packet Length 1 S P Header Length Base-address 3 (64-bits) reserved 1 The network controller will ‘write-back’ values to these fields when it has transferred a received packet’s data into those packet-buffers The device-driver initializes four ‘base-address’ fields (‘even-numbered’ addresses)

Same ‘Extended’ Status/Errors 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 A C K U D P V I P V P I F I P C S T C P S U D P C S V P I X S M E O P D 11 10 9 8 7 6 5 4 3 2 1 0 RXE IPE TCPE SEQ SE CE

Syntax modifications for ‘fetch’ typedef struct { unsigned long long base_addr0; unsigned long long base_addr1; unsigned long long base_addr2; unsigned long long base_addr3; } RX_DESC_FETCH;

Syntax modifications for ‘store’ typedef struct { unsigned int mrq; unsigned short ip_identification; unsigned short packet_chksum; unsigned int desc_status:20; unsigned int desc_errors:12; unsigned short packet_length0; unsigned short vlan_tag; unsigned short header_length; unsigned short packet_length1; unsigned short packet_length2; unsigned short packet_length3 unsigned long long reserved; } RX_DESC_STORE;

Same syntax for the ‘union’ typedef union { RX_DESC_FETCH rxf; RX_DESC_STORE rxs; } RX_DESCRIPTOR;

NIC Registers involved 31 10 0 D T Y P RCTL Device Control register 31 15 0 Reserved (=0) E X T N RFCTL Receive Filter Control register 31 24 23 16 15 8 7 0 LEN3 (1KB) LEN2 (1KB) LEN1 (1KB) LEN0 (128B) PSRCTL Packet-Split Receive Control register

Each descriptor has four buffers Packet-Split Rx-descriptor base_addr0 base_addr1 base_addr2 base_addr3 buffer3 buffer2 buffer1 buffer0 Four buffers are allocated for receiving one packet

Refresh for ‘reuse’ As with the ‘extended’ receive-descriptors, it is necessary for a device-driver to setup each ‘packet-split’ receive-descriptor any time it is going to be ‘reused’, since prior buffer-addresses get overwritten during a packet-reception by the network controller So driver needs a formula for recalculating buffer-addresses, or use a ‘shadow’ array

Kernel-memory layout Sixteen Rx-descriptors (32-bytes each) Sixty-four receive-buffers (1024-bytes each) 512 bytes 65536 bytes KMEM_SIZE (= 66048 bytes) kmem

Caveats Short packets are not always ‘split’ Unrecognized packet-headers may not be separated from accompanying packet-data Demonstrating the packet-split capability will require us to devise a way to transmit packets which have the TCP/UDP and IP packet-headers that the NIC recognizes

TIMEOUT for an in-class demonstration Our ‘pktsplit.c’ demo We created a ‘minimal’ kernel-module for demonstrating the NIC’s ‘packet-splitting’ capabilities TIMEOUT for an in-class demonstration

In-class exercise Can you enhance our ‘pktsplit.c’ module so that its Receive-Descriptor Queue will function automatically as a ring-buffer (as happens in our ‘extended.c’ example)? Your best option for this is to install an ISR which will reinitialize some Rx-Descriptors (and advance the RDT index) each time an RXDMT0 interrupt gets triggered