mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
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
This commit is contained in:
parent
c337fa30af
commit
3dd8d840ed
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=252706
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue