I found myself in the same situation: X520 card (intel 82599 based) on unRAID server and microtik CRS305-1G-4S+IN switch, 10Gtek transceivers at both end. The ping was solid, but the link was going down very briefly every few seconds. For some reason the Microtik switch came with RouterOS enabled. Since I did not need the router funcionality, I thought I rebooted to the switch OS. Just like that, the flapping on the X520 link is gone. I just checked, and the link did not go down once overnight. Maybe just a coincidence, not sure, as always YMMV, but I thought I mentioned it. Transceivers are 10Gtek AXS85-192-M3, and the PCIe the card is also from 10Gtek, model X520-10G-1S-X8.