Jump to content

YAH - yet another hello || Looking for Intel-Ethernet drivers (SR-IOV)


Mojannje
 Share

4 posts in this topic

Recommended Posts

Hi folks

 

If that's the way to be able to reply, so be it. Here I am.

 

Me is using virtual Hackintoshes for years, with about 26 years in total on true-metal Macs.

I stand for:

  • all the struggles, meticulously hard trials of belief,
  • Mac whispery, Mac Voodoo and intimidation tactics against machine things,
  • including the darkest of GPU-politics, on all three sides,
  • strongly grown opinions,
  • 10G Ethernet SR-IOV (?) madness, including product-id HEX wizardry (filed under disbelief)
  • it can only get better

 

That's why I'm always interested if someone else has good (better) ideas.

 

Cheers

M

Edited by Mojannje
Link to comment
Share on other sites

If you are interested in

https://forums.macrumors.com/threads/modify-retail-intel-10gbe-nics-to-use-small-tree-macos-drivers.1968456/

FOLKS, THIS WILL WRITE TO THE CARD EEPROM AND INCORRECT USAGE COULD RENDER YOUR CARD USELESS. THESE STEPS ARE SPECIFIC TO MY INTEL X520-DA2 10GbE CARD ONLY. HOWEVER, WITH SOME WORK THEY CAN BE ADAPTED TO WORK ON MOST INTEL NETWORK CARDS, BOTH 1GbE and 10GbE.
PROCEED AT YOUR OWN RISK.


Intel's own network driver page states:
Intel adapters from Small Tree Communications are uniquely designed and validated on Apple platforms with OS X* drivers. Software and drivers for Mac OS X* for retail versions of Intel® Ethernet Adapters are not available from Intel or from Small Tree Communications.

In order for a retail Intel NIC to be able to use the Small Tree macOS drivers it must have a Subsystem ID of 000a, as stated here:
https://www.small-tree.com/support/...now-which-Gigabit-driver-to-install-on-my-Mac

Fortunately, a card's Subsytem ID can be modified by using the 'ethtool' command under Linux.
The following is how I modified my card.

First step, download and install Small Tree macOS NIC drivers.
https://small-tree.com/support/downloads/

Next, download and boot off of Ubuntu 16.04 LTS Desktop CD and run terminal.
https://ubuntu.com/download/alternative-downloads
Don’t use a newer version of Ubuntu as the newer version of ethtool does not work.

TO LOCATE ethX:
ifconfig

TO BACKUP EEPROM (DO THIS!):
sudo ethtool -e ethX raw on > ethX.bin

COMMAND TEMPLATE WE NEED TO USE TO CHANGE OFFSET VALUES:
sudo ethtool -E ethX magic 0x<device id><vendor id> offset 0x<offset> value 0x<value>

TO DETERMINE VENDOR, DEVICE AND SUBSYSTEM IDs:
lspci -nn -vvv | grep Ethernet
01:00.0 Ethernet controller [0200]: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] (rev 01)
Subsystem: Intel Corporation Ethernet Server Adapter X520-2 [8086:7a11]
01:00.1 Ethernet controller [0200]: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] (rev 01)
Subsystem: Intel Corporation Ethernet Server Adapter X520-2 [8086:7a11]


NOW, TO FIND THE RELEVANT OFFSETS!
Intel datasheet for my card states the following, but it doesn't seem to be correct! Other datasheets may prove more useful, it's definitely worth checking them first. Look under the 'EEPROM Hardware' section of the datasheet:
PCIe Sub-System ID - Offset 0x08
Bits:15:0
Name:Sub System ID
Default: 0x0

By running the following command and eyeballing the offsets I've discovered that the values below are actually the two relevant values on my Intel X520-DA2 card. This is the subsystem ID we're after (notice the vendor id of 86 80 which follows it):
sudo ethtool -e eth1 | less
"0x0320: 03 00 1f 00 00 00 00 2b 03 13 11 7a 86 80 a6 10"

So, if we start at offset 0x0320 you would count 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f for each pair of digits.
The values we need to change are 11 at 0x032a and 7a at 0x032b. We can remove the 0 to shorten to 0x32a and 0x32b

So, for an Intel X520-DA2 (8086:10fb)(8086:7a11), to set subsys ID of 0x000a we would run:
sudo ethtool -E eth1 magic 0x10fb8086 offset 0x32a value 0x0a
sudo ethtool -E eth1 magic 0x10fb8086 offset 0x32b value 0x00

sudo ethtool -E eth2 magic 0x10fb8086 offset 0x32a value 0x0a
sudo ethtool -E eth2 magic 0x10fb8086 offset 0x32b value 0x00

In order to allow ethtool to write to the EEPROM you need the 'magic' value specific to your card, which is:
0x<device id><vendor id>
The command below will show these values:
lspci -nn -vvv | grep Ethernet
NOTE these are not the Subsystem values, they are the Device and Vendor IDs, in my case 10fb (X520) and 8086 (Intel).
Here's a useful reference:
http://pci-ids.ucw.cz/read/PC/8086

Reboot and done!

UPDATE:
Make sure you disable SMB signing if you require full performance when connecting to a Windows SMB share.
https://support.apple.com/en-us/HT205926

I've now tested on an Intel X540-T1 and it also works fine.

Ethernet controller [0200]: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 [8086:1528] (rev 01)
Subsystem: Intel Corporation Ethernet Converged Network Adapter X540-T1 [8086:0002]

sudo ethtool -E ens4 magic 0x15288086 offset 0x48e value 0x0a


One more thing. I was using Belkin CAT6 UTP 1m ethernet cables and they weren't good enough for 10GbE. I've since changed them for CAT7 and can now max out 10GbE with ease. Check your cables, 10GbE is not forgiving.

Link to comment
Share on other sites

Hi @Rocky12

 

Thanks that is a remarkable overview on how it's done.

I hope you didn't take the trouble to do it especially for me.

I made such a slimmed down cheat cheet myself and have been using it for a couple of fiber adapters.

 

But I am looking for a driver that supports the VF variant of these adapters in a guest.

They can be used for SR-IOV, which works beautifully on Linux and also Windows (if you search long enough).

This is basically an alternate mode where you essentially multiply one adapter into many virtual to plug into a VM.

Think of it as a hardware ethernet switch for VMs.

But for Macos that is not working. When I last checked, the Smalltree driver wouldn't accept these VF.

 

There might be a workaround, that is when the VF provides a Subsystem ID of 000a too.

Plus hoping the SmallTree drivers would cope with it.

I never tried this.

It would involve finding the hex in the EEPROM that is meant for VFs only.

 

What are your thoughts on this?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...