“38e82a41115c8bf1b54d8bb939bbb50cbfa6ca0b”上不存在“projects/dtysky/imports.yml”
  1. 02 2月, 2019 1 次提交
    • G
      ipv4: fib: use struct_size() in kzalloc() · 1f533ba6
      Gustavo A. R. Silva 提交于
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          struct boo entry[];
      };
      
      instance = kzalloc(sizeof(struct foo) + count * sizeof(struct boo), GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can
      now use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f533ba6
  2. 28 1月, 2019 5 次提交
  3. 27 1月, 2019 4 次提交
  4. 26 1月, 2019 2 次提交
  5. 25 1月, 2019 3 次提交
    • P
      tcp_bbr: adapt cwnd based on ack aggregation estimation · 78dc70eb
      Priyaranjan Jha 提交于
      Aggregation effects are extremely common with wifi, cellular, and cable
      modem link technologies, ACK decimation in middleboxes, and LRO and GRO
      in receiving hosts. The aggregation can happen in either direction,
      data or ACKs, but in either case the aggregation effect is visible
      to the sender in the ACK stream.
      
      Previously BBR's sending was often limited by cwnd under severe ACK
      aggregation/decimation because BBR sized the cwnd at 2*BDP. If packets
      were acked in bursts after long delays (e.g. one ACK acking 5*BDP after
      5*RTT), BBR's sending was halted after sending 2*BDP over 2*RTT, leaving
      the bottleneck idle for potentially long periods. Note that loss-based
      congestion control does not have this issue because when facing
      aggregation it continues increasing cwnd after bursts of ACKs, growing
      cwnd until the buffer is full.
      
      To achieve good throughput in the presence of aggregation effects, this
      algorithm allows the BBR sender to put extra data in flight to keep the
      bottleneck utilized during silences in the ACK stream that it has evidence
      to suggest were caused by aggregation.
      
      A summary of the algorithm: when a burst of packets are acked by a
      stretched ACK or a burst of ACKs or both, BBR first estimates the expected
      amount of data that should have been acked, based on its estimated
      bandwidth. Then the surplus ("extra_acked") is recorded in a windowed-max
      filter to estimate the recent level of observed ACK aggregation. Then cwnd
      is increased by the ACK aggregation estimate. The larger cwnd avoids BBR
      being cwnd-limited in the face of ACK silences that recent history suggests
      were caused by aggregation. As a sanity check, the ACK aggregation degree
      is upper-bounded by the cwnd (at the time of measurement) and a global max
      of BW * 100ms. The algorithm is further described by the following
      presentation:
      https://datatracker.ietf.org/meeting/101/materials/slides-101-iccrg-an-update-on-bbr-work-at-google-00
      
      In our internal testing, we observed a significant increase in BBR
      throughput (measured using netperf), in a basic wifi setup.
      - Host1 (sender on ethernet) -> AP -> Host2 (receiver on wifi)
      - 2.4 GHz -> BBR before: ~73 Mbps; BBR after: ~102 Mbps; CUBIC: ~100 Mbps
      - 5.0 GHz -> BBR before: ~362 Mbps; BBR after: ~593 Mbps; CUBIC: ~601 Mbps
      
      Also, this code is running globally on YouTube TCP connections and produced
      significant bandwidth increases for YouTube traffic.
      
      This is based on Ian Swett's max_ack_height_ algorithm from the
      QUIC BBR implementation.
      Signed-off-by: NPriyaranjan Jha <priyarjha@google.com>
      Signed-off-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      78dc70eb
    • P
      tcp_bbr: refactor bbr_target_cwnd() for general inflight provisioning · 232aa8ec
      Priyaranjan Jha 提交于
      Because bbr_target_cwnd() is really a general-purpose BBR helper for
      computing some volume of inflight data as a function of the estimated
      BDP, refactor it into following helper functions:
      - bbr_bdp()
      - bbr_quantization_budget()
      - bbr_inflight()
      Signed-off-by: NPriyaranjan Jha <priyarjha@google.com>
      Signed-off-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      232aa8ec
    • W
      ip_tunnel: Make none-tunnel-dst tunnel port work with lwtunnel · d71b5753
      wenxu 提交于
      ip l add dev tun type gretap key 1000
      ip a a dev tun 10.0.0.1/24
      
      Packets with tun-id 1000 can be recived by tun dev. But packet can't
      be sent through dev tun for non-tunnel-dst
      
      With this patch: tunnel-dst can be get through lwtunnel like beflow:
      ip r a 10.0.0.7 encap ip dst 172.168.0.11 dev tun
      Signed-off-by: Nwenxu <wenxu@ucloud.cn>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d71b5753
  6. 23 1月, 2019 4 次提交
    • L
      bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() internals · a2e2ca3b
      Linus Lüssing 提交于
      With this patch the internal use of the skb_trimmed is reduced to
      the ICMPv6/IGMP checksum verification. And for the length checks
      the newly introduced helper functions are used instead of calculating
      and checking with skb->len directly.
      
      These changes should hopefully make it easier to verify that length
      checks are performed properly.
      Signed-off-by: NLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2e2ca3b
    • L
      bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() calls · ba5ea614
      Linus Lüssing 提交于
      This patch refactors ip_mc_check_igmp(), ipv6_mc_check_mld() and
      their callers (more precisely, the Linux bridge) to not rely on
      the skb_trimmed parameter anymore.
      
      An skb with its tail trimmed to the IP packet length was initially
      introduced for the following three reasons:
      
      1) To be able to verify the ICMPv6 checksum.
      2) To be able to distinguish the version of an IGMP or MLD query.
         They are distinguishable only by their size.
      3) To avoid parsing data for an IGMPv3 or MLDv2 report that is
         beyond the IP packet but still within the skb.
      
      The first case still uses a cloned and potentially trimmed skb to
      verfiy. However, there is no need to propagate it to the caller.
      For the second and third case explicit IP packet length checks were
      added.
      
      This hopefully makes ip_mc_check_igmp() and ipv6_mc_check_mld() easier
      to read and verfiy, as well as easier to use.
      Signed-off-by: NLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba5ea614
    • L
      net: ip_gre: use erspan key field for tunnel lookup · cb73ee40
      Lorenzo Bianconi 提交于
      Use ERSPAN key header field as tunnel key in gre_parse_header routine
      since ERSPAN protocol sets the key field of the external GRE header to
      0 resulting in a tunnel lookup fail in ip6gre_err.
      In addition remove key field parsing and pskb_may_pull check in
      erspan_rcv and ip6erspan_rcv
      
      Fixes: 5a963eb6 ("ip6_gre: Add ERSPAN native tunnel support")
      Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb73ee40
    • C
      net: introduce a knob to control whether to inherit devconf config · 856c395c
      Cong Wang 提交于
      There have been many people complaining about the inconsistent
      behaviors of IPv4 and IPv6 devconf when creating new network
      namespaces.  Currently, for IPv4, we inherit all current settings
      from init_net, but for IPv6 we reset all setting to default.
      
      This patch introduces a new /proc file
      /proc/sys/net/core/devconf_inherit_init_net to control the
      behavior of whether to inhert sysctl current settings from init_net.
      This file itself is only available in init_net.
      
      As demonstrated below:
      
      Initial setup in init_net:
       # cat /proc/sys/net/ipv4/conf/all/rp_filter
       2
       # cat /proc/sys/net/ipv6/conf/all/accept_dad
       1
      
      Default value 0 (current behavior):
       # ip netns del test
       # ip netns add test
       # ip netns exec test cat /proc/sys/net/ipv4/conf/all/rp_filter
       2
       # ip netns exec test cat /proc/sys/net/ipv6/conf/all/accept_dad
       0
      
      Set to 1 (inherit from init_net):
       # echo 1 > /proc/sys/net/core/devconf_inherit_init_net
       # ip netns del test
       # ip netns add test
       # ip netns exec test cat /proc/sys/net/ipv4/conf/all/rp_filter
       2
       # ip netns exec test cat /proc/sys/net/ipv6/conf/all/accept_dad
       1
      
      Set to 2 (reset to default):
       # echo 2 > /proc/sys/net/core/devconf_inherit_init_net
       # ip netns del test
       # ip netns add test
       # ip netns exec test cat /proc/sys/net/ipv4/conf/all/rp_filter
       0
       # ip netns exec test cat /proc/sys/net/ipv6/conf/all/accept_dad
       0
      
      Set to a value out of range (invalid):
       # echo 3 > /proc/sys/net/core/devconf_inherit_init_net
       -bash: echo: write error: Invalid argument
       # echo -1 > /proc/sys/net/core/devconf_inherit_init_net
       -bash: echo: write error: Invalid argument
      Reported-by: NZhu Yanjun <Yanjun.Zhu@windriver.com>
      Reported-by: NTonghao Zhang <xiangxia.m.yue@gmail.com>
      Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: NTonghao Zhang <xiangxia.m.yue@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      856c395c
  7. 20 1月, 2019 3 次提交
  8. 19 1月, 2019 1 次提交
  9. 18 1月, 2019 17 次提交