1. 15 8月, 2017 5 次提交
  2. 10 8月, 2017 1 次提交
  3. 20 7月, 2017 1 次提交
    • G
      liquidio: lio_vf_main: remove unnecessary static in setup_io_queues() · 93fe07e5
      Gustavo A. R. Silva 提交于
      Remove unnecessary static on local variables cpu_id_modulus and cpu_id.
      Such variables are initialized before being used, on every execution
      path throughout the function. The static has no benefit and, removing
      it reduces the object file size.
      
      This issue was detected using Coccinelle and the following semantic patch:
      
      @bad exists@
      position p;
      identifier x;
      type T;
      @@
      
      static T x@p;
      ...
      x = <+...x...+>
      
      @@
      identifier x;
      expression e;
      type T;
      position p != bad.p;
      @@
      
      -static
       T x@p;
       ... when != x
           when strict
      ?x = e;
      
      In the following log you can see a significant difference in the object
      file size. Also, there is a significant difference in the bss segment.
      This log is the output of the size command, before and after the code
      change:
      
      before:
         text    data     bss     dec     hex filename
        55656   10680     576   66912   10560 drivers/net/ethernet/cavium/liquidio/lio_vf_main.o
      
      after:
         text    data     bss     dec     hex filename
        55796   10536     448   66780   104dc drivers/net/ethernet/cavium/liquidio/lio_vf_main.o
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93fe07e5
  4. 19 6月, 2017 1 次提交
  5. 10 6月, 2017 1 次提交
  6. 03 6月, 2017 1 次提交
  7. 22 5月, 2017 1 次提交
  8. 17 5月, 2017 1 次提交
  9. 08 4月, 2017 1 次提交
    • F
      liquidio: fix VF incorrectly indicating that it successfully set its VLAN · 0c264588
      Felix Manlunas 提交于
      For security reasons, NIC firmware does not allow VF to set its VLAN if PF
      set it already.  Firmware allows VF to set its VLAN if PF did not set it.
      After the VF instructs the firmware to set the VLAN, VF always indicates
      (via return 0) that the operation is successful--even for the times when it
      isn't.
      
      Put in a mechanism for the VF's set VLAN function to receive the firmware
      response code, then make that function return -EPERM if the firmware
      forbids the operation.
      
      Make that mechanism available for other functions that may, in the future,
      be interested in receiving the response code from the firmware.  That
      mechanism involves adding new fields to struct octnic_ctrl_pkt, so make all
      users of struct octnic_ctrl_pkt initialize the struct to zero before using
      it; otherwise, the mechanism might act on uninitialized garbage.
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDerek Chickles <derek.chickles@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c264588
  10. 31 3月, 2017 1 次提交
  11. 29 3月, 2017 1 次提交
  12. 23 3月, 2017 3 次提交
  13. 22 3月, 2017 1 次提交
  14. 17 3月, 2017 1 次提交
  15. 10 3月, 2017 1 次提交
    • V
      liquidio: improve UDP TX performance · 67e303e0
      VSR Burru 提交于
      Improve UDP TX performance by:
      * reducing the ring size from 2K to 512
      * replacing the numerous streaming DMA allocations for info buffers and
        gather lists with one large consistent DMA allocation per ring
      
      BQL is not effective here.  We reduced the ring size because there is heavy
      overhead with dma_map_single every so often.  With iommu=on, dma_map_single
      in PF Tx data path was taking longer time (~700usec) for every ~250
      packets.  Debugged intel_iommu code, and found that PF driver is utilizing
      too many static IO virtual address mapping entries (for gather list entries
      and info buffers): about 100K entries for two PF's each using 8 rings.
      Also, finding an empty entry (in rbtree of device domain's iova mapping in
      kernel) during Tx path becomes a bottleneck every so often; the loop to
      find the empty entry goes through over 40K iterations; this is too costly
      and was the major overhead.  Overhead is low when this loop quits quickly.
      
      Netperf benchmark numbers before and after patch:
      
      PF UDP TX
      +--------+--------+------------+------------+---------+
      |        |        |  Before    |  After     |         |
      | Number |        |  Patch     |  Patch     |         |
      |  of    | Packet | Throughput | Throughput | Percent |
      | Flows  |  Size  |  (Gbps)    |  (Gbps)    | Change  |
      +--------+--------+------------+------------+---------+
      |        |   360  |   0.52     |   0.93     |  +78.9  |
      |   1    |  1024  |   1.62     |   2.84     |  +75.3  |
      |        |  1518  |   2.44     |   4.21     |  +72.5  |
      +--------+--------+------------+------------+---------+
      |        |   360  |   0.45     |   1.59     | +253.3  |
      |   4    |  1024  |   1.34     |   5.48     | +308.9  |
      |        |  1518  |   2.27     |   8.31     | +266.1  |
      +--------+--------+------------+------------+---------+
      |        |   360  |   0.40     |   1.61     | +302.5  |
      |   8    |  1024  |   1.64     |   4.24     | +158.5  |
      |        |  1518  |   2.87     |   6.52     | +127.2  |
      +--------+--------+------------+------------+---------+
      
      VF UDP TX
      +--------+--------+------------+------------+---------+
      |        |        |  Before    |  After     |         |
      | Number |        |  Patch     |  Patch     |         |
      |  of    | Packet | Throughput | Throughput | Percent |
      | Flows  |  Size  |  (Gbps)    |  (Gbps)    | Change  |
      +--------+--------+------------+------------+---------+
      |        |   360  |   1.28     |   1.49     |  +16.4  |
      |   1    |  1024  |   4.44     |   4.39     |   -1.1  |
      |        |  1518  |   6.08     |   6.51     |   +7.1  |
      +--------+--------+------------+------------+---------+
      |        |   360  |   2.35     |   2.35     |    0.0  |
      |   4    |  1024  |   6.41     |   8.07     |  +25.9  |
      |        |  1518  |   9.56     |   9.54     |   -0.2  |
      +--------+--------+------------+------------+---------+
      |        |   360  |   3.41     |   3.65     |   +7.0  |
      |   8    |  1024  |   9.35     |   9.34     |   -0.1  |
      |        |  1518  |   9.56     |   9.57     |   +0.1  |
      +--------+--------+------------+------------+---------+
      Signed-off-by: NVSR Burru <veerasenareddy.burru@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDerek Chickles <derek.chickles@cavium.com>
      Signed-off-by: NRaghu Vatsavayi <raghu.vatsavayi@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67e303e0
  16. 11 2月, 2017 1 次提交
    • R
      net: liquidio: fix build errors when linux/phy*.h is removed from net/dsa.h · e3bfc6e7
      Russell King 提交于
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: type defaults to 'int' in declaration of 'MODULE_LICENSE'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: type defaults to 'int' in declaration of 'MODULE_VERSION'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:36: error: expected ')' before 'int'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:37: error: expected ')' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: error: type defaults to 'int' in declaration of 'module_init'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: error: type defaults to 'int' in declaration of 'module_exit'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:36: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:37: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:38: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: type defaults to 'int' in declaration of 'MODULE_LICENSE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:39: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: type defaults to 'int' in declaration of 'MODULE_VERSION'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:40: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:41: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:42: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:43: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:46: error: expected ')' before 'int'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:48: error: expected ')' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:53: error: expected ')' before 'int'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:54: error: expected ')' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:57: error: expected ')' before 'sizeof'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:58: error: expected ')' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: data definitionhas no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:498: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_recv_vf_drv_notice':
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4393: error: implicit declaration of function 'try_module_get'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4400: error: implicit declaration of function 'module_put'
      drivers/net/ethernet/cavium/liquidio/lio_main.c: At top level:
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: error: type defaults to 'int' in declaration of 'module_init'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: error: type defaults to 'int' in declaration of 'module_exit'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: parameter names (without types) in function declaration
      
      Add linux/module.h to both these files.
      
      drivers/net/ethernet/cavium/liquidio/octeon_console.c:40:31: error: expected ')' before 'int'
      drivers/net/ethernet/cavium/liquidio/octeon_console.c:42:4: error: expected ')' before string constant
      
      Add linux/moduleparam.h to this file.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3bfc6e7
  17. 08 2月, 2017 1 次提交
  18. 02 2月, 2017 1 次提交
  19. 31 1月, 2017 1 次提交
  20. 27 1月, 2017 1 次提交
  21. 19 1月, 2017 1 次提交
    • T
      net: Remove usage of net_device last_rx member · 4a7c9726
      Tobias Klauser 提交于
      The network stack no longer uses the last_rx member of struct net_device
      since the bonding driver switched to use its own private last_rx in
      commit 9f242738 ("bonding: use last_arp_rx in slave_last_rx()").
      
      However, some drivers still (ab)use the field for their own purposes and
      some driver just update it without actually using it.
      
      Previously, there was an accompanying comment for the last_rx member
      added in commit 4dc89133 ("net: add a comment on netdev->last_rx")
      which asked drivers not to update is, unless really needed. However,
      this commend was removed in commit f8ff080d ("bonding: remove
      useless updating of slave->dev->last_rx"), so some drivers added later
      on still did update last_rx.
      
      Remove all usage of last_rx and switch three drivers (sky2, atp and
      smc91c92_cs) which actually read and write it to use their own private
      copy in netdev_priv.
      
      Compile-tested with allyesconfig and allmodconfig on x86 and arm.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Reviewed-by: NJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a7c9726
  22. 14 1月, 2017 1 次提交
  23. 11 1月, 2017 1 次提交
  24. 09 1月, 2017 1 次提交
  25. 09 12月, 2016 10 次提交