The recieving end of tariffs

I’m brushing up on econ before taking a microeconomics course next semester, and I had a question on foreign trade. The textbook says that tariffs impose deadweight loss, and that a country has doesn’t actually lose from trading with another country that subsidizes the production of a certain product. My question is, what about trade with a country that has a tariff on that particular good? Is it a better idea to levy a retaliatory tariff, or to impose no restrictions?