View unanswered posts | View active topics It is currently Wed Aug 27, 2014 8:54 am



Reply to topic  [ 113 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 12  Next
 RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4 
Author Message

Joined: Wed Mar 18, 2009 1:32 pm
Posts: 455
Location: Sweden
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
doccocaubai wrote:
Dear Varazir, I need more files. Because I need to build the driver for my 82559ER NIC.



Okay , could be done with my script too, need some modification.

I have thought adding that you have a option to copy files to the

_________________
Dovie'andi se tovya sagain,



Wed Oct 21, 2009 4:10 am
Profile WWW

Joined: Tue Oct 13, 2009 10:57 pm
Posts: 12
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
Varazir wrote:
doccocaubai wrote:
Dear Varazir, I need more files. Because I need to build the driver for my 82559ER NIC.



Okay , could be done with my script too, need some modification.

I have thought adding that you have a option to copy files to the

Dear Varazir,
I tried your script before but it doesn't work or maybe i did wrong.
I tried to add the oem.tgz of esxi 3.5 to 4.0 but it's doesn't worked (I modified pci.id and simple.map). So now i try to compile the driver for my intel 82559ER and then use your script to add it on.
But if you said that your script can be done by some modification, pls instruct me :mrgreen: .
thanks a lot


Wed Oct 21, 2009 5:57 pm
Profile

Joined: Wed Mar 18, 2009 1:32 pm
Posts: 455
Location: Sweden
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
doccocaubai wrote:
Dear Varazir,
I tried your script before but it doesn't work or maybe i did wrong.
I tried to add the oem.tgz of esxi 3.5 to 4.0 but it's doesn't worked (I modified pci.id and simple.map). So now i try to compile the driver for my intel 82559ER and then use your script to add it on.
But if you said that your script can be done by some modification, pls instruct me :mrgreen: .
thanks a lot


First off, 3.5 oem.tgz doesn't work with 4.0 as the simple.map has been
moved.

Code:
   
         esxi_green "Creating folders ${esx_folders[*]}"
         mkdir ${esx_folders[*]}
         esxi_done


Find that part in the script

Add a line cp "path/file" $ipath/{$esx_folders[3]}/

you have to read up on who the files need to be in the oem file.
'

Rgd daniel

_________________
Dovie'andi se tovya sagain,



Thu Oct 22, 2009 3:04 am
Profile WWW

Joined: Tue Oct 20, 2009 12:37 pm
Posts: 4
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
Hi geppi,

You wrote

"So I followed the procedure and downloaded the ESX Open Source distribution from VMware and the latest r8168 Linux device driver package from Realtek's website ( version 8.014.00 ). With some minor modifications the r8168 driver did really compile without errors and was successfully loaded by ESX..."

Could you, please, post your minor modifications here for us to be able to repeat your work.

Thank you.
Best Regards, Dmitry


Sat Oct 31, 2009 3:53 am
Profile

Joined: Sun Oct 04, 2009 2:47 pm
Posts: 4
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
Attached compressed tar archive contains the modified sources and the build scripts I've used.

Compilation was done under CentOS 5.3.

"cd" into "vmkdrivers-gpl" of the VMware source distribution.
Untar the archive there. It will place the two build scripts "build-rtl8168.sh" and "build-ahci.sh" into the current directory, the modified Realtek sources under "./vmkdrivers/src26/drivers/net/r8168" and the modified ahci.c into "./vmkdrivers/src26/drivers/ata". If you would like to preserve the original ahci.c save it first.

All modifications in the sources are bracketed by the coments:

/* ESX compile begin */
/* ESX compile end */


Attachments:
rtl8168-mod-src.tgz [58.49 KiB]
Downloaded 481 times
Sun Nov 01, 2009 9:25 am
Profile

Joined: Tue Oct 20, 2009 12:37 pm
Posts: 4
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
geppi wrote:
Attached compressed tar archive contains the modified sources and the build scripts I've used.

Compilation was done under CentOS 5.3.

"cd" into "vmkdrivers-gpl" of the VMware source distribution.
Untar the archive there. It will place the two build scripts "build-rtl8168.sh" and "build-ahci.sh" into the current directory, the modified Realtek sources under "./vmkdrivers/src26/drivers/net/r8168" and the modified ahci.c into "./vmkdrivers/src26/drivers/ata". If you would like to preserve the original ahci.c save it first.

All modifications in the sources are bracketed by the coments:

/* ESX compile begin */
/* ESX compile end */



Thank you, geppi. Everything is compiling and building fine now, but I still can't get it work. Driver is loaded perfectly but ESX still doesn't see any devices in a system.
Does anybody have any idea what might cause such a problem?
it is ESX 4.0 with all updates installed,
It is MicroStar MS 7577 mobo with 2 rtl 8168 nics on-board,

lspci -vvv gives me the foloowing:

06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Unknown device 8168 (rev 03)
Subsystem: Micro-Star International Co., Ltd. Unknown device 7577
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 17
Region 0: I/O ports at b800 [size=256]
Region 2: Memory at fdeff000 (64-bit, prefetchable) [size=4K]
Region 4: Memory at fdef8000 (64-bit, prefetchable) [size=16K]
Expansion ROM at fe8e0000 [disabled] [size=128K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express Endpoint IRQ 1
Device: Supported: MaxPayload 256 bytes, PhantFunc 0, ExtTag-
Device: Latency L0s <512ns, L1 <64us
Device: AtnBtn- AtnInd- PwrInd-
Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported-
Device: RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s L1, Port 0
Link: Latency L0s <512ns, L1 <64us
Link: ASPM L1 Enabled RCB 64 bytes CommClk+ ExtSynch-
Link: Speed 2.5Gb/s, Width x1
Capabilities: [ac] MSI-X: Enable- Mask- TabSize=4
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00000800
Capabilities: [cc] Vital Product Data

07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Unknown device 8168 (rev 03)
Subsystem: Micro-Star International Co., Ltd. Unknown device 7577
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 18
Region 0: I/O ports at c800 [size=256]
Region 2: Memory at fdfff000 (64-bit, prefetchable) [size=4K]
Region 4: Memory at fdff8000 (64-bit, prefetchable) [size=16K]
Expansion ROM at fe9e0000 [disabled] [size=128K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express Endpoint IRQ 1
Device: Supported: MaxPayload 256 bytes, PhantFunc 0, ExtTag-
Device: Latency L0s <512ns, L1 <64us
Device: AtnBtn- AtnInd- PwrInd-
Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported-
Device: RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s L1, Port 0
Link: Latency L0s <512ns, L1 <64us
Link: ASPM L1 Enabled RCB 64 bytes CommClk+ ExtSynch-
Link: Speed 2.5Gb/s, Width x1
Capabilities: [ac] MSI-X: Enable- Mask- TabSize=4
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00000800
Capabilities: [cc] Vital Product Data

Best Regards, Dmitry


Sun Nov 01, 2009 12:21 pm
Profile

Joined: Thu Nov 05, 2009 9:47 am
Posts: 4
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
Well.. It wasn't that difficult after all (and it allowed me to get a better understanding of the inner workings of ESXi !).

So, I did manage to get it to work until I started having networking problems with my W2K3 VMs - like not being able to connect to the windows VMs using RDP (mstsc).

Now thanks to the 'frutis' user, the suggestion posted on that very same thread to disable checksum offloading did the trick, and now everything seems to be working just fine ! (I'm just wondering.. does this mean the VMware vswitches propagate checksum offloading to the actual adapter ? I would have expected for it to *NOT* work at all if the r8168 adapter and/or driver were doing it wrong.. more likely, it's a bug somewhere !)

(Now, I'm going to have to sysprep my W2K3 image again though.. and regen my OVF template.. drats ! Hopefully, hardware parameters will survive minisetup !)

--Ivan

PS : For info, I'm including a link to a unified diff of what I did to the driver (watch out ! some of the changes are very crude !) - and a sample script (which assumes all the source files (*.[hc]) have been moved to a directory named vmkdrivers/src26/drivers/net/r8168 - relative to the build environment..). This is a patch against version 8.014.00 of the realtek RTL8168 linux driver. No guarantee expressed or implied even for blah blah blah...

http://www.ivansoftware.com/download/build-rtl.sh
http://www.ivansoftware.com/download/r8168_n_c.patch

PPS : The patch does this : assume we are on a 2.6.0 < kernel < 2.6.20 but use the 2 parm versions of INIT_WORK/PREPARE_WORK, retype some problematic pointers to functions to (void *) to prevent superfluous warnings, remove quota support, remove the call to netif_poll_disable, and define a bitreverse[1] function (the last 2 generating a runtime load error since those functions aren't defined in the vmklinux_module stub (if I understand correctly how this works) and ESXi doesn't actually handle dynamic linking)

[1] Shamelessly grabbed from the kernelcrash link provided by "geppy" in the original post.


Thu Nov 05, 2009 10:28 am
Profile

Joined: Sun Oct 04, 2009 2:47 pm
Posts: 4
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
I did have problems with the W2K3 networking as well in the beginning.
Here's what I did:

1. Install the latest VMwareTools for ESXi 4.0.0 in the VM.
2. Power down the VM and go to the VM settings, Network Adapter.
3. The Network Adapter is set to "flexible" which causes the "AMD PCNET Family Ethernet Adapter" to be used as can be checked in device manager when the VM is running.
4. Remove the Network Adapter.
5. Create a new Network Adapter and select the "VMXNET3" instead of "flexible"
6. Power up the VM and check in device manager that the "VMXNET3" Network Adapter is used.

Even without disabling checksum offloading I haven't experienced problems with networking since.

Ivan, it looks like you're not compiling the driver with NAPI enabled, at least I didn't see the "#define CONFIG_R8168_NAPI" in your build scripts.
I have compiled the driver with NAPI support but I've no idea if that is required to make it work properly with the "VMXNET3" setting.


Sun Nov 08, 2009 6:16 am
Profile

Joined: Thu Nov 05, 2009 9:47 am
Posts: 4
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
geppi wrote:
5. Create a new Network Adapter and select the "VMXNET3" instead of "flexible"

That's what I am doing too now. The only shortcoming of this solution is that VMXNET3 isn't supported in OVF deployments (only E1000 or VMXNET) are allowed.
Specifying e1000 means I have to turn checksumming off, which can be done by altering the .INF in the master install (%systemroot%\inf\ene1000.inf) - but this leads to the signature no longer being valid for the driver - thus the driver has to be manually confirmed.
Otherwise, what I do now is simply what you recommend : removing the bad adapter and replacing it with a VMXNET3 instance, all in all a simple task to perform !
geppi wrote:
define CONFIG_R8168_NAPI

I'll try that ! That's probably why I'm getting all those warnings !

Thanks,

--Ivan


Sun Nov 08, 2009 6:51 am
Profile

Joined: Sun Nov 08, 2009 1:22 pm
Posts: 2
Post Re: RTL8111/8168 and P55 integr. SATA Ctrl. (AHCI) for ESX 4
hi,

I tried the 8168 driver and it gets loaded with "vmkload -v 16 8168" but I don't see the nic as a new device and its not recognized as a device after a reboot.

thanks for any hints...
kutte


Sun Nov 08, 2009 1:32 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 113 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 12  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.