FarSync Drivers | ![]() |
![]() |
---|
When a Linux kernel module is loaded it is also possible to pass the module some parameters. The farsync and fsflex modules both support load time parameters. If a parameter is not specified at module load time then it will take the default value hardcoded in the driver. This section documents what they are and what they are for. Some parameters should only be specified under direction from FarSite support staff and can normally be left as their default values.
/*
* Modules parameters and associated variables
*/
#define FST_HIGH_WATER_MARK 12 /* Point at which we flow control network layer
*/
#define FST_LOW_WATER_MARK 8 /* Point at which we remove flow control from
network layer */
#define FST_MIN_DMA_LEN 64 /* do DMA on transfer > 64 bytes
*/
#define FIRST_FLEX_V2_MAJOR_ID 0 /* A Major id of >0 means flex V2 */
#define FIRST_FLEX_V2_MINOR_ID 3 /* A Minor id of 3 means flex V2 */
#define
FIRST_FLEX_V3_MAJOR_ID 2 /* A Major id of >=2 means flex V3 */
int
fst_txq_low=FST_LOW_WATER_MARK;
int fst_txq_high=FST_HIGH_WATER_MARK;
int
fst_min_dma_len=FST_MIN_DMA_LEN;
unsigned int fst_dmathr=0xdd00dd00;
int
fst_iocinfo_version=FST_VERSION_CURRENT;
int fst_max_reads=7;
int
fst_allow_ioctl=0;
int fst_excluded_cards=0;
int fst_excluded_list[FST_MAX_CARDS];
int excluded_list_len = FST_MAX_CARDS;
/*
* The following parameters
are valid for the flex driver only
*/
int fst_num_serials=0;
char
*fst_serials[FST_MAX_CARDS];
module_param (fst_txq_low,int,S_IRUGO);
module_param (fst_txq_high,int,S_IRUGO);
module_param (fst_min_dma_len,int,S_IRUGO);
module_param (fst_dmathr,uint,S_IRUGO);
module_param (fst_iocinfo_version,int,S_IRUGO);
module_param (fst_max_reads,int,S_IRUGO);
module_param (fst_allow_ioctl,int,S_IRUGO);
module_param (fst_excluded_cards, int, S_IRUGO);
module_param_array (fst_excluded_list,
int, &excluded_list_len, S_IRUGO);
module_param_array (fst_serials, charp, &fst_num_serials,
S_IRUGO);
This parameter is valid for both the farsync and the flex driver. Each
driver operates a 16 entry transmit queue where frames are stored as they are
received from the network layer (WAN driver) or the OEM application (OEM
driver). This parameter specifies an upper threshold value that when
crossed will exert back pressure on the network stack or application.
The
default value is 12 (75% of the queue).
This parameter is valid for both the farsync and the flex driver. Each
driver operates a 16 entry transmit queue where frames are stored as they are
received from the network layer (WAN driver) or the OEM application (OEM
driver). This parameter specifies a lower threshold value that when
crossed (from above to below) will release back pressure from the network stack
or application.
The default value is 12 (75% of the queue).
This parameter is valid only for the farsync driver. The FarSync PCI
and PCI Express cards have a dual channel DMA controller, and these can be used
for transferring data to or from the card as a background task. The
efficiency of setting up and starting the DMA depends on the number of bytes
being transferred. It has been found that, generally, transfers of less
than 64 bytes are more efficient when using direct memory copy. It is not
recommended that this value is changed unless recommended by FarSite support
staff.
The default value is 64.
This parameter is valid only for the farsync driver. This parameter can
be used to set a hardware register of the DMA Engine. It is not
recommended that this value is changed unless recommended by FarSite support
staff.
The default value is 0xdd00dd00.
This parameter is valid for both the farsync and the flex driver. When a new version of the driver is
released there may have been some new configuration items added to the fstioc_info structure that would mean that the size of the data structure passed
in the ioctl(FSTSETCONFIG) or ioctl(FSTGETCONFIG) by the application would be a
different size from that which the driver is expecting. This parameter
allows the driver to be told which version of the fst_iocinfo structure the
application has been built with. Therefore it is not necessary to rebuild
the application in order to use the new driver if it does not need to make use
of the new parameters introduced.
The default value is the current version of
the as provided by the driver.
This parameter is valid for both the farsync and the flex driver. The
receive processing in the driver is performed within an interrupt context.
In order to prevent the receive interrupt from monopolizing the CPU, this
parameter can be used to set a maximum number of reads that may be processed
before the interrupt is rescheduled and then terminated. It is not
recommended that this value is changed unless recommended by FarSite support
staff.
The default value is 7.
This parameter is valid for both the farsync and the flex driver. Traditionally, applications that can configure low level networking parameters usually require root privilege in order to be able to run. This has proved to be inconvenient for some customers. Therefore, this parameter can be used to control which functions an unprivileged application can perform.
#define FST_ALLOW_IOCTL_GET 1
// Allow configuration parameters to be read
#define FST_ALLOW_IOCTL_SET 2
// Allow configuration parameters to be written
#define FST_ALLOW_IOCTL_CARD
4 // Allow special card functions to
be executed
#define FST_ALLOW_IOCTL_ALL FST_ALLOW_IOCTL_GET +
FST_ALLOW_IOCTL_SET + FST_ALLOW_IOCTL_CARD // Allow everything
The default value is 0.
This parameter is valid for the farsync driver only. This is a legacy
parameter and no longer used.
The default value is 0.
This parameter is valid for the farsync driver only. This is a legacy
parameter and no longer used.
The default value is NULL.
This parameter is valid for the flex driver only. There are times that
when a Flex port is enumerated it may be assigned a different device name, for
example sometimes it may be sync0 and sometimes it may be sync1. This
parameter is a list of pairs that associate a Flex serial number with a device
instance. Thus, if you always wanted U101/0001 be by sync0 and U101/0002
to be sync1, then you can do this by supplying the following parameter string.
"U101/0001 0 U101/0002 1"
The default value is NULL.
Copyright © 2001-2021 FarSite Communications Ltd. |
![]() |
---|