Author: sephe
Date: Mon Feb 22 06:22:47 2016
New Revision: 295876
URL: https://svnweb.freebsd.org/changeset/base/295876

Log:
  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

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:17:26 2016        
(r295875)
+++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h     Mon Feb 22 06:22:47 2016        
(r295876)
@@ -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,

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:17:26 
2016        (r295875)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Mon Feb 22 06:22:47 
2016        (r295876)
@@ -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;
 
_______________________________________________
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"

Reply via email to