PCIe Bandwith issue with Lan adapter

Hi, Im trying a Microchip Lan743x pcie ethernet adapter on a jetson tx2 dev board with jetpack 4.5.1.
Since the 4.9 kernel does not contain the driver for the adapter I patched in the sources from the mainline 4.20 kernel.

Add first glance the adapter seems to work lspci list following stats:

01:00.0 Ethernet controller: Microchip Technology / SMSC Device 7430 (rev 11)
        Subsystem: Microchip Technology / SMSC Device 7430
        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
        Interrupt: pin A routed to IRQ 382
        Region 0: Memory at 40100000 (64-bit, non-prefetchable) [size=8K]
        Region 2: Memory at 40102000 (64-bit, non-prefetchable) [size=256]
        Region 4: Memory at 40102100 (64-bit, non-prefetchable) [size=256]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable- Count=1/8 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [70] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <512ns, L1 <32us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0.000W
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop- FLReset-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend+
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <8us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR+, OBFF Via message/WAKE#
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [b0] MSI-X: Enable+ Count=8 Masked-
                Vector table: BAR=2 offset=00000000
                PBA: BAR=4 offset=00000000
        Capabilities: [100 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [148 v1] Device Serial Number 00-1e-c0-ff-ff-e1-30-28
        Capabilities: [158 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Capabilities: [160 v1] L1 PM Substates
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                          PortCommonModeRestoreTime=10us PortTPowerOnTime=10us
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                           T_CommonMode=0us LTR1.2_Threshold=0ns
                L1SubCtl2: T_PwrOn=10us
        Capabilities: [170 v1] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
        Kernel driver in use: lan743x

But when I tried iperf i was not able to reach gigabit speed

ubuntu@ubuntu-tx2:~$ iperf3 -c 192.168.137.2
Connecting to host 192.168.137.2, port 5201
[  4] local 192.168.137.43 port 34408 connected to 192.168.137.2 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  18.0 MBytes   151 Mbits/sec    0    400 KBytes
[  4]   1.00-2.00   sec  46.4 MBytes   389 Mbits/sec    0   1.41 KBytes
[  4]   2.00-3.00   sec  15.4 MBytes   129 Mbits/sec    8   1.41 KBytes
[  4]   3.00-4.00   sec  6.15 MBytes  51.6 Mbits/sec    6    325 KBytes
[  4]   4.00-5.00   sec  82.5 MBytes   692 Mbits/sec    0    495 KBytes
[  4]   5.00-6.00   sec  39.6 MBytes   332 Mbits/sec   24    365 KBytes
[  4]   6.00-7.00   sec  69.6 MBytes   584 Mbits/sec    0    406 KBytes
[  4]   7.00-8.00   sec  64.8 MBytes   544 Mbits/sec    0    427 KBytes
[  4]   8.00-9.00   sec  8.51 MBytes  71.4 Mbits/sec    2    255 KBytes
[  4]   9.00-10.00  sec  13.5 MBytes   114 Mbits/sec    0   1.41 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   365 MBytes   306 Mbits/sec   40             sender
[  4]   0.00-10.00  sec   362 MBytes   303 Mbits/sec                  receiver

iperf Done.

In another thread was a hint regarding setting PCIEASPM to Performance which I tried but it did not change the result.
Are there other suggestions to speed up the througput of the network card that i could try ?

Never mind,
I made a mistake patching in the driver from the 4.20 kernel into the Nvidia kernel . There was no PCIe bandwith problem with the TX2 board

Glad to know issue resolved. Thanks for the update.