Mike,
We can change both. If we change the port cost, it changes the overall rootpath cost to reach the root bridge.
Port priority comes into the picture at the last if some has changed the priortiy to some vlaue then the default 128, when we have met all the underlying criteria for selecting best link. For example if you have two link coming from an adjacent switch:
The first criteia is the root path cost which will be same.
The second criteria is the lowest mac-address of the sending neighbor switch, which again will be same.
Then comes the port priority, which is bydefault 128 and will be same.
If all the above criteia is same than the port ID comes at the last. The lower the port ID and more favourable link.
The same goes with the port priority. The lower the port priority i.e less than 128 and more favourable the link.
HTH, Please rate if it does.
-amit singh
If two