dp_packet_batch_apply_cutlen(struct dp_packet_batch *pktb)
{
    int i;

    if (!pktb->trunc)
        return;

    for (i = 0; i < pktb->count; i++) {
        uint32_t cutlen = dp_packet_get_cutlen(pktb->packets[i]);

        dp_packet_set_size(pktb->packets[i],
                    dp_packet_size(pktb->packets[i]) - cutlen);
        dp_packet_reset_cutlen(pktb->packets[i]);
    }
    pktb->trunc = false;
}
dp_packet_batch_apply_cutlen(struct dp_packet_batch *pktb)
{
    int i;

    if (!pktb->trunc)
        return;

    for (i = 0; i < pktb->count; i++) {
        uint32_t cutlen = dp_packet_get_cutlen(pktb->packets[i]);

        dp_packet_set_size(pktb->packets[i],
                    dp_packet_size(pktb->packets[i]) - cutlen);
        dp_packet_reset_cutlen(pktb->packets[i]);
    }
    pktb->trunc = false;
}