All packets are tagged at the time that memory is allocated for them. For example, the following:
is invoked in the function alloc_skb.