1. 13 4月, 2012 1 次提交
  2. 11 4月, 2012 1 次提交
  3. 06 4月, 2012 1 次提交
  4. 04 4月, 2012 2 次提交
  5. 29 3月, 2012 1 次提交
  6. 28 3月, 2012 1 次提交
    • B
      net/core: dev_forward_skb() should clear skb_iif · 3b9785c6
      Benjamin LaHaise 提交于
      While investigating another bug, I found that the code on the incoming path
      in __netif_receive_skb will only set skb->skb_iif if it is already 0.  When
      dev_forward_skb() is used in the case of interfaces like veth, skb_iif may
      already have been set.  Making dev_forward_skb() cause the packet to look
      like a newly received packet would seem to the the correct behaviour here,
      as otherwise the wrong incoming interface can be reported for such a packet.
      Signed-off-by: NBenjamin LaHaise <bcrl@kvack.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b9785c6
  7. 26 3月, 2012 1 次提交
  8. 22 3月, 2012 1 次提交
  9. 20 3月, 2012 1 次提交
  10. 12 3月, 2012 1 次提交
  11. 07 3月, 2012 1 次提交
  12. 06 3月, 2012 1 次提交
  13. 05 3月, 2012 1 次提交
  14. 01 3月, 2012 1 次提交
  15. 27 2月, 2012 1 次提交
  16. 25 2月, 2012 1 次提交
  17. 24 2月, 2012 4 次提交
  18. 22 2月, 2012 5 次提交
    • G
      rtnetlink: Fix problem with buffer allocation · 115c9b81
      Greg Rose 提交于
      Implement a new netlink attribute type IFLA_EXT_MASK.  The mask
      is a 32 bit value that can be used to indicate to the kernel that
      certain extended ifinfo values are requested by the user application.
      At this time the only mask value defined is RTEXT_FILTER_VF to
      indicate that the user wants the ifinfo dump to send information
      about the VFs belonging to the interface.
      
      This patch fixes a bug in which certain applications do not have
      large enough buffers to accommodate the extra information returned
      by the kernel with large numbers of SR-IOV virtual functions.
      Those applications will not send the new netlink attribute with
      the interface info dump request netlink messages so they will
      not get unexpectedly large request buffers returned by the kernel.
      
      Modifies the rtnl_calcit function to traverse the list of net
      devices and compute the minimum buffer size that can hold the
      info dumps of all matching devices based upon the filter passed
      in via the new netlink attribute filter mask.  If no filter
      mask is sent then the buffer allocation defaults to NLMSG_GOODSIZE.
      
      With this change it is possible to add yet to be defined netlink
      attributes to the dump request which should make it fairly extensible
      in the future.
      Signed-off-by: NGreg Rose <gregory.v.rose@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      115c9b81
    • M
      neighbour: Fixed race condition at tbl->nht · 84338a6c
      Michel Machado 提交于
      When the fixed race condition happens:
      
      1. While function neigh_periodic_work scans the neighbor hash table
      pointed by field tbl->nht, it unlocks and locks tbl->lock between
      buckets in order to call cond_resched.
      
      2. Assume that function neigh_periodic_work calls cond_resched, that is,
      the lock tbl->lock is available, and function neigh_hash_grow runs.
      
      3. Once function neigh_hash_grow finishes, and RCU calls
      neigh_hash_free_rcu, the original struct neigh_hash_table that function
      neigh_periodic_work was using doesn't exist anymore.
      
      4. Once back at neigh_periodic_work, whenever the old struct
      neigh_hash_table is accessed, things can go badly.
      Signed-off-by: NMichel Machado <michel@digirati.com.br>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84338a6c
    • P
      sock: Introduce the SO_PEEK_OFF sock option · ef64a54f
      Pavel Emelyanov 提交于
      This one specifies where to start MSG_PEEK-ing queue data from. When
      set to negative value means that MSG_PEEK works as ususally -- peeks
      from the head of the queue always.
      
      When some bytes are peeked from queue and the peeking offset is non
      negative it is moved forward so that the next peek will return next
      portion of data.
      
      When non-peeking recvmsg occurs and the peeking offset is non negative
      is is moved backward so that the next peek will still peek the proper
      data (i.e. the one that would have been picked if there were no non
      peeking recv in between).
      
      The offset is set using per-proto opteration to let the protocol handle
      the locking issues and to check whether the peeking offset feature is
      supported by the protocol the socket belongs to.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef64a54f
    • P
      datagram: Add offset argument to __skb_recv_datagram · 3f518bf7
      Pavel Emelyanov 提交于
      This one is only considered for MSG_PEEK flag and the value pointed by
      it specifies where to start peeking bytes from. If the offset happens to
      point into the middle of the returned skb, the offset within this skb is
      put back to this very argument.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f518bf7
    • P
      datagram: Factor out sk queue referencing · 4934b032
      Pavel Emelyanov 提交于
      This makes lines shorter and simplifies further patching.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4934b032
  19. 15 2月, 2012 1 次提交
  20. 14 2月, 2012 1 次提交
  21. 11 2月, 2012 3 次提交
  22. 09 2月, 2012 2 次提交
    • E
      gro: more generic L2 header check · 5ca3b72c
      Eric Dumazet 提交于
      Shlomo Pongratz reported GRO L2 header check was suited for Ethernet
      only, and failed on IB/ipoib traffic.
      
      He provided a patch faking a zeroed header to let GRO aggregates frames.
      
      Roland Dreier, Herbert Xu, and others suggested we change GRO L2 header
      check to be more generic, ie not assuming L2 header is 14 bytes, but
      taking into account hard_header_len.
      
      __napi_gro_receive() has special handling for the common case (Ethernet)
      to avoid a memcmp() call and use an inline optimized function instead.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Reported-by: NShlomo Pongratz <shlomop@mellanox.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Tested-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ca3b72c
    • E
      gro: more generic L2 header check · 43480aec
      Eric Dumazet 提交于
      Shlomo Pongratz reported GRO L2 header check was suited for Ethernet
      only, and failed on IB/ipoib traffic.
      
      He provided a patch faking a zeroed header to let GRO aggregates frames.
      
      Roland Dreier, Herbert Xu, and others suggested we change GRO L2 header
      check to be more generic, ie not assuming L2 header is 14 bytes, but
      taking into account hard_header_len.
      
      __napi_gro_receive() has special handling for the common case (Ethernet)
      to avoid a memcmp() call and use an inline optimized function instead.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Reported-by: NShlomo Pongratz <shlomop@mellanox.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Tested-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43480aec
  23. 05 2月, 2012 1 次提交
  24. 03 2月, 2012 1 次提交
    • L
      cgroup: remove cgroup_subsys argument from callbacks · 761b3ef5
      Li Zefan 提交于
      The argument is not used at all, and it's not necessary, because
      a specific callback handler of course knows which subsys it
      belongs to.
      
      Now only ->pupulate() takes this argument, because the handlers of
      this callback always call cgroup_add_file()/cgroup_add_files().
      
      So we reduce a few lines of code, though the shrinking of object size
      is minimal.
      
       16 files changed, 113 insertions(+), 162 deletions(-)
      
         text    data     bss     dec     hex filename
      5486240  656987 7039960 13183187         c928d3 vmlinux.o.orig
      5486170  656987 7039960 13183117         c9288d vmlinux.o
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      761b3ef5
  25. 02 2月, 2012 4 次提交
  26. 31 1月, 2012 1 次提交
    • T
      net: Allow ipv6 proxies and arp proxies be shown with iproute2 · 84920c14
      Tony Zelenoff 提交于
      Add ability to return neighbour proxies list to caller if
      it sent full ndmsg structure and has NTF_PROXY flag set.
      
      Before this patch (and before iproute2 patches):
      $ ip neigh add proxy 2001::1 dev eth0
      $ ip -6 neigh show
      $
      
      After it and with applied iproute2 patches:
      $ ip neigh add proxy 2001::1 dev eth0
      $ ip -6 neigh show
      2001::1 dev eth0  proxy
      $
      
      Compatibility with old versions of iproute2 is not broken,
      kernel checks for incoming structure size and properly
      works if old structure is came.
      
      [v2]
      * changed comments style.
      * removed useless line with continue and curly bracket.
      * changed incoming message size check from equal to more or
        equal.
      
      CC: davem@davemloft.net
      CC: kuznet@ms2.inr.ac.ru
      CC: netdev@vger.kernel.org
      CC: xemul@parallels.com
      Signed-off-by: NTony Zelenoff <antonz@parallels.com>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84920c14