DragonFly BSD
DragonFly commits List (threaded) for 2013-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: ifsq: Let ifaltq_subque know its related hardware TX queue's serializer


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Mar 2013 00:56:35 -0700 (PDT)

commit bfefe4a6d6b571306fcc5dc75e8a9c476234dc4d
Author: Sepherosa Ziehau <sephe@dragonflybsd.org>
Date:   Fri Mar 15 13:57:21 2013 +0800

    ifsq: Let ifaltq_subque know its related hardware TX queue's serializer
    
    This avoids following operations on packet transmission hot path:
    - Dereferening device driver supplied serialize function pointers
    - Locating hardware TX queue's serializer
    
    Comparing to the lwkt_serialize functions, the above two operations are
    costful.
    
    Driver changes:
    - For device drivers which use the default ifnet serializer, no additional
      code will be needed, if_attach() will assign ifnet serializer to
      ifaltq_subque.
    - For device drivers which use independent serializers for main function,
      RX queues and TX queues, ifsq_set_hw_serialize() must be called to
      properly assign the hardware TX queue's serializer to ifaltq_subque.
      Drivers in this category are bce(4), emx(4), igb(4) and jme(4).

Summary of changes:
 sys/dev/netif/bce/if_bce.c    |   1 +
 sys/dev/netif/emx/if_emx.c    |   1 +
 sys/dev/netif/igb/if_igb.c    |   1 +
 sys/dev/netif/jme/if_jme.c    |   2 +
 sys/net/altq/altq_cbq.c       |   4 +-
 sys/net/altq/altq_subr.c      |   4 +-
 sys/net/altq/if_altq.h        |  11 ++++-
 sys/net/bridge/if_bridge.c    |   2 +-
 sys/net/gif/if_gif.c          |   6 +--
 sys/net/gre/if_gre.c          |   6 +--
 sys/net/if.c                  |  14 +++---
 sys/net/if_var.h              | 105 +++++++-----------------------------------
 sys/net/ifq_var.h             |  30 +++++++++++-
 sys/net/ppp/if_ppp.c          |   6 +--
 sys/net/sl/if_sl.c            |   4 +-
 sys/net/sppp/if_spppsubr.c    |   4 +-
 sys/net/stf/if_stf.c          |   6 +--
 sys/net/tun/if_tun.c          |   4 +-
 sys/net/vlan/if_vlan.c        |   2 +-
 sys/netgraph/fec/ng_fec.c     |   6 +--
 sys/netgraph/iface/ng_iface.c |   6 +--
 sys/netproto/atm/atm_if.c     |   6 +--
 sys/netproto/ipx/ipx_ip.c     |   6 +--
 23 files changed, 104 insertions(+), 133 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bfefe4a6d6b571306fcc5dc75e8a9c476234dc4d


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]