私は、カーネル5.11.0-34-genericを含むLinux Mint 20.2で使用されるIntel 82599ESデュアル10Gbitカードを持っています。 「setpci」コマンドを使用して、MaxReadRequest値を512バイトから最大2048バイトに設定しようとしています。 lspciの出力は次のとおりです。
04:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
Subsystem: Intel Corporation Ethernet Server Adapter X520-2
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin B routed to IRQ 34
Region 0: Memory at e0300000 (64-bit, prefetchable) [size=512K]
Region 2: I/O ports at d000 [disabled] [size=32]
Region 4: Memory at e0400000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
Address: 0000000000000000 Data: 0000
Masking: 00000000 Pending: 00000000
Capabilities: [70] MSI-X: Enable+ Count=64 Masked-
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00002000
Capabilities: [a0] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0.000W
DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
MaxPayload 256 bytes, **MaxReadReq 512 bytes**
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr- TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s, Exit Latency L0s <1us
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x8 (ok)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, NROPrPrP-, LTR-
10BitTagComp-, 10BitTagReq-, OBFF Not Supported, ExtFmt-, EETLPPrefix-
EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
FRS-, TPHComp-, ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
AtomicOpsCtl: ReqEn-
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Intelデータシート82599では、デバイス制御レジスタが制御していることがわかります。MaxReadReq はバイトオフセット 0xA8 にあります。、具体的に:
82599ESの16進空間は次のとおりです。
sudo lspci -xxx -s 04:00.1
04:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
00: 86 80 fb 10 06 04 10 00 01 00 00 02 10 00 80 00
10: 0c 00 30 e0 00 00 00 00 01 d0 00 00 00 00 00 00
20: 0c 00 40 e0 00 00 00 00 00 00 00 00 86 80 03 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 ff 02 00 00
40: 01 50 23 48 00 20 00 2b 00 00 00 00 00 00 00 00
50: 05 70 80 01 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 11 a0 3f 80 04 00 00 00 04 20 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 10 00 02 00 c2 8c 00 10 3f 28 09 00 82 c4 01 00
b0: 40 00 82 10 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 1f 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Mellanoxで例を見つけました。最適なパフォーマンスのためのPCIe構成の理解しかし、彼らが使用していたsetpciコマンドを使用すると、何も起こらないようです。それはおそらく私が間違ったレジスタの場所を変更したからです。私はまだビット14:12の「バイトオフセット0xA8」を理解し、これをsetpciが理解できるものに変換する方法を見つけようとしています。
質問: 「setpci」コマンドを使用して0xA8の14:12ビットが何であるかを確認し、その値を「100b」に変更してMaxReadReqを512バイトから2048バイトに変更するにはどうすればよいですか?どんな助けでも大変感謝します!
ベストアンサー1
setpci -s 04:00.1 a8.w
デバイス制御レジスタの値を出力します。
-s 04:00.1
質問に示すように、デバイスの仕様です。a8
質問に示すように、デバイス制御レジスタのアドレス。.w
2バイト(勝つ(注文)登録.
よりPCI設定(8)詳しくはマニュアルページをご覧ください。
ご存じのとおり、ビット 12-14 はログマップの最大読み取り要求サイズを示します。 82599のIntelデータシート(質問を参照)に示すように、
- 0xxx→128
- 1xxx→256
- 2xxx→512
- 3xxx→1024
- 4xxx→2048
アダプターが最後の3桁の数字に対して返す値が何であれ、最初の数字を変更し、構文を使用して新しい値を設定します。たとえば、アダプタが返される場合name=value
283fでこれを2048バイトに設定する場合は、値を次に変更します。483f。
setpci -s 04:00.1 a8.w=483f
値なしで再エクスポートして読み取りを再試行して値を取得したことを確認してください。
setpci -s 04:00.1 a8.w
入力した値を返す必要があります。
電源を切り、再起動して有効にしてください。