1. 02 12月, 2011 1 次提交
    • A
      dsa: Include linux/if_ether.h to fix build error · ea1f51be
      Axel Lin 提交于
      Include linux/if_ether.h to fix below build errors:
      
        CC      arch/arm/mach-kirkwood/common.o
      In file included from arch/arm/mach-kirkwood/common.c:19:
      include/net/dsa.h: In function 'dsa_uses_dsa_tags':
      include/net/dsa.h:192: error: 'ETH_P_DSA' undeclared (first use in this function)
      include/net/dsa.h:192: error: (Each undeclared identifier is reported only once
      include/net/dsa.h:192: error: for each function it appears in.)
      include/net/dsa.h: In function 'dsa_uses_trailer_tags':
      include/net/dsa.h:197: error: 'ETH_P_TRAILER' undeclared (first use in this function)
      make[1]: *** [arch/arm/mach-kirkwood/common.o] Error 1
      make: *** [arch/arm/mach-kirkwood] Error 2
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea1f51be
  2. 01 12月, 2011 10 次提交
  3. 30 11月, 2011 5 次提交
    • E
      flow_dissector: use a 64bit load/store · 4d77d2b5
      Eric Dumazet 提交于
      Le lundi 28 novembre 2011 à 19:06 -0500, David Miller a écrit :
      > From: Dimitris Michailidis <dm@chelsio.com>
      > Date: Mon, 28 Nov 2011 08:25:39 -0800
      >
      > >> +bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys
      > >> *flow)
      > >> +{
      > >> +	int poff, nhoff = skb_network_offset(skb);
      > >> +	u8 ip_proto;
      > >> +	u16 proto = skb->protocol;
      > >
      > > __be16 instead of u16 for proto?
      >
      > I'll take care of this when I apply these patches.
      
      ( CC trimmed )
      
      Thanks David !
      
      Here is a small patch to use one 64bit load/store on x86_64 instead of
      two 32bit load/stores.
      
      [PATCH net-next] flow_dissector: use a 64bit load/store
      
      gcc compiler is smart enough to use a single load/store if we
      memcpy(dptr, sptr, 8) on x86_64, regardless of
      CONFIG_CC_OPTIMIZE_FOR_SIZE
      
      In IP header, daddr immediately follows saddr, this wont change in the
      future. We only need to make sure our flow_keys (src,dst) fields wont
      break the rule.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d77d2b5
    • T
      bql: Byte queue limits · 114cf580
      Tom Herbert 提交于
      Networking stack support for byte queue limits, uses dynamic queue
      limits library.  Byte queue limits are maintained per transmit queue,
      and a dql structure has been added to netdev_queue structure for this
      purpose.
      
      Configuration of bql is in the tx-<n> sysfs directory for the queue
      under the byte_queue_limits directory.  Configuration includes:
      limit_min, bql minimum limit
      limit_max, bql maximum limit
      hold_time, bql slack hold time
      
      Also under the directory are:
      limit, current byte limit
      inflight, current number of bytes on the queue
      Signed-off-by: NTom Herbert <therbert@google.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      114cf580
    • T
      net: Add netdev interfaces for recording sends/comp · c5d67bd7
      Tom Herbert 提交于
      Add interfaces for drivers to call for recording number of packets and
      bytes at send time and transmit completion.  Also, added a function to
      "reset" a queue.  These will be used by Byte Queue Limits.
      Signed-off-by: NTom Herbert <therbert@google.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5d67bd7
    • T
      net: Add queue state xoff flag for stack · 73466498
      Tom Herbert 提交于
      Create separate queue state flags so that either the stack or drivers
      can turn on XOFF.  Added a set of functions used in the stack to determine
      if a queue is really stopped (either by stack or driver)
      Signed-off-by: NTom Herbert <therbert@google.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73466498
    • T
      dql: Dynamic queue limits · 75957ba3
      Tom Herbert 提交于
      Implementation of dynamic queue limits (dql).  This is a libary which
      allows a queue limit to be dynamically managed.  The goal of dql is
      to set the queue limit, number of objects to the queue, to be minimized
      without allowing the queue to be starved.
      
      dql would be used with a queue which has these properties:
      
      1) Objects are queued up to some limit which can be expressed as a
         count of objects.
      2) Periodically a completion process executes which retires consumed
         objects.
      3) Starvation occurs when limit has been reached, all queued data has
         actually been consumed but completion processing has not yet run,
         so queuing new data is blocked.
      4) Minimizing the amount of queued data is desirable.
      
      A canonical example of such a queue would be a NIC HW transmit queue.
      
      The queue limit is dynamic, it will increase or decrease over time
      depending on the workload.  The queue limit is recalculated each time
      completion processing is done.  Increases occur when the queue is
      starved and can exponentially increase over successive intervals.
      Decreases occur when more data is being maintained in the queue than
      needed to prevent starvation.  The number of extra objects, or "slack",
      is measured over successive intervals, and to avoid hysteresis the
      limit is only reduced by the miminum slack seen over a configurable
      time period.
      
      dql API provides routines to manage the queue:
      - dql_init is called to intialize the dql structure
      - dql_reset is called to reset dynamic values
      - dql_queued called when objects are being enqueued
      - dql_avail returns availability in the queue
      - dql_completed is called when objects have be consumed in the queue
      
      Configuration consists of:
      - max_limit, maximum limit
      - min_limit, minimum limit
      - slack_hold_time, time to measure instances of slack before reducing
        queue limit
      Signed-off-by: NTom Herbert <therbert@google.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      75957ba3
  4. 29 11月, 2011 3 次提交
  5. 28 11月, 2011 3 次提交
  6. 27 11月, 2011 9 次提交
  7. 24 11月, 2011 2 次提交
  8. 23 11月, 2011 6 次提交
  9. 22 11月, 2011 1 次提交
    • E
      netfilter: use jump_label for nf_hooks · a2d7ec58
      Eric Dumazet 提交于
      On configs where CONFIG_JUMP_LABEL=y, we can replace in fast path a
      load/compare/conditional jump by a single jump with no dcache reference.
      
      Jump target is modified as soon as nf_hooks[pf][hook] switches from
      empty state to non empty states. jump_label state is kept outside of
      nf_hooks array so has no cost on cpu caches.
      
      This patch removes the test on CONFIG_NETFILTER_DEBUG : No need to call
      nf_hook_slow() at all if nf_hooks[pf][hook] is empty, this didnt give
      useful information, but slowed down things a lot.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Patrick McHardy <kaber@trash.net>
      CC: Pablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2d7ec58