Rising energy costs linked to the Iran conflict have pushed up gasoline prices and contributed to inflation.