First, Thanks a lot for all your tools and informations.
I cannot imagine I can do this without your help.
Basic Information
Operations are done under newest firmware up to now(fw 8.13.63341), Nic is a Genuine Intel X710-DA2. (by the way, there are really a lot of fake Intel cards on the market, some look 100% same).
Operations are done under Synology DSM operating system (linux, of course), but to make it easier, all compile are done with Ubuntu.
Infos
(1) As author concerns, the address may change with different firmware, and so it happens. In the situation of the author, the base address is on 0x6870. On firmware 6.x, I find the base address is on 0x68f6. But it changes to 0x6940 after firmware upgrade. So I really think the author did a right choice.
(2) Little differences.
In the situation of author, $(baseAdress) = 000b, and $(baseAdress + 0x08) = 2b0c.
I find $(baseAdress) = 000c on firmware 6.x, and $(baseAdress) = 000d on firmware 8.13.
And $(baseAdress + 0x08) = 6b0c, then when I try to find out what does the difference mean, however, the Intel document describes the bit as reserved... So I only changed the bit matters(bit 11, "Enable Module Qualification").
(3) Fatal difference.
In the situation of author, "eeprom->offset = offset + 0xci2;"
But it modified the unrelated address on my platform, probably because firmware update.
Now the interval of address for each port changed, It is "eeprom->offset = offset + 0xei2" in my situation.
(4) Conclusion for potential help
int devid = 0x1572; // 0x1572 = Intel X710-DA2
const char ethDev = "eth4"; // check with ifconfig
int phy0_offset = 0x6940; // Always Check Before Use !!!
eeprom->offset = offset + 0xei2; // 0xc in earlier firmware
(uint16_t*)(eeprom+1) = 0x630c; // In my situation
Advice for beginners
Actually I am a beginner, so I accidentally modified the wrong address. Luckily I checked immediately after modify, and ran nvmupdate64e -rd to fix.
So my personal advice is run mytool 0 0x8000 > somefile, before and after modify, and write a little helper program to check all differences, to make sure you did it all right.
First, Thanks a lot for all your tools and informations.
I cannot imagine I can do this without your help.
Basic Information Operations are done under newest firmware up to now(fw 8.13.63341), Nic is a Genuine Intel X710-DA2. (by the way, there are really a lot of fake Intel cards on the market, some look 100% same). Operations are done under Synology DSM operating system (linux, of course), but to make it easier, all compile are done with Ubuntu.
Infos (1) As author concerns, the address may change with different firmware, and so it happens. In the situation of the author, the base address is on 0x6870. On firmware 6.x, I find the base address is on 0x68f6. But it changes to 0x6940 after firmware upgrade. So I really think the author did a right choice.
(2) Little differences. In the situation of author, $(baseAdress) = 000b, and $(baseAdress + 0x08) = 2b0c. I find $(baseAdress) = 000c on firmware 6.x, and $(baseAdress) = 000d on firmware 8.13. And $(baseAdress + 0x08) = 6b0c, then when I try to find out what does the difference mean, however, the Intel document describes the bit as reserved... So I only changed the bit matters(bit 11, "Enable Module Qualification").
(3) Fatal difference. In the situation of author, "eeprom->offset = offset + 0xci2;" But it modified the unrelated address on my platform, probably because firmware update. Now the interval of address for each port changed, It is "eeprom->offset = offset + 0xei2" in my situation.
(4) Conclusion for potential help int devid = 0x1572; // 0x1572 = Intel X710-DA2 const char ethDev = "eth4"; // check with ifconfig int phy0_offset = 0x6940; // Always Check Before Use !!! eeprom->offset = offset + 0xei2; // 0xc in earlier firmware (uint16_t*)(eeprom+1) = 0x630c; // In my situation
Advice for beginners Actually I am a beginner, so I accidentally modified the wrong address. Luckily I checked immediately after modify, and ran nvmupdate64e -rd to fix. So my personal advice is run mytool 0 0x8000 > somefile, before and after modify, and write a little helper program to check all differences, to make sure you did it all right.
Again, Thanks a lot !