1. 25 1月, 2011 5 次提交
    • J
      dcbnl: make get_app handling symmetric for IEEE and CEE DCBx · 3dce38a0
      John Fastabend 提交于
      The IEEE get/set app handlers use generic routines and do not
      require the net_device to implement the dcbnl_ops routines. This
      patch makes it symmetric so user space and drivers do not have
      to handle the CEE version and IEEE DCBx versions differently.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3dce38a0
    • E
      tcp: fix bug in listening_get_next() · fd0273c5
      Eric Dumazet 提交于
      commit a8b690f9 (tcp: Fix slowness in read /proc/net/tcp)
      introduced a bug in handling of SYN_RECV sockets.
      
      st->offset represents number of sockets found since beginning of
      listening_hash[st->bucket].
      
      We should not reset st->offset when iterating through
      syn_table[st->sbucket], or else if more than ~25 sockets (if
      PAGE_SIZE=4096) are in SYN_RECV state, we exit from listening_get_next()
      with a too small st->offset
      
      Next time we enter tcp_seek_last_pos(), we are not able to seek past
      already found sockets.
      Reported-by: NPK <runningdoglackey@yahoo.com>
      CC: Tom Herbert <therbert@google.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd0273c5
    • D
      inetpeer: Use correct AVL tree base pointer in inet_getpeer(). · 3408404a
      David S. Miller 提交于
      Family was hard-coded to AF_INET but should be daddr->family.
      
      This fixes crashes when unlinking ipv6 peer entries, since the
      unlink code was looking up the base pointer properly.
      Reported-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3408404a
    • M
      GRO: fix merging a paged skb after non-paged skbs · d1dc7abf
      Michal Schmidt 提交于
      Suppose that several linear skbs of the same flow were received by GRO. They
      were thus merged into one skb with a frag_list. Then a new skb of the same flow
      arrives, but it is a paged skb with data starting in its frags[].
      
      Before adding the skb to the frag_list skb_gro_receive() will of course adjust
      the skb to throw away the headers. It correctly modifies the page_offset and
      size of the frag, but it leaves incorrect information in the skb:
       ->data_len is not decreased at all.
       ->len is decreased only by headlen, as if no change were done to the frag.
      Later in a receiving process this causes skb_copy_datagram_iovec() to return
      -EFAULT and this is seen in userspace as the result of the recv() syscall.
      
      In practice the bug can be reproduced with the sfc driver. By default the
      driver uses an adaptive scheme when it switches between using
      napi_gro_receive() (with skbs) and napi_gro_frags() (with pages). The bug is
      reproduced when under rx load with enough successful GRO merging the driver
      decides to switch from the former to the latter.
      
      Manual control is also possible, so reproducing this is easy with netcat:
       - on machine1 (with sfc): nc -l 12345 > /dev/null
       - on machine2: nc machine1 12345 < /dev/zero
       - on machine1:
         echo 1 > /sys/module/sfc/parameters/rx_alloc_method  # use skbs
         echo 2 > /sys/module/sfc/parameters/rx_alloc_method  # use pages
       - See that nc has quit suddenly.
      
      [v2: Modified by Eric Dumazet to avoid advancing skb->data past the end
           and to use a temporary variable.]
      Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1dc7abf
    • E
      net: arp_ioctl() must hold RTNL · c506653d
      Eric Dumazet 提交于
      Commit 941666c2 "net: RCU conversion of dev_getbyhwaddr() and
      arp_ioctl()" introduced a regression, reported by Jamie Heilman.
      "arp -Ds 192.168.2.41 eth0 pub" triggered the ASSERT_RTNL() assert
      in pneigh_lookup()
      
      Removing RTNL requirement from arp_ioctl() was a mistake, just revert
      that part.
      Reported-by: NJamie Heilman <jamie@audible.transient.net>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c506653d
  2. 24 1月, 2011 1 次提交
  3. 21 1月, 2011 2 次提交
    • E
      net_sched: accurate bytes/packets stats/rates · 9190b3b3
      Eric Dumazet 提交于
      In commit 44b82883 (net_sched: pfifo_head_drop problem), we fixed
      a problem with pfifo_head drops that incorrectly decreased
      sch->bstats.bytes and sch->bstats.packets
      
      Several qdiscs (CHOKe, SFQ, pfifo_head, ...) are able to drop a
      previously enqueued packet, and bstats cannot be changed, so
      bstats/rates are not accurate (over estimated)
      
      This patch changes the qdisc_bstats updates to be done at dequeue() time
      instead of enqueue() time. bstats counters no longer account for dropped
      frames, and rates are more correct, since enqueue() bursts dont have
      effect on dequeue() rate.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9190b3b3
    • D
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes 提交于
      The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
      is used to configure any non-standard kernel with a much larger scope than
      only small devices.
      
      This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
      references to the option throughout the kernel.  A new CONFIG_EMBEDDED
      option is added that automatically selects CONFIG_EXPERT when enabled and
      can be used in the future to isolate options that should only be
      considered for embedded systems (RISC architectures, SLOB, etc).
      
      Calling the option "EXPERT" more accurately represents its intention: only
      expert users who understand the impact of the configuration changes they
      are making should enable it.
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robin Holt <holt@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6a108a14
  4. 20 1月, 2011 3 次提交
  5. 19 1月, 2011 2 次提交
  6. 16 1月, 2011 3 次提交
  7. 15 1月, 2011 1 次提交
  8. 14 1月, 2011 5 次提交
  9. 13 1月, 2011 7 次提交
  10. 12 1月, 2011 8 次提交
  11. 11 1月, 2011 3 次提交