static void virtio_net_set_mrg_rx_bufs(VirtIONet *n, int mergeable_rx_bufs)

{

    int i;

    NetClientState *nc;



    n->mergeable_rx_bufs = mergeable_rx_bufs;



    n->guest_hdr_len = n->mergeable_rx_bufs ?

        sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr);



    for (i = 0; i < n->max_queues; i++) {

        nc = qemu_get_subqueue(n->nic, i);



        if (peer_has_vnet_hdr(n) &&

            tap_has_vnet_hdr_len(nc->peer, n->guest_hdr_len)) {

            tap_set_vnet_hdr_len(nc->peer, n->guest_hdr_len);

            n->host_hdr_len = n->guest_hdr_len;

        }

    }

}

static void virtio_net_set_mrg_rx_bufs(VirtIONet *n, int mergeable_rx_bufs)

{

    int i;

    NetClientState *nc;



    n->mergeable_rx_bufs = mergeable_rx_bufs;



    n->guest_hdr_len = n->mergeable_rx_bufs ?

        sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr);



    for (i = 0; i < n->max_queues; i++) {

        nc = qemu_get_subqueue(n->nic, i);



        if (peer_has_vnet_hdr(n) &&

            tap_has_vnet_hdr_len(nc->peer, n->guest_hdr_len)) {

            tap_set_vnet_hdr_len(nc->peer, n->guest_hdr_len);

            n->host_hdr_len = n->guest_hdr_len;

        }

    }

}

static void FUNC_0(VirtIONet *VAR_0, int VAR_1)

{

    int VAR_2;

    NetClientState *nc;



    VAR_0->VAR_1 = VAR_1;



    VAR_0->guest_hdr_len = VAR_0->VAR_1 ?

        sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr);



    for (VAR_2 = 0; VAR_2 < VAR_0->max_queues; VAR_2++) {

        nc = qemu_get_subqueue(VAR_0->nic, VAR_2);



        if (peer_has_vnet_hdr(VAR_0) &&

            tap_has_vnet_hdr_len(nc->peer, VAR_0->guest_hdr_len)) {

            tap_set_vnet_hdr_len(nc->peer, VAR_0->guest_hdr_len);

            VAR_0->host_hdr_len = VAR_0->guest_hdr_len;

        }

    }

}

static void FUNC_0(VirtIONet *VAR_0, int VAR_1)
{ int VAR_2; NetClientState *nc; VAR_0->VAR_1 = VAR_1; VAR_0->guest_hdr_len = VAR_0->VAR_1 ?
sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); for (VAR_2 = 0; VAR_2 < VAR_0->max_queues; VAR_2++) { nc = qemu_get_subqueue(VAR_0->nic, VAR_2); if (peer_has_vnet_hdr(VAR_0) &&
tap_has_vnet_hdr_len(nc->peer, VAR_0->guest_hdr_len)) { tap_set_vnet_hdr_len(nc->peer, VAR_0->guest_hdr_len); VAR_0->host_hdr_len = VAR_0->guest_hdr_len; } } }