Author: sephe Date: Mon Feb 22 06:28:18 2016 New Revision: 295877 URL: https://svnweb.freebsd.org/changeset/base/295877
Log: hyperv/hn: Add TX method for txeof processing. Preamble to implement ifnet.if_transmit method. Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5346 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Feb 22 06:22:47 2016 (r295876) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Feb 22 06:28:18 2016 (r295877) @@ -1026,9 +1026,10 @@ struct hn_tx_ring { #endif int hn_txdesc_cnt; int hn_txdesc_avail; - int hn_txeof; + int hn_has_txeof; int hn_sched_tx; + void (*hn_txeof)(struct hn_tx_ring *); struct taskqueue *hn_tx_taskq; struct task hn_tx_task; struct task hn_txeof_task; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Feb 22 06:22:47 2016 (r295876) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Feb 22 06:28:18 2016 (r295877) @@ -664,7 +664,7 @@ hn_tx_done(void *xpkt) packet->compl.send.send_completion_tid; txr = txd->txr; - txr->hn_txeof = 1; + txr->hn_has_txeof = 1; hn_txdesc_put(txr, txd); } @@ -684,11 +684,11 @@ netvsc_channel_rollup(struct hv_device * } #endif - if (!txr->hn_txeof) + if (!txr->hn_has_txeof) return; - txr->hn_txeof = 0; - hn_start_txeof(txr); + txr->hn_has_txeof = 0; + txr->hn_txeof(txr); } /* @@ -976,12 +976,12 @@ again: * commands to run? Ask netvsc_channel_rollup() * to kick start later. */ - txr->hn_txeof = 1; + txr->hn_has_txeof = 1; if (!send_failed) { txr->hn_send_failed++; send_failed = 1; /* - * Try sending again after set hn_txeof; + * Try sending again after set hn_has_txeof; * in case that we missed the last * netvsc_channel_rollup(). */ @@ -2111,6 +2111,8 @@ hn_create_tx_ring(struct hn_softc *sc, i */ txr->hn_sched_tx = 1; + txr->hn_txeof = hn_start_txeof; /* TODO: if_transmit */ + parent_dtag = bus_get_dma_tag(sc->hn_dev); /* DMA tag for RNDIS messages. */ _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"