how is spanning-tree path cost calculation