1. 06 11月, 2014 16 次提交
  2. 05 11月, 2014 15 次提交
  3. 04 11月, 2014 2 次提交
    • E
      net: add rbnode to struct sk_buff · 56b17425
      Eric Dumazet 提交于
      Yaogong replaces TCP out of order receive queue by an RB tree.
      
      As netem already does a private skb->{next/prev/tstamp} union
      with a 'struct rb_node', lets do this in a cleaner way.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Yaogong Wang <wygivan@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56b17425
    • E
      net: less interrupt masking in NAPI · d75b1ade
      Eric Dumazet 提交于
      net_rx_action() can mask irqs a single time to transfert sd->poll_list
      into a private list, for a very short duration.
      
      Then, napi_complete() can avoid masking irqs again,
      and net_rx_action() only needs to mask irq again in slow path.
      
      This patch removes 2 couples of irq mask/unmask per typical NAPI run,
      more if multiple napi were triggered.
      
      Note this also allows to give control back to caller (do_softirq())
      more often, so that other softirq handlers can be called a bit earlier,
      or ksoftirqd can be wakeup earlier under pressure.
      
      This was developed while testing an alternative to RX interrupt
      mitigation to reduce latencies while keeping or improving GRO
      aggregation on fast NIC.
      
      Idea is to test napi->gro_list at the end of a napi->poll() and
      reschedule one NAPI poll, but after servicing a full round of
      softirqs (timers, TX, rcu, ...). This will be allowed only if softirq
      is currently serviced by idle task or ksoftirqd, and resched not needed.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d75b1ade
  4. 01 11月, 2014 3 次提交
  5. 31 10月, 2014 4 次提交
    • P
      netfilter: nft_reject_bridge: restrict reject to prerouting and input · 127917c2
      Pablo Neira Ayuso 提交于
      Restrict the reject expression to the prerouting and input bridge
      hooks. If we allow this to be used from forward or any other later
      bridge hook, if the frame is flooded to several ports, we'll end up
      sending several reject packets, one per cloned packet.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      127917c2
    • P
      netfilter: nft_reject_bridge: don't use IP stack to reject traffic · 523b929d
      Pablo Neira Ayuso 提交于
      If the packet is received via the bridge stack, this cannot reject
      packets from the IP stack.
      
      This adds functions to build the reject packet and send it from the
      bridge stack. Comments and assumptions on this patch:
      
      1) Validate the IPv4 and IPv6 headers before further processing,
         given that the packet comes from the bridge stack, we cannot assume
         they are clean. Truncated packets are dropped, we follow similar
         approach in the existing iptables match/target extensions that need
         to inspect layer 4 headers that is not available. This also includes
         packets that are directed to multicast and broadcast ethernet
         addresses.
      
      2) br_deliver() is exported to inject the reject packet via
         bridge localout -> postrouting. So the approach is similar to what
         we already do in the iptables reject target. The reject packet is
         sent to the bridge port from which we have received the original
         packet.
      
      3) The reject packet is forged based on the original packet. The TTL
         is set based on sysctl_ip_default_ttl for IPv4 and per-net
         ipv6.devconf_all hoplimit for IPv6.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      523b929d
    • P
      netfilter: nf_reject_ipv6: split nf_send_reset6() in smaller functions · 8bfcdf66
      Pablo Neira Ayuso 提交于
      That can be reused by the reject bridge expression to build the reject
      packet. The new functions are:
      
      * nf_reject_ip6_tcphdr_get(): to sanitize and to obtain the TCP header.
      * nf_reject_ip6hdr_put(): to build the IPv6 header.
      * nf_reject_ip6_tcphdr_put(): to build the TCP header.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      8bfcdf66
    • P
      netfilter: nf_reject_ipv4: split nf_send_reset() in smaller functions · 052b9498
      Pablo Neira Ayuso 提交于
      That can be reused by the reject bridge expression to build the reject
      packet. The new functions are:
      
      * nf_reject_ip_tcphdr_get(): to sanitize and to obtain the TCP header.
      * nf_reject_iphdr_put(): to build the IPv4 header.
      * nf_reject_ip_tcphdr_put(): to build the TCP header.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      052b9498