Kernel Implementation Problems



next up previous
Next: IP Logical Interface Up: Experience and Results from Previous: Kernel Modifications

Kernel Implementation Problems

In the following sections we address several of the implementation problems which were encountered, some of which resulted directly from the design choices described above.

Socket Addresses

The BSD 4.3 socket code requires the implementation of the bind(), getsockname(), and getpeername() system calls for all protocols to be non-blocking. Many applications perform a getsockname() immediately after a bind() in order to publish or export their service address. This unfortunately means that the implementation of the ATM service address allocator must remain within the kernel. The addresses allocated are reported to the user space manager. Whilst it would have been preferable to locate this function with the rest of the control plane functions in the manager, this restriction is a minor inconvenience.

Interrupt levels

BSD 4.3 is structured such that all interaction with the socket level code must be performed while operating at splnet whereas device interrupts and the internals of the mbuf system operate at splimp. BSD 4.3 assumes that there will always be a queue structure between the device driver and the protocol handler. For this reason the ATM device driver cannot manipulate the association data structures, for example during reassembly. Instead it enqueues complete blocks of data on a per VCI basis for the ATM protocol layer. The ATM protocol layer runs at splnet and removes blocks from the queue asynchronously, adding them to the receive buffer on the appropriate socket. This additional layering represents a significant bottleneck in the protocol stack and significantly slows down the implementation.

Accepting Semantics

The ATM protocol implemented on the Cambridge networks, MSNA [12], allows the passive end of a connection to consider both the address of the peer and the quality of service requested before deciding to accept the connection. This is directly at odds with the BSD 4.3 semantics which require that a connection be declared ``soisconnected'' before the receiver is informed of the connection. In our implementation an incoming connection request is forwarded to the manager which in turn presents the connect request to the kernel ATM layer. On receipt of the connect request the ATM layer declares to the socket layer that the connection is complete (soisconnected), and prevents subsequent transmission on the socket associated with the connection by manipulation of the socket transmit buffer. It then instructs the manager to accept the connection. Once the manager has accepted the connection and built the data path, it informs the ATM layer that the connection is complete and transmission and reception are enabled.

Although a Unix server is still prevented from vetting its peer before accepting a connection, our implementation preserves the expected ATM protocol semantics. The inability of the socket interface to permit an application to vet its peer and to accept connections conditional on the availability of sufficient resources to meet their QoS requirements should be addressed to provide the full flexibility of ATM to applications.



next up previous
Next: IP Logical Interface Up: Experience and Results from Previous: Kernel Modifications



Richard Black and Simon Crosby