Linux Device Support
for the IBM - APE 25
 
 
Alice Flower
Robert Geist
Mike Westall
 
 
Department of Computer Science
Clemson University
Clemson SC 29634-1906
 
 
rmg@cs.clemson.edu
westall@cs.clemson.edu
 
 
 
 

Outline
 

Introduction

Developing a standalone ATM device driver Native ATM networking in Linux IP over ATM Performance Data

 



 
ATM

 
Is it........

A radically new and innovative networking technology that will
 
Permit fixed and variable bit rate real-time traffic to co-exist painlessly with non-real- time bulk data transfer.

or is it...........
The answer to the question:
 

Name one thing that illustrates better than even the US Internal Revenue Code the ill effects of design by large committees of competing interests.



 
ATM
 

What can/will ATM provide'
 

ATM services
                          AAL1 - Constant bit rate (PCM voice)     AAL5 - Everything else AAL5 Frames are like IP datagrams in that: size is variable and maximum size is 64KB.
 
AAL5 Frames are not like IP datagrams in that: they are not transmitted as an entity within the subnet..    
 The IBM APE 25

 

APE 25 Overview

  Supports AAL1 (CBR) and AAL5

 
 

Receive traffic management
 


 
The IBM APE 25

Transmit traffic management

The APE-25 provides eight transmission queues (TMQs).
Associated with each TMQ is

  Admission control is via a token bucket algorithm  
Specifying the sustained cell rate and the credit limit (CL)   peak to sustainable ratio (PSR) = peak rate / sustained rate.   burst tolerance specifier (BTS) = PSR * CL/8   Oversubscription algorithm:  

The APE 25 Device Driver

  Development strategy
 

TCLP0_RCELL 0108 -     0069
TCLP1_RCELL 010a -     0000
THB_ER_CELL 010c -     0011
 
  Develop in a PVC (initially loopback) environment
 

The APE 25 Device Driver
 

Device driver organization


 
 
The APE 25 Device Driver
 

Driver Initialization
 

    }

 

 
 
  
 
Transmit Data Flow & Buffer Management

 

 



 
The APE 25 Device Driver
 
 

Producer/Consumer perspective on buffer management

 
List Producer Consumer
Transmit Ready Driver send function APE-25
Transmit Complete APE-25 Driver Xmit IRQ
Free Driver Xmit IRQ Driver Send function
 
 

Buffer List management
 


 

Mutual exclusion mechanism
 

the tail pointer
the link field of the last element
the head pointer
The APE 25 Device Driver
 

Synchronization mechanism

Must prevent:
 

Consuming from an empty list

Producing into a "full" one (a linked list is never full)

 
  APE-25 Send Routine Xmit IRQ
Producing Not a problem Must check APE-25 TRQ state register Not a problem
Consuming Not our problem Must check for available frame buffer Shouldn't occur but can be avoided by checking the list 
 
 

Possible options for the send routine

  
 
The APE 25 Device Driver
 

Transmit details

 
 
31.............24
23.............16
15.............8
7................0
Next TFD (Used internally by APE 25)
TCL Next TFD
LCI
Parm/Status
Buf Count
Control Field
SDU Length
Data buffer 0 Address
Buf 0 Length
 
Data buffer 1 Address
Buf 1 Length
 
Additional Data Buffers
   
 
The Transmit Frame Descriptor (TFD)
 

Standalone driver buffer management
 

   

The FDL (Free Descriptor List)
 

Transmit buffers available for use when an application performs an ioctl senddata.


 

 

The TCL (Transmit Complete List)

 

 

Complete transmit buffer lifecycle
 
 
   


 
 
Receive Data Flow & Buffer Management
 
  



 
The APE 25 Device Driver
 

Receive Buffer Lists and Lifecycle

 

1 - Free list:                                 Buffers available for use by APE 25.
 

2 - APE-25 Reassembly            Buffers presently owned by the APE 25
        Queue                                   for the reassembly of frames

3 - Recv Ready Lists:                   Buffers containing assembled frames. The APE
                                                       25 defines 8 logical receive queues.

4 - Per LC Ready Lists:                Buffers containing assembled frames for a
                                                        particular LC
 

 
 
 
List Producer Consumer
Reasm-Queue APE-25 APE-25
RRLn APE-25 Driver Recv IRQ
LC RBLm Driver Recv IRQ Driver Recv function
Free Driver Recv function APE-25

The APE 25 Device Driver
 

Receive mutual exclusion mechanism

Analogous to the transmission mechanism Receive synchronization mechanism

 
  Recv Routine Recv IRQ
Producing to Free List no problem LC RBLm no problem
Consuming from LC RBLm sleep() wakeup by Recv IRQ RRLn Should not occur.. but must be checked
 


 
The APE 25 Device Driver
 

The Receive Buffer Header (RBH)

 
 
31.............24
23.............16
15.............8
7................0
Data Buffer Address
Next RBH Address
Buffer Length
Status
LCI
Control
SDU Length
OAM / CPL0 / TUC

 

The Receive Free List (RFL)

  Buffers available for the APE 25 to use for frame assembly.


 
 

The Receive Ready Lists (RRL's)

Buffers containing assembled frames not yet processed by the driver.   The APE 25 defines 8 logical receive queues.

 

 

 

Mutex problems in consuming buffers:

 

Suppose three frames have been received for RRL_3 and
All are destined for LC 32


 

Problem: APE 25 owns (the next RBH field of ) RBH 7 but the driver needs to consume DB-16
 

Solution: Driver also needs to consume the dummy RBH-4... so a rebinding is performed

 
 


 
The per LC received buffer lists

 

Buffers demultiplexed by the driver by target VC but not yet consumed by the application:

 
 

  

 

Per LC Received buffer list management

 

After 3 frames have been received for LC 32

 
 
 


Reviewing the buffer lifecycle

1 - APE 25 consumes a buffer via the SRFL register

2 - APE 25 produces on to RRL_n via the RRLn_LFDA register

3 - Driver (interrupt service routine) consumes from RRL_n via ape->srrl[n] and produces to LC_RBL_k via ape->slcrbl[k]

4 - Driver (atm_recv5u) consumes from LC_RBL_k via ape->elcrbl[k] and produces to the free list via ape->erfl.


  The Free RBH List

 
The driver manages a pool of 256 RBH's
 

 
 
The Linux ATM Protocol

 

Overview:
 

Native ATM (Almesberger) Socket based API

Connection oriented

Best effort delivery of AAL5 frames

PVC or SVC

 

Signaling (atmsigd: Almesberger) UNI 3.0, 3.1, 4.0?
 
ILMI (ilmid: S. Schumate)
 
Classical IP over ATM (atmarpd: Almesberger)

Lan Emulation (zeppelin: M. Kiiskila)
 

  
 The Linux ATM Protocol
The Device Driver Interface:

From init_module() the driver must call
 

 

The first parameter is the device name .... "ape25"

The second is a pointer to the device driver operations vector table:

 

static struct atmdev_ops atm_ops =
{

   
 
The Linux ATM Protocol
 

Receive Buffer Management:
 
 

1 - APE 25 consumes a RBH-SKBUFF via the SRFL register

2 - APE 25 produces on to RRL_n via the RRLn_LFDA register

3 - Driver (interrupt service routine) consumes from RRL_n via ape->srrl[n]. RBH is produced to free RBH list. Skbuff is "pushed" to protocol.

4 - Protocol returns skbuff to driver. Driver consumes RBH from free RBH list and produces matched pair to the free list via ape->erfl.


The Linux ATM Protocol

 

TCP/IP over ATM
 

Theoretically, no change to the device driver should be required.
 

Our problems included:

Performance
 
 
Protocol % of available bit rate delivered
Standalone driver & Native ATM > 97% for large frames
TCP/IP (mtu = 2KB) > 96% across the board 
 
 
 
   


In conclusion

 

Scope of the undertaking

 

; count Module Function
298 atmape25.c Protocol glue
833  atmbase.c Initialization, FLIH
254  atmdma.c Standalone buffer allocation
229  atmioctl.c Standalone ioctl interface
789  atmrecv.c Receive manager
600  atmxmit.c Transmission manager
361  atmxram.c Connection manager
3364  Total  
 

Time: One to two person-months given

 

Watch out for:

 

WT_CNTLREG(x, y) if (xx == yy) sleep();

 

To be done: