没有合适的资源?快使用搜索试试~ 我知道了~
BCM-OpenNSL-API-Guide-and-Reference-Manual
0 下载量 80 浏览量
2024-04-13
23:08:21
上传
评论
收藏 192KB DOC 举报
温馨提示
试读
18页
OpenNSL provides a mechanism to customize the switch initialization, by accepting a set of properties through a configuration file. The properties are mainly used to customize the platform without having to re-compile the OpenNSL. It also provides a mechanism to customize the platform, by accepting a set of diagnostic commands through a file, that are applied after system initialization.
资源推荐
资源详情
资源评论
OpenNSL API Guide and Reference Manual
Customizing OpenNSL Platform
Overview
OpenNSL provides a mechanism to customize the switch initialization, by accepting a set
of properties through a configuration file. The properties are mainly used to customize the
platform without having to re-compile the OpenNSL.
It also provides a mechanism to customize the platform, by accepting a set of diagnostic
commands through a file, that are applied after system initialization.
Platform customization using
config file
OpenNSL is enhanced to accept the platform configuration from a file. During initialization,
OpenNSL checks for the presence of configuration file. If the file exists, the configuration
from the file is applied. Note that OpenNSL does not validate the property values specified
in the file. For properties with invalid values, the default value would be assumed.
Run-time modifications to the configuration file do not take effect until OpenNSL is
re-initialized.
The configuration file is retrieved in the following order:
� The config file is specified via environment variable OPENNSL_CONFIG_FILE.
This option is given the highest precedence so that configuration files can be
changed without recompiling code.
# export OPENNSL_CONFIG_FILE=/home/admin/opennsl.cfg
� The config file is specified as an input parameter to the opennsl_driver_init()
function. rv = opennsl_driver_init(params);
� The location '/etc/opennsl' is checked for presence of 'opennsl.cfg' file.
� If the config file is not specified or does not exist, OpenNSL applies the default
configuration for the given platform.
End users can potentially use different configuration files based on the platform variant.
Config properties list all the valid config properties and Example configuration list the
sample configuration.
Platform customization using post
initialization script
OpenNSL is enhanced to check for the presence of post initialization script file at the end
of the system initialization. If the file exists, the commands from the file are applied. Note
that OpenNSL continues execution of commands with appropriate logs for invalid
commands.
The post initialization script file is retrieved in the following order:
� The post initialization script file is specified via environment variable
OPENNSL_POST_INIT_CONFIG_FILE.
# export
OPENNSL_POST_INIT_CONFIG_FILE=/home/admin/opennsl_postinit.cfg
� The post initialization script file is specified as an input parameter to the
opennsl_driver_init() function. rv = opennsl_driver_init(params);
� The location '/etc/opennsl' is checked for presence of 'opennsl-postinit.cfg' file.
End users can potentially use different post initialization script file based on the platform
variant.
Sample Post Initilization Script list the sample post initilization script.
Config properties
A property is a 'name=value' pair where name is a string and value is typically specified as
a number. Each property has a default value that is compiled into the driver and takes
effect if the property is not customized. The following properties are allowed.
Property
Description
arl_clean_timeout_usec
Timeout for hardware-accelerated ARL
delete operations including: delete by
port, delete by port+modid, delete by
VLAN, delete by trunk.
asf_mem_profile
BCM56960/BCM56970 : MMU Cell Buffer
Allocation Profile to support ASF (cut-thru)
Forwarding 0: No cut-through support 1:
Similar speed profile (Default) 2: Extreme
speed profile
bcm_linkscan_interval
Linkscan interval in microseconds. If
non-zero, bcm_init() will start linkscan
bcm_num_cos=<val>
Initial number of CoS queues the driver
configures the switch for.
Example: To set the number of COS
queues to 8, use "bcm_num_cos=8"
bcm_stat_flags
Flag values to be ORd together: 0x0
indicates that counter DMA should NOT
be used 0x1 indicates that counter DMA
should be used (default).
bcm_stat_interval=<val>
Set statistics collection interval in
microseconds. Setting this to 0 will
prevent counters from being started.
Example: bcm_stat_interval=2000000
bcm_stat_jumbo
Threshold value for oversize (*OVR)
frame size. Values over 1518 affect the
*OVR statistics computation
bcm_stat_pbmp
BCM Statistics Collection: Set bitmap of
ports on which stat collection will be
enabled. Default is all ports.
bcm_stat_sync_timeout
Timeout delay in microseconds before
bcm_stat_sync returns
BCM_E_TIMEOUT
bcm_tunnel_term_compatible_mode
Enable Tunnel Termination for protocol
types, compatible for all devices. Setting
the compatible mode ignores protocol
match and sets protocol mask to zero.
bcm_xlate_port_enable
Convenience variable that can be used to
turn off both physical and system port
mapping. This variable overrides the
dedicated variables described above.
bcm56340_2x10
Enable 12xF.QSGMII + 2xFlex[4x10] +
1GE mode for BCM56340.
bcm56340_4x10
Enable 12xF.QSGMII + Flex[4x10] +
2xHG[21] + 1GE mode for BCM56340.
bcm886xx_ether_ip_enable
Enable/disable etherIP (RFC 3378)
support.
bcm886xx_ip4_tunnel_termination_mode
See SDK documentation.
bcm886xx_l2gre_enable
Enable/disable L2GRE support.
bcm886xx_vxlan_enable
Enable/disable VXLAN support.
bcm886xx_vxlan_tunnel_lookup_mode
See SDK documentation.
cdma_timeout_usec=<val>
Counter DMA collection pass timeout in
microseconds.
Example: cdma_timeout_usec=3000000
ctr_evict_enable
Enables to reduce the frequency of
software polling of some counters that
support eviction.
dma_desc_timeout_usec
SBUSDMA descriptor mode operation
timeout in microseconds
dport_map_direct
Traditionally, specifying a raw number
instead of a port name in the diag shell will
be parsed as if port numbers are counted
from 1 up to the number of enabled ports.
Typically this would mean that for a
gigabit switch, port 1 would correspond to
ge0, and so forth. Setting this flag causes
raw port numbers to be parsed as internal
port numbers.
dport_map_enable
Enable diag shell port mapping. Port
names will be assigned in dport order, and
the BCM shell will list multiple ports in
dport order regardless of the internal port
numbering.
dport_map_indexed
Port names for each port type (fe, ge, etc.)
will increment by one starting at zero, e.g.
if a switch has four xe ports with dport
numbers 24, 25, 26, and 27, they will be
named xe0, xe1, xe2, and xe3. In
non-indexed mode the ports would be
named xe24, xe25, xe26, and xe27.
dport_map_port
Map dport number <dport> to internal port
number <port>.
dport_map_port_<port>=<dport>
fpem_mem_entries
Number of FPEM mem entries.
剩余17页未读,继续阅读
资源评论
染不尽的流年
- 粉丝: 1151
- 资源: 98
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功