We have seen many cases where 7-meter cables might work, but the signal can be marginal and varies between switch vendors. Some switch vendors may be able to drive a signal 7-meters while other may be marginal. Use a 5-meter cable if there is any doubt here.
Thus I would recommend you to use 5m cable.