1. 05 1月, 2012 3 次提交
  2. 04 1月, 2012 3 次提交
  3. 01 1月, 2012 1 次提交
  4. 31 12月, 2011 9 次提交
    • X
      netfilter: ctnetlink: fix timeout calculation · c1216382
      Xi Wang 提交于
      The sanity check (timeout < 0) never works; the dividend is unsigned
      and so is the division, which should have been a signed division.
      
      	long timeout = (ct->timeout.expires - jiffies) / HZ;
      	if (timeout < 0)
      		timeout = 0;
      
      This patch converts the time values to signed for the division.
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      c1216382
    • J
      ipvs: try also real server with port 0 in backup server · 52793dbe
      Julian Anastasov 提交于
      	We should not forget to try for real server with port 0
      in the backup server when processing the sync message. We should
      do it in all cases because the backup server can use different
      forwarding method.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      52793dbe
    • E
      netem: fix classful handling · 50612537
      Eric Dumazet 提交于
      Commit 10f6dfcf (Revert "sch_netem: Remove classful functionality")
      reintroduced classful functionality to netem, but broke basic netem
      behavior :
      
      netem uses an t(ime)fifo queue, and store timestamps in skb->cb[]
      
      If qdisc is changed, time constraints are not respected and other qdisc
      can destroy skb->cb[] and block netem at dequeue time.
      
      Fix this by always using internal tfifo, and optionally attach a child
      qdisc to netem (or a tree of qdiscs)
      
      Example of use :
      
      DEV=eth3
      tc qdisc del dev $DEV root
      tc qdisc add dev $DEV root handle 30: est 1sec 8sec netem delay 20ms 10ms
      tc qdisc add dev $DEV handle 40:0 parent 30:0 tbf \
      	burst 20480 limit 20480 mtu 1514 rate 32000bps
      
      qdisc netem 30: root refcnt 18 limit 1000 delay 20.0ms  10.0ms
       Sent 190792 bytes 413 pkt (dropped 0, overlimits 0 requeues 0)
       rate 18416bit 3pps backlog 0b 0p requeues 0
      qdisc tbf 40: parent 30: rate 256000bit burst 20Kb/8 mpu 0b lat 0us
       Sent 190792 bytes 413 pkt (dropped 6, overlimits 10 requeues 0)
       backlog 0b 5p requeues 0
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Stephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      50612537
    • J
      IPv6: Avoid taking write lock for /proc/net/ipv6_route · 32b293a5
      Josh Hunt 提交于
      During some debugging I needed to look into how /proc/net/ipv6_route
      operated and in my digging I found its calling fib6_clean_all() which uses
      "write_lock_bh(&table->tb6_lock)" before doing the walk of the table. I
      found this on 2.6.32, but reading the code I believe the same basic idea
      exists currently. Looking at the rtnetlink code they are only calling
      "read_lock_bh(&table->tb6_lock);" via fib6_dump_table(). While I realize
      reading from proc isn't the recommended way of fetching the ipv6 route
      table; taking a write lock seems unnecessary and would probably cause
      network performance issues.
      
      To verify this I loaded up the ipv6 route table and then ran iperf in 3
      cases:
        * doing nothing
        * reading ipv6 route table via proc
          (while :; do cat /proc/net/ipv6_route > /dev/null; done)
        * reading ipv6 route table via rtnetlink
          (while :; do ip -6 route show table all > /dev/null; done)
      
      * Load the ipv6 route table up with:
        * for ((i = 0;i < 4000;i++)); do ip route add unreachable 2000::$i; done
      
      * iperf commands:
        * client: iperf -i 1 -V -c <ipv6 addr>
        * server: iperf -V -s
      
      * iperf results - 3 runs each (in Mbits/sec)
        * nothing: client: 927,927,927 server: 927,927,927
        * proc: client: 179,97,96,113 server: 142,112,133
        * iproute: client: 928,927,928 server: 927,927,927
      
      lock_stat shows taking the write lock is causing the slowdown. Using this
      info I decided to write a version of fib6_clean_all() which replaces
      write_lock_bh(&table->tb6_lock) with read_lock_bh(&table->tb6_lock). With
      this new function I see the same results as with my rtnetlink iperf test.
      Signed-off-by: NJosh Hunt <joshhunt00@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32b293a5
    • P
      unix_diag: Fixup RQLEN extension report · c9da99e6
      Pavel Emelyanov 提交于
      While it's not too late fix the recently added RQLEN diag extension
      to report rqlen and wqlen in the same way as TCP does.
      
      I.e. for listening sockets the ack backlog length (which is the input
      queue length for socket) in rqlen and the max ack backlog length in
      wqlen, and what the CINQ/OUTQ ioctls do for established.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9da99e6
    • P
      af_unix: Move CINQ/COUTQ code to helpers · 885ee74d
      Pavel Emelyanov 提交于
      Currently tcp diag reports rqlen and wqlen values similar to how
      the CINQ/COUTQ iotcls do. To make unix diag report these values
      in the same way move the respective code into helpers.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      885ee74d
    • P
      unix_diag: Add the MEMINFO extension · 257b5298
      Pavel Emelyanov 提交于
      [ Fix indentation of sock_diag*() calls. -DaveM ]
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      257b5298
    • P
      inet_diag: Add the SKMEMINFO extension · c0636faa
      Pavel Emelyanov 提交于
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0636faa
    • P
      sock_diag: Introduce the meminfo nla core (v2) · 5d2e5f27
      Pavel Emelyanov 提交于
      Add a routine that dumps memory-related values of a socket.
      It's made as an array to make it possible to add more stuff
      here later without breaking compatibility.
      
      Since v1: The SK_MEMINFO_ constants are in userspace
      visible part of sock_diag.h, the rest is under __KERNEL__.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d2e5f27
  5. 30 12月, 2011 12 次提交
  6. 29 12月, 2011 7 次提交
  7. 28 12月, 2011 5 次提交