← Documents Documentation/networking/device_drivers/ethernet/aquantia/atlantic.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

Marvell(Aquantia) AQtion Driver

Atlantic multi-gigabit adapter의 MTU, ethtool 진단, coalescing, ntuple filter, UDP GSO, ITR와 aq_cfg.h tuning을 설명합니다.

Source pathDocumentation/networking/device_drivers/ethernet/aquantia/atlantic.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

atlantic.rst:1-556

Atlantic driver는 100M부터 10G까지의 AQtion adapter를 ethtool 중심으로 운영합니다. 특히 ntuple filter location이 rule type별로 고정되어 있고, command line ITR와 compile-time `aq_cfg.h` tuning이 함께 존재한다는 점이 중요합니다.

지원 adapter와 media
항목지원·시험 범위
AdapterAQC-100, AQC-107, AQC-108
SFP+ 대상AQC-100 기반
CablePassive DAC
OpticalSFP+/LC transceiver

문서가 명시한 device family와 시험 media입니다.

Link와 MTU 설정
기능Command·값주의
Console link log`dmesg -n 8`Reboot 후 유지 안 됨
기본 MTU1500Jumbo frame 비활성
최대 MTU16000`ip link set mtu` 사용
PollingNAPIRx polling mode

기본 운영 command와 persistence 특성을 정리했습니다.

ethtool 진단
Command결과
`ethtool <ethX>`Link mode, speed, duplex, WOL
`ethtool -i <ethX>`Driver, firmware, PCI 정보
`ethtool -S <ethX>`NIC·DMA·queue 통계
`ethtool -c <ethX>`Coalescing 상태

Adapter 상태부터 queue별 통계까지 조회합니다.

Message level bit
범위대표 bit
Driver lifecycle`0x0001`, `0x0010`, `0x0020`
Link·periodic`0x0004`, `0x0008`
RX·TX error`0x0040`, `0x0080`
Interrupt·completion`0x0200`, `0x0400`, `0x0800`
Packet·hardware·WOL`0x1000`, `0x2000`, `0x4000`

필요한 debug category를 bitwise 조합할 수 있습니다.

Ntuple rule 배치
LocationRule type수량
0-15VLAN ID16
16-31L2 EtherType·PCP16
32-39L3/L4 5-tuple8
32, 36IPv6 5-tuple2

Hardware rule order 때문에 location 범위가 고정됩니다.

RX filter 처리
PacketVLAN ruleEtherType rule5-tuple ruleMatch`action` queue
No matchQueue 0
`action -1`Drop

일치하지 않는 flow는 queue 0, 일치하는 flow는 action queue로 갑니다.

VLAN mask 구분
RuleMaskLocation
VLAN ID`0xF000`0-15
EtherType + PCP`0x1FFF`16-31

같은 vlan parameter를 rule 성격에 따라 mask로 구분합니다.

UDP 기능
기능설정·제약
Fragmented UDP RSSHardware 미지원
UDP RSS 우회`flow-type udp4 action 0 loc 32`
UDP GSO`tx-udp-segmentation on`
GSO test`udpgso_bench_tx`

Fragment와 segmentation 상황에 따라 설정이 다릅니다.

Loopback private flag
Flag대상
`DMASystemLoopback`DMA host
`PKTSystemLoopback`Packet buffer host
`DMANetworkLoopback`DMA network side
`PHYInternalLoopback`PHY 내부
`PHYExternalLoopback`PHY 외부 cable

Hardware block별 test loopback을 제공합니다.

ITR mode
`aq_itr`Mode
0Throttling 비활성
1지정 TX/RX rate
0xFFFFLink speed 기반 auto

Command line parameter가 throttling strategy를 결정합니다.

RX memory tuning
Parameter기본값효과
`AQ_CFG_RX_PAGEORDER`0Page reuse 개선
`AQ_CFG_RX_REFILL_THRES`32큰 값은 reuse 개선·drop 위험
`AQ_CFG_VECS_DEF`8Queue 수, CPU core로 제한

Page 재사용과 packet drop 사이의 trade-off가 있습니다.

RSS·LRO tuning
Parameter기본값의미
`AQ_CFG_IS_RSS_DEF`1RSS 활성
`AQ_CFG_NUM_RSS_QUEUES_DEF``AQ_CFG_VECS_DEF`RSS queue 수
`AQ_CFG_IS_LRO_DEF`1LRO 활성, energy 절감·latency 증가
`AQ_CFG_TX_CLEAN_BUDGET`256한 번의 TX cleanup 한도

Compile-time default와 기능 효과입니다.

Config 적용
`aq_cfg.h` 수정Driver rebuildModule 설치Reload·reboot새 default 적용

aq_cfg.h parameter는 runtime setting이 아니므로 rebuild가 필요합니다.

운영 주의사항
항목주의
Ntuple off사용자 filter 전부 flush
IPv4·IPv6 filter동시 사용 불가
Action최대 31, -1은 drop
AQrate 표시Kernel > 4.10
Config file변경 후 rebuild

설정 변경 시 놓치기 쉬운 상태를 모았습니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2 .. include:: <isonum.txt>
3
4 ===============================
5 Marvell(Aquantia) AQtion Driver
6 ===============================
7
8 For the aQuantia Multi-Gigabit PCI Express Family of Ethernet Adapters
9
10 .. Contents
11
12 - Identifying Your Adapter
13 - Configuration
14 - Supported ethtool options
15 - Command Line Parameters
16 - Config file parameters
17 - Support
18 - License
19
20 Identifying Your Adapter
21 ========================
22
23 The driver in this release is compatible with AQC-100, AQC-107, AQC-108
24 based ethernet adapters.
25
26
27 SFP+ Devices (for AQC-100 based adapters)
28 -----------------------------------------
29
30 This release tested with passive Direct Attach Cables (DAC) and SFP+/LC
31 Optical Transceiver.
32
33 Configuration
34 =============
35
36 Viewing Link Messages
37 ---------------------
38 Link messages will not be displayed to the console if the distribution is
39 restricting system messages. In order to see network driver link messages on
40 your console, set dmesg to eight by entering the following::
41
42 dmesg -n 8
43
44 .. note::
45
46 This setting is not saved across reboots.
47
48 Jumbo Frames
49 ------------
50 The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
51 enabled by changing the MTU to a value larger than the default of 1500.
52 The maximum value for the MTU is 16000. Use the `ip` command to
53 increase the MTU size. For example::
54
55 ip link set mtu 16000 dev enp1s0
56
57 ethtool
58 -------
59 The driver utilizes the ethtool interface for driver configuration and
60 diagnostics, as well as displaying statistical information. The latest
61 ethtool version is required for this functionality.
62
63 NAPI
64 ----
65 NAPI (Rx polling mode) is supported in the atlantic driver.
66
67 Supported ethtool options
68 =========================
69
70 Viewing adapter settings
71 ------------------------
72
73 ::
74
75 ethtool <ethX>
76
77 Output example::
78
79 Settings for enp1s0:
80 Supported ports: [ TP ]
81 Supported link modes: 100baseT/Full
82 1000baseT/Full
83 10000baseT/Full
84 2500baseT/Full
85 5000baseT/Full
86 Supported pause frame use: Symmetric
87 Supports auto-negotiation: Yes
88 Supported FEC modes: Not reported
89 Advertised link modes: 100baseT/Full
90 1000baseT/Full
91 10000baseT/Full
92 2500baseT/Full
93 5000baseT/Full
94 Advertised pause frame use: Symmetric
95 Advertised auto-negotiation: Yes
96 Advertised FEC modes: Not reported
97 Speed: 10000Mb/s
98 Duplex: Full
99 Port: Twisted Pair
100 PHYAD: 0
101 Transceiver: internal
102 Auto-negotiation: on
103 MDI-X: Unknown
104 Supports Wake-on: g
105 Wake-on: d
106 Link detected: yes
107
108
109 .. note::
110
111 AQrate speeds (2.5/5 Gb/s) will be displayed only with linux kernels > 4.10.
112 But you can still use these speeds::
113
114 ethtool -s eth0 autoneg off speed 2500
115
116 Viewing adapter information
117 ---------------------------
118
119 ::
120
121 ethtool -i <ethX>
122
123 Output example::
124
125 driver: atlantic
126 version: 5.2.0-050200rc5-generic-kern
127 firmware-version: 3.1.78
128 expansion-rom-version:
129 bus-info: 0000:01:00.0
130 supports-statistics: yes
131 supports-test: no
132 supports-eeprom-access: no
133 supports-register-dump: yes
134 supports-priv-flags: no
135
136
137 Viewing Ethernet adapter statistics
138 -----------------------------------
139
140 ::
141
142 ethtool -S <ethX>
143
144 Output example::
145
146 NIC statistics:
147 InPackets: 13238607
148 InUCast: 13293852
149 InMCast: 52
150 InBCast: 3
151 InErrors: 0
152 OutPackets: 23703019
153 OutUCast: 23704941
154 OutMCast: 67
155 OutBCast: 11
156 InUCastOctects: 213182760
157 OutUCastOctects: 22698443
158 InMCastOctects: 6600
159 OutMCastOctects: 8776
160 InBCastOctects: 192
161 OutBCastOctects: 704
162 InOctects: 2131839552
163 OutOctects: 226938073
164 InPacketsDma: 95532300
165 OutPacketsDma: 59503397
166 InOctetsDma: 1137102462
167 OutOctetsDma: 2394339518
168 InDroppedDma: 0
169 Queue[0] InPackets: 23567131
170 Queue[0] OutPackets: 20070028
171 Queue[0] InJumboPackets: 0
172 Queue[0] InLroPackets: 0
173 Queue[0] InErrors: 0
174 Queue[1] InPackets: 45428967
175 Queue[1] OutPackets: 11306178
176 Queue[1] InJumboPackets: 0
177 Queue[1] InLroPackets: 0
178 Queue[1] InErrors: 0
179 Queue[2] InPackets: 3187011
180 Queue[2] OutPackets: 13080381
181 Queue[2] InJumboPackets: 0
182 Queue[2] InLroPackets: 0
183 Queue[2] InErrors: 0
184 Queue[3] InPackets: 23349136
185 Queue[3] OutPackets: 15046810
186 Queue[3] InJumboPackets: 0
187 Queue[3] InLroPackets: 0
188 Queue[3] InErrors: 0
189
190 Interrupt coalescing support
191 ----------------------------
192
193 ITR mode, TX/RX coalescing timings could be viewed with::
194
195 ethtool -c <ethX>
196
197 and changed with::
198
199 ethtool -C <ethX> tx-usecs <usecs> rx-usecs <usecs>
200
201 To disable coalescing::
202
203 ethtool -C <ethX> tx-usecs 0 rx-usecs 0 tx-max-frames 1 tx-max-frames 1
204
205 Wake on LAN support
206 -------------------
207
208 WOL support by magic packet::
209
210 ethtool -s <ethX> wol g
211
212 To disable WOL::
213
214 ethtool -s <ethX> wol d
215
216 Set and check the driver message level
217 --------------------------------------
218
219 Set message level
220
221 ::
222
223 ethtool -s <ethX> msglvl <level>
224
225 Level values:
226
227 ====== =============================
228 0x0001 general driver status.
229 0x0002 hardware probing.
230 0x0004 link state.
231 0x0008 periodic status check.
232 0x0010 interface being brought down.
233 0x0020 interface being brought up.
234 0x0040 receive error.
235 0x0080 transmit error.
236 0x0200 interrupt handling.
237 0x0400 transmit completion.
238 0x0800 receive completion.
239 0x1000 packet contents.
240 0x2000 hardware status.
241 0x4000 Wake-on-LAN status.
242 ====== =============================
243
244 By default, the level of debugging messages is set 0x0001(general driver status).
245
246 Check message level
247
248 ::
249
250 ethtool <ethX> | grep "Current message level"
251
252 If you want to disable the output of messages::
253
254 ethtool -s <ethX> msglvl 0
255
256 RX flow rules (ntuple filters)
257 ------------------------------
258
259 There are separate rules supported, that applies in that order:
260
261 1. 16 VLAN ID rules
262 2. 16 L2 EtherType rules
263 3. 8 L3/L4 5-Tuple rules
264
265
266 The driver utilizes the ethtool interface for configuring ntuple filters,
267 via ``ethtool -N <device> <filter>``.
268
269 To enable or disable the RX flow rules::
270
271 ethtool -K ethX ntuple <on|off>
272
273 When disabling ntuple filters, all the user programmed filters are
274 flushed from the driver cache and hardware. All needed filters must
275 be re-added when ntuple is re-enabled.
276
277 Because of the fixed order of the rules, the location of filters is also fixed:
278
279 - Locations 0 - 15 for VLAN ID filters
280 - Locations 16 - 31 for L2 EtherType filters
281 - Locations 32 - 39 for L3/L4 5-tuple filters (locations 32, 36 for IPv6)
282
283 The L3/L4 5-tuple (protocol, source and destination IP address, source and
284 destination TCP/UDP/SCTP port) is compared against 8 filters. For IPv4, up to
285 8 source and destination addresses can be matched. For IPv6, up to 2 pairs of
286 addresses can be supported. Source and destination ports are only compared for
287 TCP/UDP/SCTP packets.
288
289 To add a filter that directs packet to queue 5, use
290 ``<-N|-U|--config-nfc|--config-ntuple>`` switch::
291
292 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>
293
294 - action is the queue number.
295 - loc is the rule number.
296
297 For ``flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`` you must set the loc
298 number within 32 - 39.
299 For ``flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`` you can set 8 rules
300 for traffic IPv4 or you can set 2 rules for traffic IPv6. Loc number traffic
301 IPv6 is 32 and 36.
302 At the moment you can not use IPv4 and IPv6 filters at the same time.
303
304 Example filter for IPv6 filter traffic::
305
306 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
307 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
308
309 Example filter for IPv4 filter traffic::
310
311 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
312 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
313 sudo ethtool -N <ethX> flow-type ip4 src-ip 10.0.0.6 dst-ip 10.0.0.4 loc 34
314
315 If you set action -1, then all traffic corresponding to the filter will be discarded.
316
317 The maximum value action is 31.
318
319
320 The VLAN filter (VLAN id) is compared against 16 filters.
321 VLAN id must be accompanied by mask 0xF000. That is to distinguish VLAN filter
322 from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID
323 are passed in the same 'vlan' parameter.
324
325 To add a filter that directs packets from VLAN 2001 to queue 5::
326
327 ethtool -N <ethX> flow-type ip4 vlan 2001 m 0xF000 action 1 loc 0
328
329
330 L2 EtherType filters allows filter packet by EtherType field or both EtherType
331 and User Priority (PCP) field of 802.1Q.
332 UserPriority (vlan) parameter must be accompanied by mask 0x1FFF. That is to
333 distinguish VLAN filter from L2 Ethertype filter with UserPriority since both
334 User Priority and VLAN ID are passed in the same 'vlan' parameter.
335
336 To add a filter that directs IP4 packess of priority 3 to queue 3::
337
338 ethtool -N <ethX> flow-type ether proto 0x800 vlan 0x600 m 0x1FFF action 3 loc 16
339
340 To see the list of filters currently present::
341
342 ethtool <-u|-n|--show-nfc|--show-ntuple> <ethX>
343
344 Rules may be deleted from the table itself. This is done using::
345
346 sudo ethtool <-N|-U|--config-nfc|--config-ntuple> <ethX> delete <loc>
347
348 - loc is the rule number to be deleted.
349
350 Rx filters is an interface to load the filter table that funnels all flow
351 into queue 0 unless an alternative queue is specified using "action". In that
352 case, any flow that matches the filter criteria will be directed to the
353 appropriate queue. RX filters is supported on all kernels 2.6.30 and later.
354
355 RSS for UDP
356 -----------
357
358 Currently, NIC does not support RSS for fragmented IP packets, which leads to
359 incorrect working of RSS for fragmented UDP traffic. To disable RSS for UDP the
360 RX Flow L3/L4 rule may be used.
361
362 Example::
363
364 ethtool -N eth0 flow-type udp4 action 0 loc 32
365
366 UDP GSO hardware offload
367 ------------------------
368
369 UDP GSO allows to boost UDP tx rates by offloading UDP headers allocation
370 into hardware. A special userspace socket option is required for this,
371 could be validated with /kernel/tools/testing/selftests/net/::
372
373 udpgso_bench_tx -u -4 -D 10.0.1.1 -s 6300 -S 100
374
375 Will cause sending out of 100 byte sized UDP packets formed from single
376 6300 bytes user buffer.
377
378 UDP GSO is configured by::
379
380 ethtool -K eth0 tx-udp-segmentation on
381
382 Private flags (testing)
383 -----------------------
384
385 Atlantic driver supports private flags for hardware custom features::
386
387 $ ethtool --show-priv-flags ethX
388
389 Private flags for ethX:
390 DMASystemLoopback : off
391 PKTSystemLoopback : off
392 DMANetworkLoopback : off
393 PHYInternalLoopback: off
394 PHYExternalLoopback: off
395
396 Example::
397
398 $ ethtool --set-priv-flags ethX DMASystemLoopback on
399
400 DMASystemLoopback: DMA Host loopback.
401 PKTSystemLoopback: Packet buffer host loopback.
402 DMANetworkLoopback: Network side loopback on DMA block.
403 PHYInternalLoopback: Internal loopback on Phy.
404 PHYExternalLoopback: External loopback on Phy (with loopback ethernet cable).
405
406
407 Command Line Parameters
408 =======================
409 The following command line parameters are available on atlantic driver:
410
411 aq_itr -Interrupt throttling mode
412 ---------------------------------
413 Accepted values: 0, 1, 0xFFFF
414
415 Default value: 0xFFFF
416
417 ====== ==============================================================
418 0 Disable interrupt throttling.
419 1 Enable interrupt throttling and use specified tx and rx rates.
420 0xFFFF Auto throttling mode. Driver will choose the best RX and TX
421 interrupt throttling settings based on link speed.
422 ====== ==============================================================
423
424 aq_itr_tx - TX interrupt throttle rate
425 --------------------------------------
426
427 Accepted values: 0 - 0x1FF
428
429 Default value: 0
430
431 TX side throttling in microseconds. Adapter will setup maximum interrupt delay
432 to this value. Minimum interrupt delay will be a half of this value
433
434 aq_itr_rx - RX interrupt throttle rate
435 --------------------------------------
436
437 Accepted values: 0 - 0x1FF
438
439 Default value: 0
440
441 RX side throttling in microseconds. Adapter will setup maximum interrupt delay
442 to this value. Minimum interrupt delay will be a half of this value
443
444 .. note::
445
446 ITR settings could be changed in runtime by ethtool -c means (see below)
447
448 Config file parameters
449 ======================
450
451 For some fine tuning and performance optimizations,
452 some parameters can be changed in the {source_dir}/aq_cfg.h file.
453
454 AQ_CFG_RX_PAGEORDER
455 -------------------
456
457 Default value: 0
458
459 RX page order override. That's a power of 2 number of RX pages allocated for
460 each descriptor. Received descriptor size is still limited by
461 AQ_CFG_RX_FRAME_MAX.
462
463 Increasing pageorder makes page reuse better (actual on iommu enabled systems).
464
465 AQ_CFG_RX_REFILL_THRES
466 ----------------------
467
468 Default value: 32
469
470 RX refill threshold. RX path will not refill freed descriptors until the
471 specified number of free descriptors is observed. Larger values may help
472 better page reuse but may lead to packet drops as well.
473
474 AQ_CFG_VECS_DEF
475 ---------------
476
477 Number of queues
478
479 Valid Range: 0 - 8 (up to AQ_CFG_VECS_MAX)
480
481 Default value: 8
482
483 Notice this value will be capped by the number of cores available on the system.
484
485 AQ_CFG_IS_RSS_DEF
486 -----------------
487
488 Enable/disable Receive Side Scaling
489
490 This feature allows the adapter to distribute receive processing
491 across multiple CPU-cores and to prevent from overloading a single CPU core.
492
493 Valid values
494
495 == ========
496 0 disabled
497 1 enabled
498 == ========
499
500 Default value: 1
501
502 AQ_CFG_NUM_RSS_QUEUES_DEF
503 -------------------------
504
505 Number of queues for Receive Side Scaling
506
507 Valid Range: 0 - 8 (up to AQ_CFG_VECS_DEF)
508
509 Default value: AQ_CFG_VECS_DEF
510
511 AQ_CFG_IS_LRO_DEF
512 -----------------
513
514 Enable/disable Large Receive Offload
515
516 This offload enables the adapter to coalesce multiple TCP segments and indicate
517 them as a single coalesced unit to the OS networking subsystem.
518
519 The system consumes less energy but it also introduces more latency in packets
520 processing.
521
522 Valid values
523
524 == ========
525 0 disabled
526 1 enabled
527 == ========
528
529 Default value: 1
530
531 AQ_CFG_TX_CLEAN_BUDGET
532 ----------------------
533
534 Maximum descriptors to cleanup on TX at once.
535
536 Default value: 256
537
538 After the aq_cfg.h file changed the driver must be rebuilt to take effect.
539
540 Support
541 =======
542
543 If an issue is identified with the released source code on the supported
544 kernel with a supported adapter, email the specific information related
545 to the issue to aqn_support@marvell.com
546
547 License
548 =======
549
550 aQuantia Corporation Network Driver
551
552 Copyright |copy| 2014 - 2019 aQuantia Corporation.
553
554 This program is free software; you can redistribute it and/or modify it
555 under the terms and conditions of the GNU General Public License,
556 version 2, as published by the Free Software Foundation.
557

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Adapter 식별과 기본 configuration

1-66

Marvell(Aquantia) AQtion Driver

aQuantia Multi-Gigabit PCI Express Ethernet Adapter family용 driver입니다.

이 문서는 adapter 식별, configuration, 지원 ethtool option, command line parameter, config file parameter, 지원 및 license를 설명합니다.

Adapter 식별

이 release의 driver는 AQC-100, AQC-107, AQC-108 기반 Ethernet adapter와 호환됩니다.

SFP+ device(AQC-100 기반 adapter)

이 release는 passive Direct Attach Cable(`DAC`) 및 SFP+/LC optical transceiver로 시험했습니다.

Configuration

Link message 보기

Distribution이 system message를 제한하면 link message가 console에 표시되지 않습니다. Network driver link message를 console에서 보려면 다음과 같이 dmesg level을 8로 설정합니다.

dmesg -n 8

이 설정은 reboot 후 유지되지 않습니다.

Jumbo frame

Driver는 모든 adapter에서 Jumbo Frame을 지원합니다. 기본값 1500보다 큰 MTU로 변경하면 활성화됩니다. 최대 MTU는 16000이며 `ip` command로 늘립니다.

ip link set mtu 16000 dev enp1s0

ethtool

Driver는 configuration, 진단, 통계 표시를 위해 ethtool interface를 사용합니다. 이 기능을 사용하려면 최신 ethtool version이 필요합니다.

NAPI

Atlantic driver는 NAPI, 즉 Rx polling mode를 지원합니다.

.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>

===============================
Marvell(Aquantia) AQtion Driver
===============================

For the aQuantia Multi-Gigabit PCI Express Family of Ethernet Adapters

.. Contents

    - Identifying Your Adapter
    - Configuration
    - Supported ethtool options
    - Command Line Parameters
    - Config file parameters
    - Support
    - License

Identifying Your Adapter
========================

The driver in this release is compatible with AQC-100, AQC-107, AQC-108
based ethernet adapters.


SFP+ Devices (for AQC-100 based adapters)
-----------------------------------------

This release tested with passive Direct Attach Cables (DAC) and SFP+/LC
Optical Transceiver.

Configuration
=============

Viewing Link Messages
---------------------
  Link messages will not be displayed to the console if the distribution is
  restricting system messages. In order to see network driver link messages on
  your console, set dmesg to eight by entering the following::

       dmesg -n 8

  .. note::

     This setting is not saved across reboots.

Jumbo Frames
------------
  The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
  enabled by changing the MTU to a value larger than the default of 1500.
  The maximum value for the MTU is 16000.  Use the `ip` command to
  increase the MTU size.  For example::

        ip link set mtu 16000 dev enp1s0

ethtool
-------
  The driver utilizes the ethtool interface for driver configuration and
  diagnostics, as well as displaying statistical information. The latest
  ethtool version is required for this functionality.

NAPI
----
  NAPI (Rx polling mode) is supported in the atlantic driver.

Adapter setting과 driver 정보

67-135

지원 ethtool option

Adapter setting 보기

ethtool <ethX>

출력에는 지원 port, 100M/1G/2.5G/5G/10G full-duplex link mode, pause frame, auto-negotiation, FEC, 광고 link mode, 현재 speed와 duplex, port, PHY address, transceiver, MDI-X, Wake-on-LAN, link 감지 상태가 포함됩니다.

예시에서는 `enp1s0`이 twisted pair port에서 10000Mb/s full-duplex로 연결되어 있고 auto-negotiation은 켜져 있으며 Wake-on-LAN capability는 magic packet(`g`)이지만 현재는 비활성(`d`)입니다.

AQrate 속도인 2.5Gb/s와 5Gb/s는 Linux kernel 4.10보다 새로운 version에서만 표시됩니다. 표시되지 않아도 다음과 같이 사용할 수 있습니다.

ethtool -s eth0 autoneg off speed 2500

Adapter 정보 보기

ethtool -i <ethX>

출력 예시는 driver `atlantic`, kernel driver version, firmware version `3.1.78`, PCI bus `0000:01:00.0`을 보여줍니다. Statistics와 register dump는 지원하고 test, EEPROM access, private flag는 이 예시에서 지원하지 않습니다.

Supported ethtool options
=========================

Viewing adapter settings
------------------------

 ::

    ethtool <ethX>

 Output example::

  Settings for enp1s0:
    Supported ports: [ TP ]
    Supported link modes:   100baseT/Full
                            1000baseT/Full
                            10000baseT/Full
                            2500baseT/Full
                            5000baseT/Full
    Supported pause frame use: Symmetric
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  100baseT/Full
                            1000baseT/Full
                            10000baseT/Full
                            2500baseT/Full
                            5000baseT/Full
    Advertised pause frame use: Symmetric
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: 10000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: Unknown
    Supports Wake-on: g
    Wake-on: d
    Link detected: yes


 .. note::

    AQrate speeds (2.5/5 Gb/s) will be displayed only with linux kernels > 4.10.
    But you can still use these speeds::

        ethtool -s eth0 autoneg off speed 2500

Viewing adapter information
---------------------------

 ::

  ethtool -i <ethX>

 Output example::

  driver: atlantic
  version: 5.2.0-050200rc5-generic-kern
  firmware-version: 3.1.78
  expansion-rom-version:
  bus-info: 0000:01:00.0
  supports-statistics: yes
  supports-test: no
  supports-eeprom-access: no
  supports-register-dump: yes
  supports-priv-flags: no

통계, coalescing, WOL과 message level

136-255

Ethernet adapter 통계 보기

ethtool -S <ethX>

출력은 NIC 전체 packet, unicast, multicast, broadcast, error, octet counter와 DMA packet·octet·drop counter를 포함합니다. 또한 각 queue의 input/output packet, jumbo packet, LRO packet, error counter를 제공합니다.

  • `InPackets`, `OutPackets`: 전체 입출력 packet 수
  • `InUCast`, `InMCast`, `InBCast` 및 송신 대응 counter: traffic 유형별 packet 수
  • `InErrors`: 수신 error
  • `InOctects`, `OutOctects`: MAC octet 수
  • `InPacketsDma`, `OutPacketsDma`, `InOctetsDma`, `OutOctetsDma`: DMA 기준 counter
  • `InDroppedDma`: DMA drop
  • `Queue[n] InPackets`, `OutPackets`, `InJumboPackets`, `InLroPackets`, `InErrors`: queue별 통계

Interrupt coalescing 지원

ITR mode와 TX/RX coalescing timing은 다음 command로 봅니다.

ethtool -c <ethX>

다음 command로 변경합니다.

ethtool -C <ethX> tx-usecs <usecs> rx-usecs <usecs>

Coalescing을 비활성화하려면 다음과 같이 설정합니다.

ethtool -C <ethX> tx-usecs 0 rx-usecs 0 tx-max-frames 1 tx-max-frames 1

Wake on LAN 지원

Magic packet WOL을 활성화합니다.

ethtool -s <ethX> wol g

WOL을 비활성화합니다.

ethtool -s <ethX> wol d

Driver message level 설정과 확인

ethtool -s <ethX> msglvl <level>
  • `0x0001`: 일반 driver 상태
  • `0x0002`: hardware probing
  • `0x0004`: link 상태
  • `0x0008`: 주기적 상태 확인
  • `0x0010`: interface down
  • `0x0020`: interface up
  • `0x0040`: receive error
  • `0x0080`: transmit error
  • `0x0200`: interrupt 처리
  • `0x0400`: transmit completion
  • `0x0800`: receive completion
  • `0x1000`: packet 내용
  • `0x2000`: hardware 상태
  • `0x4000`: Wake-on-LAN 상태

기본 debug message level은 일반 driver 상태인 `0x0001`입니다.

현재 message level은 다음과 같이 확인합니다.

ethtool <ethX> | grep "Current message level"

Message 출력을 끄려면 다음과 같이 설정합니다.

ethtool -s <ethX> msglvl 0

Viewing Ethernet adapter statistics
-----------------------------------

 ::

    ethtool -S <ethX>

 Output example::

  NIC statistics:
     InPackets: 13238607
     InUCast: 13293852
     InMCast: 52
     InBCast: 3
     InErrors: 0
     OutPackets: 23703019
     OutUCast: 23704941
     OutMCast: 67
     OutBCast: 11
     InUCastOctects: 213182760
     OutUCastOctects: 22698443
     InMCastOctects: 6600
     OutMCastOctects: 8776
     InBCastOctects: 192
     OutBCastOctects: 704
     InOctects: 2131839552
     OutOctects: 226938073
     InPacketsDma: 95532300
     OutPacketsDma: 59503397
     InOctetsDma: 1137102462
     OutOctetsDma: 2394339518
     InDroppedDma: 0
     Queue[0] InPackets: 23567131
     Queue[0] OutPackets: 20070028
     Queue[0] InJumboPackets: 0
     Queue[0] InLroPackets: 0
     Queue[0] InErrors: 0
     Queue[1] InPackets: 45428967
     Queue[1] OutPackets: 11306178
     Queue[1] InJumboPackets: 0
     Queue[1] InLroPackets: 0
     Queue[1] InErrors: 0
     Queue[2] InPackets: 3187011
     Queue[2] OutPackets: 13080381
     Queue[2] InJumboPackets: 0
     Queue[2] InLroPackets: 0
     Queue[2] InErrors: 0
     Queue[3] InPackets: 23349136
     Queue[3] OutPackets: 15046810
     Queue[3] InJumboPackets: 0
     Queue[3] InLroPackets: 0
     Queue[3] InErrors: 0

Interrupt coalescing support
----------------------------

 ITR mode, TX/RX coalescing timings could be viewed with::

    ethtool -c <ethX>

 and changed with::

    ethtool -C <ethX> tx-usecs <usecs> rx-usecs <usecs>

 To disable coalescing::

    ethtool -C <ethX> tx-usecs 0 rx-usecs 0 tx-max-frames 1 tx-max-frames 1

Wake on LAN support
-------------------

 WOL support by magic packet::

    ethtool -s <ethX> wol g

 To disable WOL::

    ethtool -s <ethX> wol d

Set and check the driver message level
--------------------------------------

 Set message level

 ::

    ethtool -s <ethX> msglvl <level>

 Level values:

 ======   =============================
 0x0001   general driver status.
 0x0002   hardware probing.
 0x0004   link state.
 0x0008   periodic status check.
 0x0010   interface being brought down.
 0x0020   interface being brought up.
 0x0040   receive error.
 0x0080   transmit error.
 0x0200   interrupt handling.
 0x0400   transmit completion.
 0x0800   receive completion.
 0x1000   packet contents.
 0x2000   hardware status.
 0x4000   Wake-on-LAN status.
 ======   =============================

 By default, the level of debugging messages is set 0x0001(general driver status).

 Check message level

 ::

    ethtool <ethX> | grep "Current message level"

 If you want to disable the output of messages::

    ethtool -s <ethX> msglvl 0

RX flow rule과 ntuple filter

256-354

RX flow rule(ntuple filter)

다음과 같은 별도 rule이 이 순서로 적용됩니다.

  • VLAN ID rule 16개
  • L2 EtherType rule 16개
  • L3/L4 5-tuple rule 8개

Driver는 `ethtool -N <device> <filter>`로 ntuple filter를 설정합니다.

RX flow rule을 켜거나 끕니다.

ethtool -K ethX ntuple <on|off>

Ntuple filter를 끄면 사용자가 설정한 모든 filter가 driver cache와 hardware에서 제거됩니다. 다시 켤 때 필요한 filter를 모두 재등록해야 합니다.

Rule 순서가 고정되어 있으므로 filter location도 고정됩니다.

  • Location 0~15: VLAN ID filter
  • Location 16~31: L2 EtherType filter
  • Location 32~39: L3/L4 5-tuple filter, IPv6는 32와 36

L3/L4 5-tuple은 protocol, source·destination IP address, source·destination TCP/UDP/SCTP port를 8개 filter와 비교합니다. IPv4는 source와 destination address를 최대 8쌍, IPv6는 최대 2쌍 지원합니다. Port는 TCP/UDP/SCTP packet에서만 비교합니다.

Packet을 queue 5로 보내는 filter 예시는 다음과 같습니다.

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>

`action`은 queue 번호이고 `loc`은 rule 번호입니다.

`flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`에서는 `loc`을 32~39로 지정해야 합니다. IPv4 traffic rule은 8개, IPv6는 2개를 설정할 수 있으며 IPv6 location은 32와 36입니다. 현재 IPv4와 IPv6 filter를 동시에 사용할 수 없습니다.

IPv6 traffic filter 예시입니다.

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
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

IPv4 traffic filter 예시입니다.

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
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
sudo ethtool -N <ethX> flow-type ip4 src-ip 10.0.0.6 dst-ip 10.0.0.4 loc 34

`action -1`을 설정하면 filter와 일치하는 모든 traffic을 폐기합니다. `action`의 최대값은 31입니다.

VLAN filter는 VLAN ID를 16개 filter와 비교합니다. VLAN ID에는 mask `0xF000`을 함께 지정해야 합니다. User Priority와 VLAN ID가 같은 `vlan` parameter로 전달되므로 이를 UserPriority가 있는 L2 EtherType filter와 구분하기 위해서입니다.

VLAN 2001 packet을 queue 5로 보내는 예시입니다.

ethtool -N <ethX> flow-type ip4 vlan 2001 m 0xF000 action 1 loc 0

L2 EtherType filter는 EtherType field 또는 EtherType과 802.1Q User Priority(`PCP`) field를 함께 사용해 packet을 filter합니다. UserPriority(`vlan`) parameter에는 mask `0x1FFF`를 함께 지정해야 VLAN filter와 구분할 수 있습니다.

Priority 3의 IPv4 packet을 queue 3으로 보내는 예시입니다.

ethtool -N <ethX> flow-type ether proto 0x800 vlan 0x600 m 0x1FFF action 3 loc 16

현재 filter 목록을 봅니다.

ethtool <-u|-n|--show-nfc|--show-ntuple> <ethX>

Table에서 rule을 삭제합니다.

sudo ethtool <-N|-U|--config-nfc|--config-ntuple> <ethX> delete <loc>

`loc`은 삭제할 rule 번호입니다. Rx filter는 기본적으로 모든 flow를 queue 0으로 보내며 `action`으로 대체 queue를 지정할 수 있습니다. Filter 조건과 일치하는 flow는 해당 queue로 전달됩니다. RX filter는 kernel 2.6.30 이상에서 지원됩니다.

RX flow rules (ntuple filters)
------------------------------

 There are separate rules supported, that applies in that order:

 1. 16 VLAN ID rules
 2. 16 L2 EtherType rules
 3. 8 L3/L4 5-Tuple rules


 The driver utilizes the ethtool interface for configuring ntuple filters,
 via ``ethtool -N <device> <filter>``.

 To enable or disable the RX flow rules::

    ethtool -K ethX ntuple <on|off>

 When disabling ntuple filters, all the user programmed filters are
 flushed from the driver cache and hardware. All needed filters must
 be re-added when ntuple is re-enabled.

 Because of the fixed order of the rules, the location of filters is also fixed:

 - Locations 0 - 15 for VLAN ID filters
 - Locations 16 - 31 for L2 EtherType filters
 - Locations 32 - 39 for L3/L4 5-tuple filters (locations 32, 36 for IPv6)

 The L3/L4 5-tuple (protocol, source and destination IP address, source and
 destination TCP/UDP/SCTP port) is compared against 8 filters. For IPv4, up to
 8 source and destination addresses can be matched. For IPv6, up to 2 pairs of
 addresses can be supported. Source and destination ports are only compared for
 TCP/UDP/SCTP packets.

 To add a filter that directs packet to queue 5, use
 ``<-N|-U|--config-nfc|--config-ntuple>`` switch::

    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>

 - action is the queue number.
 - loc is the rule number.

 For ``flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`` you must set the loc
 number within 32 - 39.
 For ``flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`` you can set 8 rules
 for traffic IPv4 or you can set 2 rules for traffic IPv6. Loc number traffic
 IPv6 is 32 and 36.
 At the moment you can not use IPv4 and IPv6 filters at the same time.

 Example filter for IPv6 filter traffic::

    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
    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

 Example filter for IPv4 filter traffic::

    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
    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
    sudo ethtool -N <ethX> flow-type ip4 src-ip 10.0.0.6 dst-ip 10.0.0.4 loc 34

 If you set action -1, then all traffic corresponding to the filter will be discarded.

 The maximum value action is 31.


 The VLAN filter (VLAN id) is compared against 16 filters.
 VLAN id must be accompanied by mask 0xF000. That is to distinguish VLAN filter
 from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID
 are passed in the same 'vlan' parameter.

 To add a filter that directs packets from VLAN 2001 to queue 5::

    ethtool -N <ethX> flow-type ip4 vlan 2001 m 0xF000 action 1 loc 0


 L2 EtherType filters allows filter packet by EtherType field or both EtherType
 and User Priority (PCP) field of 802.1Q.
 UserPriority (vlan) parameter must be accompanied by mask 0x1FFF. That is to
 distinguish VLAN filter from L2 Ethertype filter with UserPriority since both
 User Priority and VLAN ID are passed in the same 'vlan' parameter.

 To add a filter that directs IP4 packess of priority 3 to queue 3::

    ethtool -N <ethX> flow-type ether proto 0x800 vlan 0x600 m 0x1FFF action 3 loc 16

 To see the list of filters currently present::

    ethtool <-u|-n|--show-nfc|--show-ntuple> <ethX>

 Rules may be deleted from the table itself. This is done using::

    sudo ethtool <-N|-U|--config-nfc|--config-ntuple> <ethX> delete <loc>

 - loc is the rule number to be deleted.

 Rx filters is an interface to load the filter table that funnels all flow
 into queue 0 unless an alternative queue is specified using "action". In that
 case, any flow that matches the filter criteria will be directed to the
 appropriate queue. RX filters is supported on all kernels 2.6.30 and later.

UDP RSS·GSO와 private test flag

355-406

UDP용 RSS

현재 NIC는 fragmented IP packet의 RSS를 지원하지 않아 fragmented UDP traffic에서 RSS가 올바르게 동작하지 않습니다. UDP RSS를 끄려면 RX Flow L3/L4 rule을 사용할 수 있습니다.

ethtool -N eth0 flow-type udp4 action 0 loc 32

UDP GSO hardware offload

UDP GSO는 UDP header 할당을 hardware로 offload하여 UDP 송신 속도를 높입니다. 이를 사용하려면 특별한 userspace socket option이 필요하며 `/kernel/tools/testing/selftests/net/`의 다음 command로 검증할 수 있습니다.

udpgso_bench_tx -u -4 -D 10.0.1.1 -s 6300 -S 100

이 command는 하나의 6300-byte user buffer에서 만든 100-byte UDP packet을 송신합니다.

UDP GSO는 다음과 같이 설정합니다.

ethtool -K eth0 tx-udp-segmentation on

Private flag(testing)

Atlantic driver는 hardware custom feature용 private flag를 지원합니다.

$ ethtool --show-priv-flags ethX

Private flags for ethX:
DMASystemLoopback  : off
PKTSystemLoopback  : off
DMANetworkLoopback : off
PHYInternalLoopback: off
PHYExternalLoopback: off

설정 예시는 다음과 같습니다.

ethtool --set-priv-flags ethX DMASystemLoopback on
  • `DMASystemLoopback`: DMA host loopback
  • `PKTSystemLoopback`: packet buffer host loopback
  • `DMANetworkLoopback`: DMA block의 network side loopback
  • `PHYInternalLoopback`: PHY 내부 loopback
  • `PHYExternalLoopback`: loopback Ethernet cable을 사용하는 PHY 외부 loopback
RSS for UDP
-----------

 Currently, NIC does not support RSS for fragmented IP packets, which leads to
 incorrect working of RSS for fragmented UDP traffic. To disable RSS for UDP the
 RX Flow L3/L4 rule may be used.

 Example::

    ethtool -N eth0 flow-type udp4 action 0 loc 32

UDP GSO hardware offload
------------------------

 UDP GSO allows to boost UDP tx rates by offloading UDP headers allocation
 into hardware. A special userspace socket option is required for this,
 could be validated with /kernel/tools/testing/selftests/net/::

    udpgso_bench_tx -u -4 -D 10.0.1.1 -s 6300 -S 100

 Will cause sending out of 100 byte sized UDP packets formed from single
 6300 bytes user buffer.

 UDP GSO is configured by::

    ethtool -K eth0 tx-udp-segmentation on

Private flags (testing)
-----------------------

 Atlantic driver supports private flags for hardware custom features::

        $ ethtool --show-priv-flags ethX

        Private flags for ethX:
        DMASystemLoopback  : off
        PKTSystemLoopback  : off
        DMANetworkLoopback : off
        PHYInternalLoopback: off
        PHYExternalLoopback: off

 Example::

        $ ethtool --set-priv-flags ethX DMASystemLoopback on

 DMASystemLoopback:   DMA Host loopback.
 PKTSystemLoopback:   Packet buffer host loopback.
 DMANetworkLoopback:  Network side loopback on DMA block.
 PHYInternalLoopback: Internal loopback on Phy.
 PHYExternalLoopback: External loopback on Phy (with loopback ethernet cable).

Interrupt throttling command line parameter

407-447

Command line parameter

Atlantic driver는 다음 command line parameter를 제공합니다.

`aq_itr`: interrupt throttling mode

허용값은 `0`, `1`, `0xFFFF`이고 기본값은 `0xFFFF`입니다.

  • `0`: interrupt throttling을 비활성화합니다.
  • `1`: interrupt throttling을 활성화하고 지정된 TX/RX rate를 사용합니다.
  • `0xFFFF`: auto throttling mode입니다. Driver가 link speed에 따라 최적의 RX/TX interrupt throttling setting을 선택합니다.

`aq_itr_tx`: TX interrupt throttle rate

허용 범위는 `0`~`0x1FF`, 기본값은 `0`입니다. TX throttling을 microsecond 단위로 지정합니다. Adapter의 최대 interrupt delay가 이 값이고 최소 delay는 절반입니다.

`aq_itr_rx`: RX interrupt throttle rate

허용 범위는 `0`~`0x1FF`, 기본값은 `0`입니다. RX throttling을 microsecond 단위로 지정합니다. Adapter의 최대 interrupt delay가 이 값이고 최소 delay는 절반입니다.

ITR setting은 runtime에 `ethtool -c` 계열 command로 변경할 수 있습니다.

Command Line Parameters
=======================
The following command line parameters are available on atlantic driver:

aq_itr -Interrupt throttling mode
---------------------------------
Accepted values: 0, 1, 0xFFFF

Default value: 0xFFFF

======   ==============================================================
0        Disable interrupt throttling.
1        Enable interrupt throttling and use specified tx and rx rates.
0xFFFF   Auto throttling mode. Driver will choose the best RX and TX
         interrupt throttling settings based on link speed.
======   ==============================================================

aq_itr_tx - TX interrupt throttle rate
--------------------------------------

Accepted values: 0 - 0x1FF

Default value: 0

TX side throttling in microseconds. Adapter will setup maximum interrupt delay
to this value. Minimum interrupt delay will be a half of this value

aq_itr_rx - RX interrupt throttle rate
--------------------------------------

Accepted values: 0 - 0x1FF

Default value: 0

RX side throttling in microseconds. Adapter will setup maximum interrupt delay
to this value. Minimum interrupt delay will be a half of this value

.. note::

   ITR settings could be changed in runtime by ethtool -c means (see below)

RX page, refill과 queue config

448-483

Config file parameter

세밀한 tuning과 성능 최적화를 위해 `{source_dir}/aq_cfg.h`의 일부 parameter를 변경할 수 있습니다.

`AQ_CFG_RX_PAGEORDER`

기본값은 `0`입니다. Descriptor마다 할당할 RX page 수의 2의 거듭제곱 order를 override합니다. 수신 descriptor 크기는 계속 `AQ_CFG_RX_FRAME_MAX`로 제한됩니다. Page order를 늘리면 특히 IOMMU가 활성화된 system에서 page 재사용이 좋아집니다.

`AQ_CFG_RX_REFILL_THRES`

기본값은 `32`입니다. RX refill threshold로, 지정한 수의 free descriptor가 관찰될 때까지 RX path가 해제된 descriptor를 refill하지 않습니다. 큰 값은 page 재사용을 개선할 수 있지만 packet drop을 유발할 수도 있습니다.

`AQ_CFG_VECS_DEF`

Queue 수를 지정하며 유효 범위는 `0`~`8`, 즉 `AQ_CFG_VECS_MAX`까지입니다. 기본값은 `8`입니다. 실제 값은 system에서 사용할 수 있는 core 수로 제한됩니다.

Config file parameters
======================

For some fine tuning and performance optimizations,
some parameters can be changed in the {source_dir}/aq_cfg.h file.

AQ_CFG_RX_PAGEORDER
-------------------

Default value: 0

RX page order override. That's a power of 2 number of RX pages allocated for
each descriptor. Received descriptor size is still limited by
AQ_CFG_RX_FRAME_MAX.

Increasing pageorder makes page reuse better (actual on iommu enabled systems).

AQ_CFG_RX_REFILL_THRES
----------------------

Default value: 32

RX refill threshold. RX path will not refill freed descriptors until the
specified number of free descriptors is observed. Larger values may help
better page reuse but may lead to packet drops as well.

AQ_CFG_VECS_DEF
---------------

Number of queues

Valid Range: 0 - 8 (up to AQ_CFG_VECS_MAX)

Default value: 8

Notice this value will be capped by the number of cores available on the system.

RSS, LRO와 cleanup config

484-538

`AQ_CFG_IS_RSS_DEF`

Receive Side Scaling을 활성화하거나 비활성화합니다. Adapter가 receive processing을 여러 CPU core에 분산하여 단일 core overload를 방지합니다. `0`은 비활성, `1`은 활성이고 기본값은 `1`입니다.

`AQ_CFG_NUM_RSS_QUEUES_DEF`

Receive Side Scaling용 queue 수입니다. 유효 범위는 `0`~`8`, 즉 `AQ_CFG_VECS_DEF`까지이며 기본값은 `AQ_CFG_VECS_DEF`입니다.

`AQ_CFG_IS_LRO_DEF`

Large Receive Offload를 활성화하거나 비활성화합니다. Adapter가 여러 TCP segment를 하나의 병합 unit으로 합쳐 OS networking subsystem에 전달합니다. System energy 소비는 줄지만 packet processing latency는 늘어납니다. `0`은 비활성, `1`은 활성이고 기본값은 `1`입니다.

`AQ_CFG_TX_CLEAN_BUDGET`

한 번에 TX에서 cleanup할 최대 descriptor 수이며 기본값은 `256`입니다.

`aq_cfg.h`를 변경한 뒤에는 효과를 적용하려면 driver를 다시 build해야 합니다.


AQ_CFG_IS_RSS_DEF
-----------------

Enable/disable Receive Side Scaling

This feature allows the adapter to distribute receive processing
across multiple CPU-cores and to prevent from overloading a single CPU core.

Valid values

==  ========
0   disabled
1   enabled
==  ========

Default value: 1

AQ_CFG_NUM_RSS_QUEUES_DEF
-------------------------

Number of queues for Receive Side Scaling

Valid Range: 0 - 8 (up to AQ_CFG_VECS_DEF)

Default value: AQ_CFG_VECS_DEF

AQ_CFG_IS_LRO_DEF
-----------------

Enable/disable Large Receive Offload

This offload enables the adapter to coalesce multiple TCP segments and indicate
them as a single coalesced unit to the OS networking subsystem.

The system consumes less energy but it also introduces more latency in packets
processing.

Valid values

==  ========
0   disabled
1   enabled
==  ========

Default value: 1

AQ_CFG_TX_CLEAN_BUDGET
----------------------

Maximum descriptors to cleanup on TX at once.

Default value: 256

After the aq_cfg.h file changed the driver must be rebuilt to take effect.

지원과 license

539-556

지원

지원되는 kernel과 adapter에서 release source code 문제가 확인되면 문제 관련 구체적인 정보를 `aqn_support@marvell.com`으로 보내십시오.

License

aQuantia Corporation Network Driver

Copyright © 2014-2019 aQuantia Corporation.

이 program은 Free Software Foundation이 공개한 GNU General Public License version 2의 조건에 따라 재배포하거나 수정할 수 있는 free software입니다.


Support
=======

If an issue is identified with the released source code on the supported
kernel with a supported adapter, email the specific information related
to the issue to aqn_support@marvell.com

License
=======

aQuantia Corporation Network Driver

Copyright |copy| 2014 - 2019 aQuantia Corporation.

This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.