P-value is obtained from treatment vs control, or control vs treatment?

P-values are not sensitive to the direction of comparision. I assume you are asking the direction of enrichment analysis. This post may be helpful