1. 29 4月, 2016 2 次提交
  2. 28 4月, 2016 17 次提交
  3. 27 4月, 2016 7 次提交
  4. 26 4月, 2016 14 次提交
    • D
      net: ipv6: Delete host routes on an ifdown · 38bd10c4
      David Ahern 提交于
      It was a simple idea -- save IPv6 configured addresses on a link down
      so that IPv6 behaves similar to IPv4. As always the devil is in the
      details and the IPv6 stack as too many behavioral differences from IPv4
      making the simple idea more complicated than it needs to be.
      
      The current implementation for keeping IPv6 addresses can panic or spit
      out a warning in one of many paths:
      
      1. IPv6 route gets an IPv4 route as its 'next' which causes a panic in
         rt6_fill_node while handling a route dump request.
      
      2. rt->dst.obsolete is set to DST_OBSOLETE_DEAD hitting the WARN_ON in
         fib6_del
      
      3. Panic in fib6_purge_rt because rt6i_ref count is not 1.
      
      The root cause of all these is references related to the host route for
      an address that is retained.
      
      So, this patch deletes the host route every time the ifdown loop runs.
      Since the host route is deleted and will be re-generated an up there is
      no longer a need for the l3mdev fix up. On the 'admin up' side move
      addrconf_permanent_addr into the NETDEV_UP event handling so that it
      runs only once versus on UP and CHANGE events.
      
      All of the current panics and warnings appear to be related to
      addresses on the loopback device, but given the catastrophic nature when
      a bug is triggered this patch takes the conservative approach and evicts
      all host routes rather than trying to determine when it can be re-used
      and when it can not. That can be a later optimizaton if desired.
      Signed-off-by: NDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38bd10c4
    • D
      Revert "ipv6: Revert optional address flusing on ifdown." · 6a923934
      David S. Miller 提交于
      This reverts commit 841645b5.
      
      Ok, this puts the feature back.  I've decided to apply David A.'s
      bug fix and run with that rather than make everyone wait another
      whole release for this feature.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a923934
    • T
      ila: add checksum neutral ILA translations · 90bfe662
      Tom Herbert 提交于
      Support checksum neutral ILA as described in the ILA draft. The low
      order 16 bits of the identifier are used to contain the checksum
      adjustment value.
      
      The csum-mode parameter is added to described checksum processing. There
      are three values:
       - adjust transport checksum (previous behavior)
       - do checksum neutral mapping
       - do nothing
      
      On output the csum-mode in the ila_params is checked and acted on. If
      mode is checksum neutral mapping then to mapping and set C-bit.
      
      On input, C-bit is checked. If it is set checksum-netural mapping is
      done (regardless of csum-mode in ila params) and C-bit will be cleared.
      If it is not set then action in csum-mode is taken.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90bfe662
    • T
      ila: xlat changes · 642c2c95
      Tom Herbert 提交于
      Change model of xlat to be used only for input where lookup is done on
      the locator part of an address (comparing to locator_match as key
      in rhashtable). This is needed for checksum neutral translation
      which obfuscates the low order 16 bits of the identifier. It also
      permits hosts to be in muliple ILA domains (each locator can map
      to a different SIR address). A check is also added to disallow
      translating non-ILA addresses (check of type in identifier).
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      642c2c95
    • T
      ila: Add struct definitions and helpers · 351596aa
      Tom Herbert 提交于
      Add structures for identifiers, locators, and an ila address which
      is composed of a locator and identifier and in6_addr can be cast to
      it. This includes a three bit type field and enums for the types defined
      in ILA I-D.
      
      In ILA lwt don't allow user to set a translation for a non-ILA
      address (type of identifier is zero meaning it is an IID). This also
      requires that the destination prefix is at least 65 bytes (64
      bit locator and first byte of identifier).
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      351596aa
    • G
      Bluetooth: 6lowpan: Fix memory corruption of ipv6 destination address · 55441070
      Glenn Ruben Bakke 提交于
      The memcpy of ipv6 header destination address to the skb control block
      (sbk->cb) in header_create() results in currupted memory when bt_xmit()
      is issued. The skb->cb is "released" in the return of header_create()
      making room for lower layer to minipulate the skb->cb.
      
      The value retrieved in bt_xmit is not persistent across header creation
      and sending, and the lower layer will overwrite portions of skb->cb,
      making the copied destination address wrong.
      
      The memory corruption will lead to non-working multicast as the first 4
      bytes of the copied destination address is replaced by a value that
      resolves into a non-multicast prefix.
      
      This fix removes the dependency on the skb control block between header
      creation and send, by moving the destination address memcpy to the send
      function path (setup_create, which is called from bt_xmit).
      Signed-off-by: NGlenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
      Acked-by: NJukka Rissanen <jukka.rissanen@linux.intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Cc: stable@vger.kernel.org # 4.5+
      55441070
    • S
      RDS: TCP: Call pskb_extract() helper function · 947d2756
      Sowmini Varadhan 提交于
      rds-stress experiments with request size 256 bytes, 8K acks,
      using 16 threads show a 40% improvment when pskb_extract()
      replaces the {skb_clone(..); pskb_pull(..); pskb_trim(..);}
      pattern in the Rx path, so we leverage the perf gain with
      this commit.
      Signed-off-by: NSowmini Varadhan <sowmini.varadhan@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      947d2756
    • S
      skbuff: Add pskb_extract() helper function · 6fa01ccd
      Sowmini Varadhan 提交于
      A pattern of skb usage seen in modules such as RDS-TCP is to
      extract `to_copy' bytes from the received TCP segment, starting
      at some offset `off' into a new skb `clone'. This is done in
      the ->data_ready callback, where the clone skb is queued up for rx on
      the PF_RDS socket, while the parent TCP segment is returned unchanged
      back to the TCP engine.
      
      The existing code uses the sequence
      	clone = skb_clone(..);
      	pskb_pull(clone, off, ..);
      	pskb_trim(clone, to_copy, ..);
      with the intention of discarding the first `off' bytes. However,
      skb_clone() + pskb_pull() implies pksb_expand_head(), which ends
      up doing a redundant memcpy of bytes that will then get discarded
      in __pskb_pull_tail().
      
      To avoid this inefficiency, this commit adds pskb_extract() that
      creates the clone, and memcpy's only the relevant header/frag/frag_list
      to the start of `clone'. pskb_trim() is then invoked to trim clone
      down to the requested to_copy bytes.
      Signed-off-by: NSowmini Varadhan <sowmini.varadhan@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6fa01ccd
    • M
      codel: split into multiple files · d068ca2a
      Michal Kazior 提交于
      It was impossible to include codel.h for the
      purpose of having access to codel_params or
      codel_vars structure definitions and using them
      for embedding in other more complex structures.
      
      This splits allows codel.h itself to be treated
      like any other header file while codel_qdisc.h and
      codel_impl.h contain function definitions with
      logic that was previously in codel.h.
      
      This copies over copyrights and doesn't involve
      code changes other than adding a few additional
      include directives to net/sched/sch*codel.c.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d068ca2a
    • M
      codel: generalize the implementation · 79bdc4c8
      Michal Kazior 提交于
      This strips out qdisc specific bits from the code
      and makes it slightly more reusable. Codel will be
      used by wireless/mac80211 in the future.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79bdc4c8
    • E
      net: better drop monitoring in ip{6}_recv_error() · 960a2628
      Eric Dumazet 提交于
      We should call consume_skb(skb) when skb is properly consumed,
      or kfree_skb(skb) when skb must be dropped in error case.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      960a2628
    • E
      tcp: SYN packets are now simply consumed · 0aea76d3
      Eric Dumazet 提交于
      We now have proper per-listener but also per network namespace counters
      for SYN packets that might be dropped.
      
      We replace the kfree_skb() by consume_skb() to be drop monitor [1]
      friendly, and remove an obsolete comment.
      FastOpen SYN packets can carry payload in them just fine.
      
      [1] perf record -a -g -e skb:kfree_skb sleep 1; perf report
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0aea76d3
    • D
      ipv6: Revert optional address flusing on ifdown. · 841645b5
      David S. Miller 提交于
      This reverts the following three commits:
      
      70af921d
      799977d9
      f1705ec1
      
      The feature was ill conceived, has terrible semantics, and has added
      nothing but regressions to the already fragile ipv6 stack.
      
      Fixes: f1705ec1 ("net: ipv6: Make address flushing on ifdown optional")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      841645b5
    • N
      2dad624e