Merging in some pkt related support from v1.65-use-pkts