S parameters are indexed output port first and input port second, so S21 describes the wave leaving port 2 when the source drives port 1, which is forward transmission or forward gain. S12 is the reverse direction, and S11 and S22 describe reflection rather than transmission.