Packet scheduling and congestion control