Swelling at the base of the penis could be due to trauma to an erect penis due to masturbation or a direct blow.
Non tenter swelling could be due to an allergic reaction. Redness and fever plus tenderness could be due to cellulitis, this would require antibiotic therapy. Suggest you see your md or do.
Would you like to video or text chat with me?