If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:ethswctl

From BoxMatrix


BoxMatrix >> Shell-Commands >> ethswctl @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

Startup-Scr Hotplug-Scr BusyBox-Cmds Bash-Cmds AVM-Cmds Chipset-Cmds Linux-Cmds Shared-Libs Kernel-Mods Research

Chipset-Command

Goto:   Examples  -  Dependencies   -   Model-Matrix   -   Symbols   -   SMW-Browser

Details

ethswctl is the Broadcom Ethernet Switch Configuration Utility.

It is a commandline frontend to libethswctl.so and is not used by the system. Binaries use libethswctl.so instead.

7581 fw 7.17:

root@fritz:/var/mod/root# ethswctl

more than 1 or no exclusive option is entered
Usage:
    ethswctl {-c|--command} hw-switching {-o|--operation} <enable|disable>
    ethswctl {-c|--command} mibdump [-n <unit>] {-p|--port} <port> [-q <queue>] {-a|--all}
          -q <queue> is meaningful for chip only mornitoring single queue each time
             The queue packet counter will be reset when mornitored queue changes
    ethswctl {-c|--command} pagedump {-P|--Page} <page>
    ethswctl {-c|--command} iudma [-n <channel>] [-r] [-w] [-d <count>] [-b <byte>] [-e <0|1>]
          Display/Control Robo Switch DMA channel
          When -n is omit, all channels will be displayed, -n 100 means GMAC DMA channel
          -d <count> Display <count> number of descriptor entries started from current pointer backward, 
             <count>=-1 means all descriptor entries
          -r Display DMA Rx channels only
          -w Display DMA Tx Ouput channels only
          -b <bytes> Display buffer content <bytes> length, <bytes>=-1 means full pakcet dump
          -e <1|0> Enable(1)/Disable(0) a DMA channel, -n <channel> needes for this operation
    ethswctl {-c|--command} iudmasplit -p <port> {-q <iudma>}
    ethswctl {-c|--command} swctrl {-t|--type} <type> [{-v|--value} <val>]
          type = 0-BUFF_CTRL; val = 1-TXQ_PAUSE_EN, 2-TXQ_DROP_EN, 4-TOT_PAUSE_EN, 8-TOT_DROP_EN
                 1-8021Q_CTRL; val = 0-DISABLE, 0x1-ENABLE, Shared VLAN learning, 0x2-ENABLE, Individual VLAN learning
    ethswctl {-c|--command} swprioctrl [-m mode] [{-q|--priority} <prio>] [-l <maxStreams>]
               [{-t|--type} <type>] [{-v|--value} <val>] [-n <unit>] [-p <port>]
               Queue Threshold Configuration Command
          mode = 0-Dynamic Mode: Queue Thresholds are configured by Ethernet driver
                         based on WAN queue map and link up port number dynamically.
                         see ethswctl -c quemap for reference
                 1-Static Mode: Queue thresholds are configured by Ethernet driver
                         based on WAN queue map and total port number.
                         No reconfiguration based on port link up and down.
                 2-Manual Mode: Queue thresholds are configured manually
          type = 0-TXQ_RESERVE, 1-TXQ_HI_HYS), 2-TXQ_HI_PAUSE
                 3-TXQ_HI_DROP, 4-TOT_HYST, 5-TOT_PAUSE, 6-TOT_DROP
          maxStreams: Max stream number with best system balanced results under
                 Dynamic or Static mode, -1 to set it back to default value
    ethswctl {-c|--command} swflowctrl [-n <unit>] -p <port> {-t|--type} <type> [{-v|--value} <val>]
          type = 0-FC_MODE val=(0-Global, 1-per port)
                 1-TX_BASED_FC, 2-TXQ_PAUSE_EN, 3-TXQ_DROP_EN, 4-TOT_PAUSE_EN
                 5-TOT_DROP_EN, 6-QBASED_PAUSE, val=1-ENABLE, 0-DISABLE
   ethswctl {-c|--command} quemap [-v <WAN Queue Bit Map>] [-q <Ethernet Driver Queue Remapping Map>]
         Get or Set port WAN Queue Bit Map and WAN Queue Mapping Bit Map
         <WAN Queue Bit Map>: Each bit of total 8 bits, represents the queue
                configured for WAN traffic with more buffer allocated than
                the rest queues configured for LAN traffic
         <Ethernet Driver Queue Remapping Bit Map>: Each 4 bits represents the queue number
                to be mapped to. The 4 bit position represent the queue
                number to be mapped from. Ex. -q 0x76543255 means queu 0 and 1
                will be both remapped queue 5 by Ethernet driver.
          Note: The two parameters above need to match each other or configuration will
                be rejected. Ex. -q 2 -v 0x11111111 will be accepted, but
                -q 2 -v 0x11110000 will be rejected. since queu 0 is not WAN queue.
  ethswctl {-c|--command} quemon [-n <unit>] -p <port> [{-q|-queue} <queue#>]
           [{-t|--type} <type>], [{-v|--value} <val>]
        type = 0-QueCurCount, 1-QuePeakCount, 2-SysTotalPeakCount, 3-SysTotalCurCount
               4-PortPeakRxBuffer, 5-QueFinalCongestedStatus, 6-PortPauseHistory,
               7-PortQuantumPauseHistory, 8-PortRxBasedPauseHistory,
               9-PortRxBufferErrorHitory, 10-QueCongestedStatus, 11-QueTotalCongestedStatus
             * Non parameter means all values applied(ex. (no -q)=(all eight queues)).
             * All counters are in 256byte page unit.
             * The Peak and History value are read-cleared, thus display values from last command.
    ethswctl {-c|--command} acb_cfg {-t|--type} <type> [ -q queue] [{-v|--value} <val>]
          type = 0-read all; 1-acb_en; 2-eop_delay; 3-que_flush; 4-algorithm;
                 5-total_xon_hyst 256B init; 6-queue_xon_hyst 256B unit; 7-pessimistic_mode;
                 8-total_xon_en; 9-xon_en; 10-total_xoff_en; 11-pkt_len, 1..36;
                 12-total_xoff_thresh 256B unit; 13-xoff_thresh 256Bytes unit; 14-pkts_in_flight
                 Setting 4-Algorithm will set multiple fields to default values for that algorithm.
    ethswctl {-c|--command} cfp <Operations> [<Position>] <Matching Conditions> <Actions>
          ----------------------- <Operations> ---------------------------------------------------------
          --read                      : Read cfp rules.
          --add                       : Add a rule to the top of rules.
          --append                    : Append a rule to the end of rules.
          --insert                    : Insert a rule in front of a specified rule.
                                        --priority and --index are mandatory for this operation.
          --delete                    : Delete a single CFP rule. --priority and --index are mandatory.
          --delete_all                : Delete multiple CFP rules.
                                      : If --index omitted, all rules of the priority will be deleted.
                                      : If --priority omitted, rules of all priorities will be deleted.
                                      : If both --priority and --index omitted, all rules will be deleted.
          ----------------------- <Positions> -------------------------------------------------------------
          --priority <0-2>            : Priority Group 0-2; 2 is the highest; 0 is the lowest priority.
                                        Priority group has higher priority than rule index (0-255) inside
                                        a priority group. If this option is omitted, for --read operation,
                                        all priority groups will be displayed; for non --read operation,
                                        priority 0 will be used.
          --index <0-255>             : The priority index inside a priority group, index 0 has the highest
                                        priority. The operation Insert needs to use this option to specify
                                        insertion index. If omitted for Read op, all entries inside the
                                        group will be displayed.
          ------------------------ <Matching Conditions> ---------------------------------------------------
          * Each condition is followed by a optional mask, if mask is omitted, all bits will be valid
          --spmap <sourcePortMap>             : Frame receiving source port map, if omitted, all ports valid
          --da <hex 6 bytes>,[<mask>]         : Destination MAC address in hex format.
          --sa <hex 6 bytes>,[<mask>]         : Source MAC address in hex format.
          --svlan_tag <0-0xffff>,[<mask>]     : SVLAN(TPID=0x9100) 2 bytes Service Privider VLAN Tag
          --cvlan_tag <0-0xffff>,[<mask>]     : CVLAN(TPID=0x8100) 2 bytes Customer VLAN Tag
          --l2 <L2_Framing>                   : 0-EthernetII; 1-SNAP Public; 2-LLC; 3-SNAP Private
          --pppoe <1|0>                       : PPPoE session or not
          --etype_sap <0-0xffff>,[<mask>]     : Ethernet Type when L2=EthernetII or SNAP_Public,
                                                or {DSAP,SSAP} when L2=LLC or SNAP_Private.
          --l3 <L3_Framing>                   : 0-IPv4, 1-IPv6, 2-Non IP, when omitted, IPv4 will be used
          --dscp <0-0x3f>,[<mask>]            : IP DSCP field
          --ip_protocol <0-255>,[<mask>]      : IP Protocol Number or IPv6 Next Hearder Protocol Number
          --ipsa <IPv4 address>,[<mask>]      : Source IP address.
          --ipda <IPv4 address>,[<mask>]      : Destination IP address.
          --tcp_udp_sport <2 byte value>,[<mask>]    : TCP/UDP source port.
          --tcp_udp_dport <2 bype value>,[<mask>]    : TCP/UDP destination port.
          ----------------------- <Actions> ---------------------------------------------------------------
          --new_dscp_ib <0-0x3f>      : New change in-band traffic's DSCP to a new value
          --chng_fpmap_ib <1-3>       : Change in-band traffic Forwarding Port Map
                                      : 1-Remove DST_MAP from ARL result; 2-Replace ARL result with DST_MAP
                                        3-Add DST_MAP to ARL result
                                        If omitted and --dst_fpmap_ib set, replacement will be performed
          --fpmap_ib <0-0x1ff>        : New in-band Forwarding Port Map used by --chng_fwd_map_ib
          ----------------------- <Examples> --------------------------------------------------------------
          ethswctl -c cfp --add --da 102233445566 --chng_fpmap_ib 2 --fpmap_ib 0
                  # Discard matched DA packets.
          ethswctl -c cfp --add --ipda 192.168.0.0,255.255.0.0 --chng_fpmap_ib 2 --fpmap_ib 0x108
                  # force packet with destination IP address 192.168.0.0:255.255.0.0 to port 8 and 3.
    ethswctl {-c|--command} rxscheduling {-v|--value} [val]
          val = 0-SP, 1-WRR
    ethswctl {-c|--command} wrrparams {-t|--type} <type> {-v|--value} [val]
          type = 0-interval_in_pkts, 1-weight1, 2-weight2, 3-weight3, 4-weight4
          val = interval_in_pkts:<1-1280>; weight:<1-16>
    ethswctl {-c|--command} vlan {-v|--value} vlan_id {-f|--fwdmap}
          fwd_map {-u|-untagmap} untag_map
    ethswctl {-c|--command} pbvlanmap [-n <unit>] {-p|--port} <port> [{-v|--value} <val>]
          val = port_map; Bit8: MIPS, Bit7: GPON; Bit5: MoCA: Bits3-0: UNI
    ethswctl {-c|--command} getstat [-n <unit>] -p <port> -t <type>
    ethswctl {-c|--command} getstat32 [-n <unit>] -p <port> -t <type>
    ethswctl {-c|--command} pause [-n <unit>] -p <port> -v val
          val = 0-None, 1-Auto, 2-Both, 3-Tx only, 4-Rx only
    ethswctl {-c|--command} cosq [-v <val>] # Get/Set Number of TxQ
    ethswctl {-c|--command} cosq [-n <unit>] -p <port> -q <priority> -v <txq>
          Set Packet reveived at <port> with CoS <priority> to TxQueue number <txq>
    ethswctl {-c|--command} cosq -q <priority> -v <dmaChannel>
               Set IMP port Tx Queue of <priority> to DMA Channel of <dmaChannel>
    ethswctl {-c|--command} costxq [-v <channel> -q <queue>] [-t <method>]
          method = 0-USE_BD_PRIO, 1-USE_TX_IUDMA
    ethswctl {-c|--command} byteratecfg -v <channel> -x {0-disable, 1-enable}
    ethswctl {-c|--command} byterate -v <channel> -x <rate>
    ethswctl {-c|--command} pktratecfg -v <channel> -x {0-disable, 1-enable}
    ethswctl {-c|--command} pktrate -v <channel> -x <rate>
    ethswctl {-c|--command} deftxq -i <if_name> -v <val>
    ethswctl {-c|--command} deftxqen -i <if_name> -o <enable|disable>
    ethswctl {-c|--command} getrxcntrs
    ethswctl {-c|--command} resetrxcntrs
    ethswctl {-c|--command} arl -m mac [-v <vid>] [-x <data>] [-n <unit>] [-r]
          data: 15:Valid, 14:Static, 13:Age, 12-10:Priority,
                8-0:Port ID for Unicast or Port Bit Map for Multicast
          <-x 0> <-v vid> will remove the ARL entry in a specific VLAN
          <-x 0> <-v -1> will remove ARL entries in all VLANs
    ethswctl {-c|--command} arldump
    ethswctl {-c|--command} arlflush
    ethswctl -c untaggedprio [-n <unit>] -p <port> [-v <val>]
          Set/Get packet default untagged priority in Rx Port <port> with value <val>
    ethswctl -c cosqpriomethod [-n <unit>] [-p port] [-t <pkt_type_mask>] [-v <val>] [-b]
          pkt_type_mask = 0x4-Static DA MAC, 0x4-Priority Tagged, 0x1-ipv4/6
                        mandatory for 63138
          val = 0-PORT_QOS, 1-MAC_QOS, 2-8021P_QOS, 3-DIFFSERV_QOS
          -b: Disable specifc QoS of a port(For 8021P_QOS and DIFFSERV_QOS)
    ethswctl -c cosqsched [-n <unit>] -p <port> [-v val] [-t <sp_queues>] [ -T <deficit_rr>]
          [ [-o <which_queues>] -x <weight1> -y <weight2> -z <weight3> -w <weight4> ]
          val = 0-SP, 1-WRR
          sp_queues: number of SP queues between 1 and 4; Default All queues
          deficit_rr = 0-Default Weighted round robin, 1-Deficit Round Robin
          which_queues = 'lower', weights for queue 0..3
                         'upper', weights for queue 4..7
                          Default 'lower'
    ethswctl {-c|--command} portctrl [-n <unit>] {-p|--port} <port> [-v <val>]
          val bit-0:  1-Rx Disable, 0-Rx Enable
          val bit-1:  1-Tx Disable, 0-Tx Enable
    ethswctl {-c|--command} portloopback [-n <unit>] {-p|--port} <port> [-v <val>]
          val:  1-Enable, 0-Disable
    ethswctl {-c|--command} phymode [-n <unit>] {-p|--port} <port> [-y <speed>] [-z <duplex>]
          speed = 0-auto, 10000, 5000, 2500, 1000, 100, 10
          duplex: 0-halfduplex, 1-fullduplex
    ethswctl {-c|--command} test -t <type> [-x <param>] [-v <val>] [-s]
          type = 0-ISR config, param=channel; val=1|0
          type = 1-Enable Rx Dump, val=1|0
          type = 2-Reset MIB
          type = 3-Reset Switch; -s for SPI interface
    ethswctl {-c|--command} jumbo [-n <unit>] {-p|--port} <port>
          [{-v|--value} <0(disable)|1(enable)>]
          port = 9-ALL, 8-MIPS, 7-GPON, 6-USB, 5-MOCA,
                 4-GPON_SERDES, 3-GMII_2, 2-GMII_1, 1-GPHY_1, 0-GPHY_0
    ethswctl -c pid2prio [-n <unit>] -p <port> [-q <prio>]
          Port id based priority (TC)
          prio is TC value for the port
    ethswctl {-c|--command} pcp2prio -v <pcpVal> [-n <unit>] -p <port> [-q <prio>]
          <unit> is switch number, Default 0
          <port>is switch port
          <pcpVal> is the 802.1p priority value
          <prio> is the switch priority
    ethswctl -c dscp2prio -v <dscpVal> [-q <prio>] >
          <dscpVal> is the DSCP value
          <prio> is the switch priority
    ethswctl {-c|--command} regaccess -v offset -l len [-d <data>] [-n <unit>]
    ethswctl {-c|--command} spiaccess -x addr -l len [-d <data>]
    ethswctl {-c|--command} pmdioaccess -x addr -l len [-d <data>]
    ethswctl {-c|--command} switchinfo -v switch_number
    ethswctl {-c|--command} setlinkstatus [-n <unit>] -p port -x linkstatus -y speed -z duplex
          speed = 10-10Mbps, 100-100Mbps, 1000-1000Mbps
    ethswctl {-c|--command} rxratectrl [-n <unit>] -p port [-x limit-kbps -y burst-kbits]
          if -y 0, the Rx rate control will be disabled, thus no rate limitation
    ethswctl {-c|--command} txratectrl [-n <unit>] -p port [ -q <queue>  -T <pkt or byte>] [-x <limit> -y <burst>]
          specify -q if configuring per q
          specify -T 1 if packet mode shaper, or it is Byte mode
          limit: kbps units in Byte mode, pps in Packet mode
          burst: kbits units in Byte mode, 1 pkt in Packet mode
    ethswctl {-c|--command} txratecfg [-n <unit>] -p port [ -q <queue>  ] -t <shaper_mode_mask> -v <val>
          shaper_mode_mask = 1-Enable Shaper, 2-packet mode else byte mode
                             4-Shaper Blocked, 8-Include IFG
          val = 1-enable, 0-disable
    ethswctl {-c|--command} dosctrl -v <value>
          <value> = 1-IP_LAN, 2-TCP_BLAT, 3-UDP_BLAT, 4-TCP_NULL
                    5-TCP_XMAS, 6-TCP_SYNFIN, 7-TCP_SYNERR, 8-TCP_SHORTHDR
                    9-TCP_FRAGERR, 10-ICMPv4_FRAG, 11-ICMPv6_FRAG, 12-ICMPv4_LONGPING
                    13-ICMPv6_LONGPING, 14-DOS_LRN
    ethswctl {-c|--command} softswitch [-i] <if_name> [-o] <enable|disable>
    ethswctl {-c|--command} hwstp [-i] <if_name> [-o] <enable|disable>
    ethswctl {-c|--command} wan [ -i if_name -o <enable|disable> ]
    ethswctl {-c|--command} mirror -o <enable|disable> [-n <unit>] [-p <mirror_port> -x <ingress_mirror_port_map>
               -y <egress_mirror_port_map> [-z <block_no_mirror_pkts 0|1>]
               [-v <TX packet mirror port map>] [-w <RX packet mirror port map>
          Note: -v and -w are applicable if not supplied all traffic is mirrored
                to <mirror_port> in Runner platform
    ethswctl {-c|--command} trunk [ -o <sada|da|sa> ]
    ethswctl {-c|--command} stormctrl [-n <unit>] -p port [-t pkt_type_mask -x rate -y bucket_size]
          pkt_type_mask = 0x1(unicast lookup hit), 0x2(multicast lookup hit), 0x4(reserved mac addr 01-80-c2-00-00- 00~2f)
                         0x8(broadcast), 0x10(multicast lookup fail), 0x20(unicast lookup fail)
          rate = 1~28   (Bit rate = rate*8*1024/125, that is 64Kb~1.792Mb with resolution 64Kb)
                 29~127 (Bit rate = (rate-27)1024, that is 2Mb~100Mb with resolution 1Mb)
                 128~240 (Bit rate = (rate-115)*8*1024, that is 104Mb~1000Mb with resolution 8Mb)
          bucket_size = 0(4K), 1(8K), 2(16K), 3(32K), 4(64K), others(488K) bytes
    ethswctl {-c|--command} oamindex -v <oam index> -t <0=unit/port; 1=rdpa_if>]
Usage: ethswctl <command> [arguments...]

  getifname : Get the interface name for the given port
  ethswctl getifname <unit [0...1]> <port [0...7]>
  NOTE : if only one argument; unit is assumed 0

  debug : Get/Set Debug level
  ethswctl debug <level>

Examples

7581 fw 7.17:

root@fritz:/var/mod/root# ethswctl getifname 0 0
The interface name for unit 0 port 0 is eth0
root@fritz:/var/mod/root# ethswctl getifname 1 0
The interface name for unit 1 port 0 is eth1
root@fritz:/var/mod/root# ethswctl getifname 1 1
The interface name for unit 1 port 1 is eth2
root@fritz:/var/mod/root# ethswctl getifname 1 2
The interface name for unit 1 port 2 is eth3
root@fritz:/var/mod/root# ethswctl getifname 1 3
The interface name for unit 1 port 3 is eth4

root@fritz:/var/mod/root# ethswctl -c switchinfo -v 0
Port Map = 0x3; Phy Port Map = 0x0
No switch connected
Success.
root@fritz:/var/mod/root# ethswctl -c switchinfo -v 1
Port Map = 0xf; Phy Port Map = 0xf
switch connected through MMAP
VendorID = 0x600d, Dev ID = 0x85c0, Rev ID = 0x0, Success.

Dependencies

Daily updated index of all dependencies of this command. Last update: 2024-03-29 08:04 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.

Relation Typ Object Mod Firmware Info Origin
Depends on lib ld.so 1 7.20 - 7.90 Dynamic linker / loader Linux
Depends on lib libbcm_crc.so 2 6.54 - 6.85 Broadcom CRC32 calculation. Broadcom
Depends on lib libbcm_flashutil.so 2 6.54 - 6.85 Broadcom flash updater utility Broadcom
Depends on lib libc.so 3 6.54 - 7.90 Standard C library Linux
Depends on lib libcms_boardctl.so 2 6.54 - 6.85 Broadcom CMS board control functions Broadcom
Depends on lib libcms_msg.so 2 6.54 - 6.85 Broadcom CMS messaging API Broadcom
Depends on lib libcms_util.so 2 6.54 - 6.85 Broadcom CMS utility functions Broadcom
Depends on lib libcrypt.so 2 6.54 - 6.85 Encoding and decoding handling routines. Linux
Depends on lib libethswctl.so 3 6.54 - 7.90 Broadcom Ethernet Switch Configuration API Broadcom
9 dependencies for this command

Model-Matrix

Daily updated index of the presence, path and size of this command for each model. Last update: 2024-03-29 06:17 GMT.
Showing all models using this command. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom) label in the Model column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size
FRITZ!Box 7530 AX 7.20 - 7.90 /bin 62.3k - 74.2k
FRITZ!Box 7581 6.54 - 7.16 /bin 60.5k - 72.0k
FRITZ!Box 7582 6.83 - 7.17 /bin 60.5k - 72.0k
3 models use this command

Symbols

Daily updated index of all symbols of this command. Last update: 2024-03-29 08:04 GMT.

Firmware Symbol
7.20 - 7.31 main
1 symbol for this command

SMW-Browser

Information is currently being retrieved from the backend.