Thanks for your query.Based on the facts that you have posted it appears that you have Hydrocele
to your testis.
Please consult qualified general surgeon
to confirm the Hydrocele.
If positive surgery is the only best option as a treatment for Hydrocele
Do not worry it is a simple surgery carried out under spinal anaesthesia
.You may need to stay in Hospital for 24 hours only .
It will get cured completely and will not have any effect on your sexual potency