1. 02 2月, 2008 24 次提交
  2. 01 2月, 2008 16 次提交
    • J
      block: kill swap_io_context() · 3bc217ff
      Jens Axboe 提交于
      It blindly copies everything in the io_context, including the lock.
      That doesn't work so well for either lock ordering or lockdep.
      
      There seems zero point in swapping io contexts on a request to request
      merge, so the best point of action is to just remove it.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      3bc217ff
    • J
      block: new end request handling interface should take unsigned byte counts · 22b13210
      Jens Axboe 提交于
      No point in passing signed integers as the byte count, they can never
      be negative.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      22b13210
    • P
      [NET_SCHED]: Add flow classifier · e5dfb815
      Patrick McHardy 提交于
      Add new "flow" classifier, which is meant to extend the SFQ hashing
      capabilities without hard-coding new hash functions and also allows
      deterministic mappings of keys to classes, replacing some out of tree
      iptables patches like IPCLASSIFY (maps IPs to classes), IPMARK (maps
      IPs to marks, with fw filters to classes), ...
      
      Some examples:
      
      - Classic SFQ hash:
      
        tc filter add ... flow hash \
        	keys src,dst,proto,proto-src,proto-dst divisor 1024
      
      - Classic SFQ hash, but using information from conntrack to work properly in
        combination with NAT:
      
        tc filter add ... flow hash \
        	keys nfct-src,nfct-dst,proto,nfct-proto-src,nfct-proto-dst divisor 1024
      
      - Map destination IPs of 192.168.0.0/24 to classids 1-257:
      
        tc filter add ... flow map \
        	key dst addend -192.168.0.0 divisor 256
      
      - alternatively:
      
        tc filter add ... flow map \
        	key dst and 0xff
      
      - similar, but reverse ordered:
      
        tc filter add ... flow map \
        	key dst and 0xff xor 0xff
      
      Perturbation is currently not supported because we can't reliable kill the
      timer on destruction.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e5dfb815
    • P
      [NET_SCHED]: sch_sfq: make internal queues visible as classes · 94de78d1
      Patrick McHardy 提交于
      Add support for dumping statistics and make internal queues visible as
      classes.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      94de78d1
    • A
      [IPV4]: Make struct ipv4_devconf static. · 0027ba84
      Adrian Bunk 提交于
      struct ipv4_devconf can now become static.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Acked-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0027ba84
    • M
      [XFRM]: Fix statistics. · 9472c9ef
      Masahide NAKAMURA 提交于
      o Outbound sequence number overflow error status
        is counted as XfrmOutStateSeqError.
      o Additionaly, it changes inbound sequence number replay
        error name from XfrmInSeqOutOfWindow to XfrmInStateSeqError
        to apply name scheme above.
      o Inbound IPv4 UDP encapsuling type mismatch error is wrongly
        mapped to XfrmInStateInvalid then this patch fiex the error
        to XfrmInStateMismatch.
      Signed-off-by: NMasahide NAKAMURA <nakam@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9472c9ef
    • E
      [IPV4] route cache: Introduce rt_genid for smooth cache invalidation · 29e75252
      Eric Dumazet 提交于
      Current ip route cache implementation is not suited to large caches.
      
      We can consume a lot of CPU when cache must be invalidated, since we
      currently need to evict all cache entries, and this eviction is
      sometimes asynchronous. min_delay & max_delay can somewhat control this
      asynchronism behavior, but whole thing is a kludge, regularly triggering
      infamous soft lockup messages. When entries are still in use, this also
      consumes a lot of ram, filling dst_garbage.list.
      
      A better scheme is to use a generation identifier on each entry,
      so that cache invalidation can be performed by changing the table
      identifier, without having to scan all entries.
      No more delayed flushing, no more stalling when secret_interval expires.
      
      Invalidated entries will then be freed at GC time (controled by
      ip_rt_gc_timeout or stress), or when an invalidated entry is found
      in a chain when an insert is done.
      Thus we keep a normal equilibrium.
      
      This patch :
      - renames rt_hash_rnd to rt_genid (and makes it an atomic_t)
      - Adds a new rt_genid field to 'struct rtable' (filling a hole on 64bit)
      - Checks entry->rt_genid at appropriate places :
      29e75252
    • C
      [VLAN]: set_rx_mode support for unicast address list · e83a2ea8
      Chris Leech 提交于
      Reuse the existing logic for multicast list synchronization for the
      unicast address list. The core of dev_mc_sync/unsync are split out as
      __dev_addr_sync/unsync and moved from dev_mcast.c to dev.c.  These are
      then used to implement dev_unicast_sync/unsync as well.
      
      I'm working on cleaning up Intel's FCoE stack, which generates new MAC
      addresses from the fibre channel device id assigned by the fabric as
      per the current draft specification in T11.  When using such a
      protocol in a VLAN environment it would be nice to not always be
      forced into promiscuous mode, assuming the underlying Ethernet driver
      supports multiple unicast addresses as well.
      Signed-off-by: NChris Leech <christopher.leech@intel.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      e83a2ea8
    • S
      [IPV4] fib_trie: rescan if key is lost during dump · 71d67e66
      Stephen Hemminger 提交于
      Normally during a dump the key of the last dumped entry is used for
      continuation, but since lock is dropped it might be lost. In that case
      fallback to the old counter based N^2 behaviour.  This means the dump
      will end up skipping some routes which matches what FIB_HASH does.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      71d67e66
    • P
      [NETNS]: Tcp-v6 sockets per-net lookup. · d86e0dac
      Pavel Emelyanov 提交于
      Add a net argument to inet6_lookup and propagate it further.
      Actually, this is tcp-v6 implementation of what was done for
      tcp-v4 sockets in a previous patch.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d86e0dac
    • P
      [IPV6]: Introduce the INET6_TW_MATCH macro. · 535174ef
      Pavel Emelyanov 提交于
      We have INET_MATCH, INET_TW_MATCH and INET6_MATCH to test sockets and
      twbuckets for matching, but ipv6 twbuckets are tested manually.
      
      Here's the INET6_TW_MATCH to help with it.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      535174ef
    • J
    • J
    • A
    • J
      [NETFILTER]: xt_hashlimit match, revision 1 · 09e410de
      Jan Engelhardt 提交于
      Introduces the xt_hashlimit match revision 1. It adds support for
      kernel-level inversion and grouping source and/or destination IP
      addresses, allowing to limit on a per-subnet basis. While this would
      technically obsolete xt_limit, xt_hashlimit is a more expensive due
      to the hashbucketing.
      
      Kernel-level inversion: Previously you had to do user-level inversion:
      
      	iptables -N foo
      	iptables -A foo -m hashlimit --hashlimit(-upto) 5/s -j RETURN
      	iptables -A foo -j DROP
      	iptables -A INPUT -j foo
      
      now it is simpler:
      
      	iptables -A INPUT -m hashlimit --hashlimit-over 5/s -j DROP
      Signed-off-by: NJan Engelhardt <jengelh@computergmbh.de>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09e410de
    • P
      [NETFILTER]: {ip,arp,ip6}_tables: fix sparse warnings in compat code · b0a6363c
      Patrick McHardy 提交于
        CHECK   net/ipv4/netfilter/ip_tables.c
      net/ipv4/netfilter/ip_tables.c:1453:8: warning: incorrect type in argument 3 (different signedness)
      net/ipv4/netfilter/ip_tables.c:1453:8:    expected int *size
      net/ipv4/netfilter/ip_tables.c:1453:8:    got unsigned int [usertype] *size
      net/ipv4/netfilter/ip_tables.c:1458:44: warning: incorrect type in argument 3 (different signedness)
      net/ipv4/netfilter/ip_tables.c:1458:44:    expected int *size
      net/ipv4/netfilter/ip_tables.c:1458:44:    got unsigned int [usertype] *size
      net/ipv4/netfilter/ip_tables.c:1603:2: warning: incorrect type in argument 2 (different signedness)
      net/ipv4/netfilter/ip_tables.c:1603:2:    expected unsigned int *i
      net/ipv4/netfilter/ip_tables.c:1603:2:    got int *<noident>
      net/ipv4/netfilter/ip_tables.c:1627:8: warning: incorrect type in argument 3 (different signedness)
      net/ipv4/netfilter/ip_tables.c:1627:8:    expected int *size
      net/ipv4/netfilter/ip_tables.c:1627:8:    got unsigned int *size
      net/ipv4/netfilter/ip_tables.c:1634:40: warning: incorrect type in argument 3 (different signedness)
      net/ipv4/netfilter/ip_tables.c:1634:40:    expected int *size
      net/ipv4/netfilter/ip_tables.c:1634:40:    got unsigned int *size
      net/ipv4/netfilter/ip_tables.c:1653:8: warning: incorrect type in argument 5 (different signedness)
      net/ipv4/netfilter/ip_tables.c:1653:8:    expected unsigned int *i
      net/ipv4/netfilter/ip_tables.c:1653:8:    got int *<noident>
      net/ipv4/netfilter/ip_tables.c:1666:2: warning: incorrect type in argument 2 (different signedness)
      net/ipv4/netfilter/ip_tables.c:1666:2:    expected unsigned int *i
      net/ipv4/netfilter/ip_tables.c:1666:2:    got int *<noident>
        CHECK   net/ipv4/netfilter/arp_tables.c
      net/ipv4/netfilter/arp_tables.c:1285:40: warning: incorrect type in argument 3 (different signedness)
      net/ipv4/netfilter/arp_tables.c:1285:40:    expected int *size
      net/ipv4/netfilter/arp_tables.c:1285:40:    got unsigned int *size
      net/ipv4/netfilter/arp_tables.c:1543:44: warning: incorrect type in argument 3 (different signedness)
      net/ipv4/netfilter/arp_tables.c:1543:44:    expected int *size
      net/ipv4/netfilter/arp_tables.c:1543:44:    got unsigned int [usertype] *size
        CHECK   net/ipv6/netfilter/ip6_tables.c
      net/ipv6/netfilter/ip6_tables.c:1481:8: warning: incorrect type in argument 3 (different signedness)
      net/ipv6/netfilter/ip6_tables.c:1481:8:    expected int *size
      net/ipv6/netfilter/ip6_tables.c:1481:8:    got unsigned int [usertype] *size
      net/ipv6/netfilter/ip6_tables.c:1486:44: warning: incorrect type in argument 3 (different signedness)
      net/ipv6/netfilter/ip6_tables.c:1486:44:    expected int *size
      net/ipv6/netfilter/ip6_tables.c:1486:44:    got unsigned int [usertype] *size
      net/ipv6/netfilter/ip6_tables.c:1631:2: warning: incorrect type in argument 2 (different signedness)
      net/ipv6/netfilter/ip6_tables.c:1631:2:    expected unsigned int *i
      net/ipv6/netfilter/ip6_tables.c:1631:2:    got int *<noident>
      net/ipv6/netfilter/ip6_tables.c:1655:8: warning: incorrect type in argument 3 (different signedness)
      net/ipv6/netfilter/ip6_tables.c:1655:8:    expected int *size
      net/ipv6/netfilter/ip6_tables.c:1655:8:    got unsigned int *size
      net/ipv6/netfilter/ip6_tables.c:1662:40: warning: incorrect type in argument 3 (different signedness)
      net/ipv6/netfilter/ip6_tables.c:1662:40:    expected int *size
      net/ipv6/netfilter/ip6_tables.c:1662:40:    got unsigned int *size
      net/ipv6/netfilter/ip6_tables.c:1680:8: warning: incorrect type in argument 5 (different signedness)
      net/ipv6/netfilter/ip6_tables.c:1680:8:    expected unsigned int *i
      net/ipv6/netfilter/ip6_tables.c:1680:8:    got int *<noident>
      net/ipv6/netfilter/ip6_tables.c:1693:2: warning: incorrect type in argument 2 (different signedness)
      net/ipv6/netfilter/ip6_tables.c:1693:2:    expected unsigned int *i
      net/ipv6/netfilter/ip6_tables.c:1693:2:    got int *<noident>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0a6363c