Switch PCIe connections
The signals are named from the point of view of the root complex, so anyone implementing a device that has an upstream facing port needs to be aware that they need to switch lanes.

I think it is a good idea to think independent from connectors here -- if you use PCIe internally on a single board, you have to swap, even if you don't have a male connector, and if you're building a riser card, you have a male connector but should not swap.