1. 04 10月, 2013 12 次提交
  2. 03 10月, 2013 10 次提交
    • J
      ath10k: wmi: Convert use of 6 to ETH_ALEN · 7b4371ea
      Joe Perches 提交于
      Use the appropriate define instead of 6.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Noticed-by: Julia Lawall <julia.lawall@lip6.fr> via spatch script
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b4371ea
    • J
      net:drivers/net: Miscellaneous conversions to ETH_ALEN · d458cdf7
      Joe Perches 提交于
      Convert the memset/memcpy uses of 6 to ETH_ALEN
      where appropriate.
      
      Also convert some struct definitions and u8 array
      declarations of [6] to ETH_ALEN.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Acked-by: NArend van Spriel <arend@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d458cdf7
    • D
      include/linux/skbuff.h: move CONFIG_XFRM check inside the skb_sec_path() · 0b3d8e08
      Denis Kirjanov 提交于
      And thus we have only one function definition
      Signed-off-by: NDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b3d8e08
    • E
      tcp: sndbuf autotuning improvements · 6ae70532
      Eric Dumazet 提交于
      tcp_fixup_sndbuf() is underestimating initial send buffer requirements.
      
      It was not noticed because big GSO packets were escaping the limitation,
      but with smaller TSO packets (or TSO/GSO/SG off), application hits
      sk_sndbuf before having a chance to fill enough packets in socket write
      queue.
      
      - initial cwnd can be bigger than 10 for specific routes
      
      - SKB_TRUESIZE() is a bit under real needs in some cases,
        because of power-of-two rounding in kmalloc()
      
      - Fast Recovery (RFC 5681 3.2) : Cubic needs 70% factor
      
      - Extra cushion (application might react slowly to POLLOUT)
      
      tcp_v4_conn_req_fastopen() needs to call tcp_init_metrics() before
      calling tcp_init_buffer_space()
      
      Then we realize tcp_new_space() should call tcp_fixup_sndbuf()
      instead of duplicating this stuff.
      
      Rename tcp_fixup_sndbuf() to tcp_sndbuf_expand() to be more
      descriptive.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Acked-by: NMaciej Żenczykowski <maze@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ae70532
    • B
      fib_trie: avoid a redundant bit judgement in inflate · bbe34cf8
      baker.zhang 提交于
      Because 'node' is the i'st child of 'oldnode',
      thus, here 'i' equals
      tkey_extract_bits(node->key, oldtnode->pos, oldtnode->bits)
      
      we just get 1 more bit,
      and need not care the detail value of this bits.
      
      I apologize for the mistake.
      
      I generated the patch on a branch version,
      and did not notice the put_child has been changed.
      
      I have redone the test on HEAD version with my patch.
      
      two cases are used.
      case 1. inflate a node which has a leaf child node.
      case 2: inflate a node which has a an child node with skipped bits
      
      test env:
        ip link set eth0 up
        ip a add dev eth0 192.168.11.1/32
      here, we just focus on route table(MAIN),
      so I use a "192.168.11.1/32" address to simplify the test case.
      
      call trace:
      + fib_insert_node
      + + trie_rebalance
      + + + resize
      + + + + inflate
      
      Test case 1:  inflate a node which has a leaf child node.
      
      ===========================================================
      step 1. prepare a fib trie
      ------------------------------------------
        ip r a 192.168.0.0/24 via 192.168.11.1
        ip r a 192.168.1.0/24 via 192.168.11.1
      
      we get a fib trie.
      root@baker:~# cat /proc/net/fib_trie
      Main:
        +-- 192.168.0.0/23 1 0 0
         |-- 192.168.0.0
          /24 universe UNICAST
         |-- 192.168.1.0
          /24 universe UNICAST
      Local:
      .....
      
      step 2. Add the third route
      ------------------------------------------
      root@baker:~# ip r a 192.168.2.0/24 via 192.168.11.1
      
      A fib_trie leaf will be inserted in fib_insert_node before trie_rebalance.
      
      For function 'inflate':
      'inflate' is called with following trie.
        +-- 192.168.0.0/22 1 1 0 <=== tn node
          +-- 192.168.0.0/23 1 0 0    <== node a
              |-- 192.168.0.0
                /24 universe UNICAST
              |-- 192.168.1.0
                /24 universe UNICAST
            |-- 192.168.2.0          <== leaf(node b)
      
      When process node b, which is a leaf. here:
      i is 1,
      node key "192.168.2.0"
      oldnode is (pos:22, bits:1)
      
      unpatch source:
      tkey_extract_bits(node->key, oldtnode->pos + oldtnode->bits, 1)
      it equals:
      tkey_extract_bits("192.168,2,0", 22 + 1, 1)
      
      thus got 0, and call put_child(tn, 2*i, node); <== 2*i=2.
      
      patched source:
      tkey_extract_bits(node->key, oldtnode->pos, oldtnode->bits + 1),
      tkey_extract_bits("192.168,2,0", 22, 1 + 1)  <== get 2.
      
      Test case 2:  inflate a node which has a an child node with skipped bits
      ==========================================================================
      step 1. prepare a fib trie.
        ip link set eth0 up
        ip a add dev eth0 192.168.11.1/32
        ip r a 192.168.128.0/24 via 192.168.11.1
        ip r a 192.168.0.0/24  via 192.168.11.1
        ip r a 192.168.16.0/24   via 192.168.11.1
        ip r a 192.168.32.0/24  via 192.168.11.1
        ip r a 192.168.48.0/24  via 192.168.11.1
        ip r a 192.168.144.0/24   via 192.168.11.1
        ip r a 192.168.160.0/24   via 192.168.11.1
        ip r a 192.168.176.0/24   via 192.168.11.1
      
      check:
      root@baker:~# cat /proc/net/fib_trie
      Main:
        +-- 192.168.0.0/16 1 0 0
           +-- 192.168.0.0/18 2 0 0
              |-- 192.168.0.0
                 /24 universe UNICAST
              |-- 192.168.16.0
                 /24 universe UNICAST
              |-- 192.168.32.0
                 /24 universe UNICAST
              |-- 192.168.48.0
                 /24 universe UNICAST
           +-- 192.168.128.0/18 2 0 0
              |-- 192.168.128.0
                 /24 universe UNICAST
              |-- 192.168.144.0
                 /24 universe UNICAST
              |-- 192.168.160.0
                 /24 universe UNICAST
              |-- 192.168.176.0
                 /24 universe UNICAST
      Local:
        ...
      
      step 2. add a route to trigger inflate.
        ip r a 192.168.96.0/24   via 192.168.11.1
      
      This command will call serveral times inflate.
      In the first time, the fib_trie is:
      ________________________
      +-- 192.168.128.0/(16, 1) <== tn node
       +-- 192.168.0.0/(17, 1)  <== node a
        +-- 192.168.0.0/(18, 2)
         |-- 192.168.0.0
         |-- 192.168.16.0
         |-- 192.168.32.0
         |-- 192.168.48.0
        |-- 192.168.96.0
       +-- 192.168.128.0/(18, 2) <== node b.
        |-- 192.168.128.0
        |-- 192.168.144.0
        |-- 192.168.160.0
        |-- 192.168.176.0
      
      NOTE: node b is a interal node with skipped bits.
      here,
      i:1,
      node->key "192.168.128.0",
      oldnode:(pos:16, bits:1)
      so
      tkey_extract_bits(node->key, oldtnode->pos + oldtnode->bits, 1)
      it equals:
      tkey_extract_bits("192.168,128,0", 16 + 1, 1) <=== 0
      
      tkey_extract_bits(node->key, oldtnode->pos, oldtnode->bits, 1)
      it equals:
      tkey_extract_bits("192.168,128,0", 16, 1+1) <=== 2
      
      2*i + 0 == 2, so the result is same.
      Signed-off-by: Nbaker.zhang <baker.kernel@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbe34cf8
    • J
      isdn: eicon: free pointer after using it in log msg in divas_um_idi_delete_entity() · 84557783
      Jesper Juhl 提交于
      Not really a problem, but nice IMHO; the Coverity static analyzer
      complains that we use the pointer 'e' after it has been freed, so move
      the freeing below the final use, even if that use is just using the
      value of the pointer and not actually dereferencing it.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84557783
    • W
      xen-netfront: convert to GRO API · 99d3d587
      Wei Liu 提交于
      Anirban was seeing netfront received MTU size packets, which downgraded
      throughput. The following patch makes netfront use GRO API which
      improves throughput for that case.
      Signed-off-by: NWei Liu <wei.liu2@citrix.com>
      Cc: Anirban Chakraborty <abchak@juniper.net>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Acked-by: NKonrad Wilk <konrad.wilk@oracle.com>
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      99d3d587
    • H
      tg3: use phylib when robo switch is in use · ee002b64
      Hauke Mehrtens 提交于
      When a switch is connected as a PHY to the MAC driven by tg3, use
      phylib and provide the phy address to tg3 from the sprom.
      Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: NNithin Nayak Sujir <nsujir@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee002b64
    • H
      ssb: provide phy address for Gigabit Ethernet driver · 4bcef89f
      Hauke Mehrtens 提交于
      Add a function to provide the phy address which should be used to the
      Gigabit Ethernet driver connected to ssb.
      Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de>
      Reviewed-by: NNithin Nayak Sujir <nsujir@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bcef89f
    • H
      tg3: add support a phy at an address different than 01 · ead2402c
      Hauke Mehrtens 提交于
      When phylib was in use tg3 only searched at address 01 on the mdio
      bus and did not work with any other address. On the BCM4705 SoCs the
      switch is connected as a PHY behind the MAC driven by tg3 and it is at
      PHY address 30 in most cases. This is a preparation patch to allow
      support for such switches.
      
      phy_addr is set to TG3_PHY_MII_ADDR for all devices, which are using
      phylib, so this should not change any behavior.
      Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: NNithin Nayak Sujir <nsujir@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ead2402c
  3. 02 10月, 2013 18 次提交