Ferries to Sardinia depart from Genoa, Livorno and Piombino.
From Ticino your Genoa reaches about 2 hours, the crossing to Porto Torres or Olbia takes one night. The shortest option can be found in summer from Piombino to Oliba with 5 hours.
Very good rates for the crossing can be found at Netferry.