From 3dd8d840ed97a7ad8f32641cc638afbe57cd09f0 Mon Sep 17 00:00:00 2001 From: Bryan Venteicher Date: Thu, 4 Jul 2013 17:55:58 +0000 Subject: [PATCH] Merge vtnet changes from projects/virtio Minor changes to the network driver. A multiqueue driver that is a significant rewrite will be in merged shortly. Contains projects/virtio commits: r246058: vtnet: Move an mbuf ASSERT to the calling function r246059: vtnet: Tweak ASSERT message MFC after: 1 month --- sys/dev/virtio/network/if_vtnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 29ed74776b2..329614a9737 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1747,7 +1747,6 @@ vtnet_tx_offload(struct vtnet_softc *sc, struct mbuf *m, uint8_t ip_proto, gso_type; ifp = sc->vtnet_ifp; - M_ASSERTPKTHDR(m); ip_offset = sizeof(struct ether_header); if (m->m_len < ip_offset) { @@ -1865,7 +1864,7 @@ vtnet_enqueue_txbuf(struct vtnet_softc *sc, struct mbuf **m_head, sglist_init(&sg, VTNET_MAX_TX_SEGS, segs); error = sglist_append(&sg, &txhdr->vth_uhdr, sc->vtnet_hdr_size); KASSERT(error == 0 && sg.sg_nseg == 1, - ("cannot add header to sglist")); + ("%s: cannot add header to sglist error %d", __func__, error)); again: error = sglist_append_mbuf(&sg, m); @@ -1902,6 +1901,7 @@ vtnet_encap(struct vtnet_softc *sc, struct mbuf **m_head) int error; m = *m_head; + M_ASSERTPKTHDR(m); txhdr = uma_zalloc(vtnet_tx_header_zone, M_NOWAIT | M_ZERO); if (txhdr == NULL) {