hyperv/hn: Staticize and rename packet TX done function

It is only used in hv_netvsc_drv_freebsd.c; and rename it to hn_tx_done()
mainly to reserve "xmit" for ifnet.if_transmit implement.

While I'm here, remove unapplied comment.

Reviewed by:	adrian
Approved by:	adrian (mentor)
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5345
This commit is contained in:
sephe 2016-02-22 06:22:47 +00:00
parent 2f000e909d
commit 0c4347a68a
2 changed files with 4 additions and 12 deletions

View File

@ -1086,7 +1086,6 @@ typedef struct hn_softc {
extern int hv_promisc_mode;
void netvsc_linkstatus_callback(struct hv_device *device_obj, uint32_t status);
void netvsc_xmit_completion(void *context);
void hv_nv_on_receive_completion(struct hv_device *device,
uint64_t tid, uint32_t status);
netvsc_dev *hv_nv_on_device_add(struct hv_device *device,

View File

@ -653,17 +653,10 @@ hn_txdesc_hold(struct hn_txdesc *txd)
atomic_add_int(&txd->refs, 1);
}
/*
* Send completion processing
*
* Note: It looks like offset 0 of buf is reserved to hold the softc
* pointer. The sc pointer is not currently needed in this function, and
* it is not presently populated by the TX function.
*/
void
netvsc_xmit_completion(void *context)
static void
hn_tx_done(void *xpkt)
{
netvsc_packet *packet = context;
netvsc_packet *packet = xpkt;
struct hn_txdesc *txd;
struct hn_tx_ring *txr;
@ -905,7 +898,7 @@ done:
txd->m = m_head;
/* Set the completion routine */
packet->compl.send.on_send_completion = netvsc_xmit_completion;
packet->compl.send.on_send_completion = hn_tx_done;
packet->compl.send.send_completion_context = packet;
packet->compl.send.send_completion_tid = (uint64_t)(uintptr_t)txd;