[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

sol_fastwrt Serial Optical Link Device Handler Entry Point

Purpose

Provides the means for kernel-mode users to transmit data to the Serial Optical Link (SOL) device driver.

Syntax

#include <sys/device.h>
#include <sys/comio.h>
#include <sys/soluser.h>
#include <sys/mbuf.h>

int sol_fastwrt (m, chan)
struct mbuf *m;
int chan;

Parameters

m Points to an mbuf structure containing caller data.
chan Specifies the channel number assigned by the sol_mpx entry point.

Description

A kernel user can transmit data more quickly using the sol_fastwrt entry point than through a normal write system call. The address of the sol_fastwrt entry point, along with the chan parameter, is given to a kernel-mode caller by way of the CIO_GET_FASTWRT sol_ioctl call.

If there is more than one path to the destination, the device handler uses any link that is available. If the S (serialized) option was specified on the open, and the connection is point to point, the data is guaranteed to have been received in the order in which it was sent. See the sol_mpx entry point for a description of the S option.

Note: When communicating through the Network Systems Corp. DX Router, in-order, guaranteed delivery to the destination is not possible. A successful transmission indicates only that the data was successfully received at the DX Router, not necessarily at the final destination. It is the application's responsibility to ensure that the data arrives at the destination.

The data packet must start with a 4-byte field for the destination processor ID (the ID goes in the low-order byte), followed by a 1-byte field for the destination network ID. When the data is received at the destination, the 1-byte processor ID is stripped off, so that the first byte is the 1-byte network ID.

The maximum packet size allowed is SOL_MAX_XMIT, as defined in the /usr/include/sys/soluser.h file.

Execution Environment

The sol_fastwrt entry point can be called from the kernel process environment or the interrupt environment. If the sol_fastwrt function is called from the interrupt environment, it is the responsibility of the caller to ensure that the interrupt level is SOL_OFF_LEVEL, as defined in the /usr/include/sys/soluser.h file, or a less-favored priority.

The sol_fastwrt entry point does not support a multiple-packet write. The m_nextpkt field in the mbuf structure is ignored by the device driver.

The sol_fastwrt entry point does not support a write extension. The mbufs are freed when the transmit is complete, and there will be no transmit acknowledgement sent to the caller. If these defaults are not appropriate, use the normal sol_write entry point.

The sol_fastwrt entry point assumes a trusted caller. The parameter checking done in the normal sol_write entry point is not done in sol_fastwrt. The caller should ensure such things as a valid channel, page-aligned and page-length mbuf clusters, and a valid packet length.

Return Values

ENODEV Indicates a minor number was specified that was not valid.
ENETDOWN Indicates the network is down. The device is not able to process the write.
ENOCONNECT Indicates the device has not been started.
EAGAIN Indicates the transmit queue is full.
EINVAL Indicates a parameter was specified that was not valid.
ENOMEM Indicates the device driver was not able to allocate the required memory.
EFAULT Indicates an invalid address was supplied.
EIO Indicates an error occurred.

Implementation Specifics

The sol_fastwrt entry point functions with a Serial Link Adapter and Serial Optical Channel Converter that have been correctly configured for use on a qualified network. Consult hardware specifications for more detailed information on configuring hardware and network qualifications.

Related Information

The sol_close entry point, sol_config entry point, sol_ioctl entry point, sol_mpx entry point, sol_open entry point, sol_read entry point, sol_select entry point, sol_write entry point.

The CIO_GET_FASTWRT sol_ioctl Serial Optical Link Device Handler Operation.


[ Previous | Next | Contents | Home | Search ]