Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 .. include:: <isonum.txt>
0003 
0004 ===============================
0005 Marvell(Aquantia) AQtion Driver
0006 ===============================
0007 
0008 For the aQuantia Multi-Gigabit PCI Express Family of Ethernet Adapters
0009 
0010 .. Contents
0011 
0012     - Identifying Your Adapter
0013     - Configuration
0014     - Supported ethtool options
0015     - Command Line Parameters
0016     - Config file parameters
0017     - Support
0018     - License
0019 
0020 Identifying Your Adapter
0021 ========================
0022 
0023 The driver in this release is compatible with AQC-100, AQC-107, AQC-108
0024 based ethernet adapters.
0025 
0026 
0027 SFP+ Devices (for AQC-100 based adapters)
0028 -----------------------------------------
0029 
0030 This release tested with passive Direct Attach Cables (DAC) and SFP+/LC
0031 Optical Transceiver.
0032 
0033 Configuration
0034 =============
0035 
0036 Viewing Link Messages
0037 ---------------------
0038   Link messages will not be displayed to the console if the distribution is
0039   restricting system messages. In order to see network driver link messages on
0040   your console, set dmesg to eight by entering the following::
0041 
0042        dmesg -n 8
0043 
0044   .. note::
0045 
0046      This setting is not saved across reboots.
0047 
0048 Jumbo Frames
0049 ------------
0050   The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
0051   enabled by changing the MTU to a value larger than the default of 1500.
0052   The maximum value for the MTU is 16000.  Use the `ip` command to
0053   increase the MTU size.  For example::
0054 
0055         ip link set mtu 16000 dev enp1s0
0056 
0057 ethtool
0058 -------
0059   The driver utilizes the ethtool interface for driver configuration and
0060   diagnostics, as well as displaying statistical information. The latest
0061   ethtool version is required for this functionality.
0062 
0063 NAPI
0064 ----
0065   NAPI (Rx polling mode) is supported in the atlantic driver.
0066 
0067 Supported ethtool options
0068 =========================
0069 
0070 Viewing adapter settings
0071 ------------------------
0072 
0073  ::
0074 
0075     ethtool <ethX>
0076 
0077  Output example::
0078 
0079   Settings for enp1s0:
0080     Supported ports: [ TP ]
0081     Supported link modes:   100baseT/Full
0082                             1000baseT/Full
0083                             10000baseT/Full
0084                             2500baseT/Full
0085                             5000baseT/Full
0086     Supported pause frame use: Symmetric
0087     Supports auto-negotiation: Yes
0088     Supported FEC modes: Not reported
0089     Advertised link modes:  100baseT/Full
0090                             1000baseT/Full
0091                             10000baseT/Full
0092                             2500baseT/Full
0093                             5000baseT/Full
0094     Advertised pause frame use: Symmetric
0095     Advertised auto-negotiation: Yes
0096     Advertised FEC modes: Not reported
0097     Speed: 10000Mb/s
0098     Duplex: Full
0099     Port: Twisted Pair
0100     PHYAD: 0
0101     Transceiver: internal
0102     Auto-negotiation: on
0103     MDI-X: Unknown
0104     Supports Wake-on: g
0105     Wake-on: d
0106     Link detected: yes
0107 
0108 
0109  .. note::
0110 
0111     AQrate speeds (2.5/5 Gb/s) will be displayed only with linux kernels > 4.10.
0112     But you can still use these speeds::
0113 
0114         ethtool -s eth0 autoneg off speed 2500
0115 
0116 Viewing adapter information
0117 ---------------------------
0118 
0119  ::
0120 
0121   ethtool -i <ethX>
0122 
0123  Output example::
0124 
0125   driver: atlantic
0126   version: 5.2.0-050200rc5-generic-kern
0127   firmware-version: 3.1.78
0128   expansion-rom-version:
0129   bus-info: 0000:01:00.0
0130   supports-statistics: yes
0131   supports-test: no
0132   supports-eeprom-access: no
0133   supports-register-dump: yes
0134   supports-priv-flags: no
0135 
0136 
0137 Viewing Ethernet adapter statistics
0138 -----------------------------------
0139 
0140  ::
0141 
0142     ethtool -S <ethX>
0143 
0144  Output example::
0145 
0146   NIC statistics:
0147      InPackets: 13238607
0148      InUCast: 13293852
0149      InMCast: 52
0150      InBCast: 3
0151      InErrors: 0
0152      OutPackets: 23703019
0153      OutUCast: 23704941
0154      OutMCast: 67
0155      OutBCast: 11
0156      InUCastOctects: 213182760
0157      OutUCastOctects: 22698443
0158      InMCastOctects: 6600
0159      OutMCastOctects: 8776
0160      InBCastOctects: 192
0161      OutBCastOctects: 704
0162      InOctects: 2131839552
0163      OutOctects: 226938073
0164      InPacketsDma: 95532300
0165      OutPacketsDma: 59503397
0166      InOctetsDma: 1137102462
0167      OutOctetsDma: 2394339518
0168      InDroppedDma: 0
0169      Queue[0] InPackets: 23567131
0170      Queue[0] OutPackets: 20070028
0171      Queue[0] InJumboPackets: 0
0172      Queue[0] InLroPackets: 0
0173      Queue[0] InErrors: 0
0174      Queue[1] InPackets: 45428967
0175      Queue[1] OutPackets: 11306178
0176      Queue[1] InJumboPackets: 0
0177      Queue[1] InLroPackets: 0
0178      Queue[1] InErrors: 0
0179      Queue[2] InPackets: 3187011
0180      Queue[2] OutPackets: 13080381
0181      Queue[2] InJumboPackets: 0
0182      Queue[2] InLroPackets: 0
0183      Queue[2] InErrors: 0
0184      Queue[3] InPackets: 23349136
0185      Queue[3] OutPackets: 15046810
0186      Queue[3] InJumboPackets: 0
0187      Queue[3] InLroPackets: 0
0188      Queue[3] InErrors: 0
0189 
0190 Interrupt coalescing support
0191 ----------------------------
0192 
0193  ITR mode, TX/RX coalescing timings could be viewed with::
0194 
0195     ethtool -c <ethX>
0196 
0197  and changed with::
0198 
0199     ethtool -C <ethX> tx-usecs <usecs> rx-usecs <usecs>
0200 
0201  To disable coalescing::
0202 
0203     ethtool -C <ethX> tx-usecs 0 rx-usecs 0 tx-max-frames 1 tx-max-frames 1
0204 
0205 Wake on LAN support
0206 -------------------
0207 
0208  WOL support by magic packet::
0209 
0210     ethtool -s <ethX> wol g
0211 
0212  To disable WOL::
0213 
0214     ethtool -s <ethX> wol d
0215 
0216 Set and check the driver message level
0217 --------------------------------------
0218 
0219  Set message level
0220 
0221  ::
0222 
0223     ethtool -s <ethX> msglvl <level>
0224 
0225  Level values:
0226 
0227  ======   =============================
0228  0x0001   general driver status.
0229  0x0002   hardware probing.
0230  0x0004   link state.
0231  0x0008   periodic status check.
0232  0x0010   interface being brought down.
0233  0x0020   interface being brought up.
0234  0x0040   receive error.
0235  0x0080   transmit error.
0236  0x0200   interrupt handling.
0237  0x0400   transmit completion.
0238  0x0800   receive completion.
0239  0x1000   packet contents.
0240  0x2000   hardware status.
0241  0x4000   Wake-on-LAN status.
0242  ======   =============================
0243 
0244  By default, the level of debugging messages is set 0x0001(general driver status).
0245 
0246  Check message level
0247 
0248  ::
0249 
0250     ethtool <ethX> | grep "Current message level"
0251 
0252  If you want to disable the output of messages::
0253 
0254     ethtool -s <ethX> msglvl 0
0255 
0256 RX flow rules (ntuple filters)
0257 ------------------------------
0258 
0259  There are separate rules supported, that applies in that order:
0260 
0261  1. 16 VLAN ID rules
0262  2. 16 L2 EtherType rules
0263  3. 8 L3/L4 5-Tuple rules
0264 
0265 
0266  The driver utilizes the ethtool interface for configuring ntuple filters,
0267  via ``ethtool -N <device> <filter>``.
0268 
0269  To enable or disable the RX flow rules::
0270 
0271     ethtool -K ethX ntuple <on|off>
0272 
0273  When disabling ntuple filters, all the user programed filters are
0274  flushed from the driver cache and hardware. All needed filters must
0275  be re-added when ntuple is re-enabled.
0276 
0277  Because of the fixed order of the rules, the location of filters is also fixed:
0278 
0279  - Locations 0 - 15 for VLAN ID filters
0280  - Locations 16 - 31 for L2 EtherType filters
0281  - Locations 32 - 39 for L3/L4 5-tuple filters (locations 32, 36 for IPv6)
0282 
0283  The L3/L4 5-tuple (protocol, source and destination IP address, source and
0284  destination TCP/UDP/SCTP port) is compared against 8 filters. For IPv4, up to
0285  8 source and destination addresses can be matched. For IPv6, up to 2 pairs of
0286  addresses can be supported. Source and destination ports are only compared for
0287  TCP/UDP/SCTP packets.
0288 
0289  To add a filter that directs packet to queue 5, use
0290  ``<-N|-U|--config-nfc|--config-ntuple>`` switch::
0291 
0292     ethtool -N <ethX> flow-type udp4 src-ip 10.0.0.1 dst-ip 10.0.0.2 src-port 2000 dst-port 2001 action 5 <loc 32>
0293 
0294  - action is the queue number.
0295  - loc is the rule number.
0296 
0297  For ``flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`` you must set the loc
0298  number within 32 - 39.
0299  For ``flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`` you can set 8 rules
0300  for traffic IPv4 or you can set 2 rules for traffic IPv6. Loc number traffic
0301  IPv6 is 32 and 36.
0302  At the moment you can not use IPv4 and IPv6 filters at the same time.
0303 
0304  Example filter for IPv6 filter traffic::
0305 
0306     sudo ethtool -N <ethX> flow-type tcp6 src-ip 2001:db8:0:f101::1 dst-ip 2001:db8:0:f101::2 action 1 loc 32
0307     sudo ethtool -N <ethX> flow-type ip6 src-ip 2001:db8:0:f101::2 dst-ip 2001:db8:0:f101::5 action -1 loc 36
0308 
0309  Example filter for IPv4 filter traffic::
0310 
0311     sudo ethtool -N <ethX> flow-type udp4 src-ip 10.0.0.4 dst-ip 10.0.0.7 src-port 2000 dst-port 2001 loc 32
0312     sudo ethtool -N <ethX> flow-type tcp4 src-ip 10.0.0.3 dst-ip 10.0.0.9 src-port 2000 dst-port 2001 loc 33
0313     sudo ethtool -N <ethX> flow-type ip4 src-ip 10.0.0.6 dst-ip 10.0.0.4 loc 34
0314 
0315  If you set action -1, then all traffic corresponding to the filter will be discarded.
0316 
0317  The maximum value action is 31.
0318 
0319 
0320  The VLAN filter (VLAN id) is compared against 16 filters.
0321  VLAN id must be accompanied by mask 0xF000. That is to distinguish VLAN filter
0322  from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID
0323  are passed in the same 'vlan' parameter.
0324 
0325  To add a filter that directs packets from VLAN 2001 to queue 5::
0326 
0327     ethtool -N <ethX> flow-type ip4 vlan 2001 m 0xF000 action 1 loc 0
0328 
0329 
0330  L2 EtherType filters allows filter packet by EtherType field or both EtherType
0331  and User Priority (PCP) field of 802.1Q.
0332  UserPriority (vlan) parameter must be accompanied by mask 0x1FFF. That is to
0333  distinguish VLAN filter from L2 Ethertype filter with UserPriority since both
0334  User Priority and VLAN ID are passed in the same 'vlan' parameter.
0335 
0336  To add a filter that directs IP4 packess of priority 3 to queue 3::
0337 
0338     ethtool -N <ethX> flow-type ether proto 0x800 vlan 0x600 m 0x1FFF action 3 loc 16
0339 
0340  To see the list of filters currently present::
0341 
0342     ethtool <-u|-n|--show-nfc|--show-ntuple> <ethX>
0343 
0344  Rules may be deleted from the table itself. This is done using::
0345 
0346     sudo ethtool <-N|-U|--config-nfc|--config-ntuple> <ethX> delete <loc>
0347 
0348  - loc is the rule number to be deleted.
0349 
0350  Rx filters is an interface to load the filter table that funnels all flow
0351  into queue 0 unless an alternative queue is specified using "action". In that
0352  case, any flow that matches the filter criteria will be directed to the
0353  appropriate queue. RX filters is supported on all kernels 2.6.30 and later.
0354 
0355 RSS for UDP
0356 -----------
0357 
0358  Currently, NIC does not support RSS for fragmented IP packets, which leads to
0359  incorrect working of RSS for fragmented UDP traffic. To disable RSS for UDP the
0360  RX Flow L3/L4 rule may be used.
0361 
0362  Example::
0363 
0364     ethtool -N eth0 flow-type udp4 action 0 loc 32
0365 
0366 UDP GSO hardware offload
0367 ------------------------
0368 
0369  UDP GSO allows to boost UDP tx rates by offloading UDP headers allocation
0370  into hardware. A special userspace socket option is required for this,
0371  could be validated with /kernel/tools/testing/selftests/net/::
0372 
0373     udpgso_bench_tx -u -4 -D 10.0.1.1 -s 6300 -S 100
0374 
0375  Will cause sending out of 100 byte sized UDP packets formed from single
0376  6300 bytes user buffer.
0377 
0378  UDP GSO is configured by::
0379 
0380     ethtool -K eth0 tx-udp-segmentation on
0381 
0382 Private flags (testing)
0383 -----------------------
0384 
0385  Atlantic driver supports private flags for hardware custom features::
0386 
0387         $ ethtool --show-priv-flags ethX
0388 
0389         Private flags for ethX:
0390         DMASystemLoopback  : off
0391         PKTSystemLoopback  : off
0392         DMANetworkLoopback : off
0393         PHYInternalLoopback: off
0394         PHYExternalLoopback: off
0395 
0396  Example::
0397 
0398         $ ethtool --set-priv-flags ethX DMASystemLoopback on
0399 
0400  DMASystemLoopback:   DMA Host loopback.
0401  PKTSystemLoopback:   Packet buffer host loopback.
0402  DMANetworkLoopback:  Network side loopback on DMA block.
0403  PHYInternalLoopback: Internal loopback on Phy.
0404  PHYExternalLoopback: External loopback on Phy (with loopback ethernet cable).
0405 
0406 
0407 Command Line Parameters
0408 =======================
0409 The following command line parameters are available on atlantic driver:
0410 
0411 aq_itr -Interrupt throttling mode
0412 ---------------------------------
0413 Accepted values: 0, 1, 0xFFFF
0414 
0415 Default value: 0xFFFF
0416 
0417 ======   ==============================================================
0418 0        Disable interrupt throttling.
0419 1        Enable interrupt throttling and use specified tx and rx rates.
0420 0xFFFF   Auto throttling mode. Driver will choose the best RX and TX
0421          interrupt throtting settings based on link speed.
0422 ======   ==============================================================
0423 
0424 aq_itr_tx - TX interrupt throttle rate
0425 --------------------------------------
0426 
0427 Accepted values: 0 - 0x1FF
0428 
0429 Default value: 0
0430 
0431 TX side throttling in microseconds. Adapter will setup maximum interrupt delay
0432 to this value. Minimum interrupt delay will be a half of this value
0433 
0434 aq_itr_rx - RX interrupt throttle rate
0435 --------------------------------------
0436 
0437 Accepted values: 0 - 0x1FF
0438 
0439 Default value: 0
0440 
0441 RX side throttling in microseconds. Adapter will setup maximum interrupt delay
0442 to this value. Minimum interrupt delay will be a half of this value
0443 
0444 .. note::
0445 
0446    ITR settings could be changed in runtime by ethtool -c means (see below)
0447 
0448 Config file parameters
0449 ======================
0450 
0451 For some fine tuning and performance optimizations,
0452 some parameters can be changed in the {source_dir}/aq_cfg.h file.
0453 
0454 AQ_CFG_RX_PAGEORDER
0455 -------------------
0456 
0457 Default value: 0
0458 
0459 RX page order override. Thats a power of 2 number of RX pages allocated for
0460 each descriptor. Received descriptor size is still limited by
0461 AQ_CFG_RX_FRAME_MAX.
0462 
0463 Increasing pageorder makes page reuse better (actual on iommu enabled systems).
0464 
0465 AQ_CFG_RX_REFILL_THRES
0466 ----------------------
0467 
0468 Default value: 32
0469 
0470 RX refill threshold. RX path will not refill freed descriptors until the
0471 specified number of free descriptors is observed. Larger values may help
0472 better page reuse but may lead to packet drops as well.
0473 
0474 AQ_CFG_VECS_DEF
0475 ---------------
0476 
0477 Number of queues
0478 
0479 Valid Range: 0 - 8 (up to AQ_CFG_VECS_MAX)
0480 
0481 Default value: 8
0482 
0483 Notice this value will be capped by the number of cores available on the system.
0484 
0485 AQ_CFG_IS_RSS_DEF
0486 -----------------
0487 
0488 Enable/disable Receive Side Scaling
0489 
0490 This feature allows the adapter to distribute receive processing
0491 across multiple CPU-cores and to prevent from overloading a single CPU core.
0492 
0493 Valid values
0494 
0495 ==  ========
0496 0   disabled
0497 1   enabled
0498 ==  ========
0499 
0500 Default value: 1
0501 
0502 AQ_CFG_NUM_RSS_QUEUES_DEF
0503 -------------------------
0504 
0505 Number of queues for Receive Side Scaling
0506 
0507 Valid Range: 0 - 8 (up to AQ_CFG_VECS_DEF)
0508 
0509 Default value: AQ_CFG_VECS_DEF
0510 
0511 AQ_CFG_IS_LRO_DEF
0512 -----------------
0513 
0514 Enable/disable Large Receive Offload
0515 
0516 This offload enables the adapter to coalesce multiple TCP segments and indicate
0517 them as a single coalesced unit to the OS networking subsystem.
0518 
0519 The system consumes less energy but it also introduces more latency in packets
0520 processing.
0521 
0522 Valid values
0523 
0524 ==  ========
0525 0   disabled
0526 1   enabled
0527 ==  ========
0528 
0529 Default value: 1
0530 
0531 AQ_CFG_TX_CLEAN_BUDGET
0532 ----------------------
0533 
0534 Maximum descriptors to cleanup on TX at once.
0535 
0536 Default value: 256
0537 
0538 After the aq_cfg.h file changed the driver must be rebuilt to take effect.
0539 
0540 Support
0541 =======
0542 
0543 If an issue is identified with the released source code on the supported
0544 kernel with a supported adapter, email the specific information related
0545 to the issue to aqn_support@marvell.com
0546 
0547 License
0548 =======
0549 
0550 aQuantia Corporation Network Driver
0551 
0552 Copyright |copy| 2014 - 2019 aQuantia Corporation.
0553 
0554 This program is free software; you can redistribute it and/or modify it
0555 under the terms and conditions of the GNU General Public License,
0556 version 2, as published by the Free Software Foundation.