1. 15 3月, 2018 3 次提交
  2. 14 3月, 2018 3 次提交
  3. 13 3月, 2018 26 次提交
  4. 12 3月, 2018 8 次提交
    • W
      mlxsw: spectrum_kvdl: Make some functions static · 3ed898e8
      Wei Yongjun 提交于
      Fixes the following sparse warnings:
      
      drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:371:5: warning:
       symbol 'mlxsw_sp_kvdl_single_occ_get' was not declared. Should it be static?
      drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:384:5: warning:
       symbol 'mlxsw_sp_kvdl_chunks_occ_get' was not declared. Should it be static?
      drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:397:5: warning:
       symbol 'mlxsw_sp_kvdl_large_chunks_occ_get' was not declared. Should it be static?
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ed898e8
    • G
      net: Make RX-FCS and HW GRO mutually exclusive · de8d5ab2
      Gal Pressman 提交于
      Same as LRO, hardware GRO cannot be enabled with RX-FCS.
      When both are requested, hardware GRO will be dropped.
      Suggested-by: NDavid Miller <davem@davemloft.net>
      Signed-off-by: NGal Pressman <galp@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de8d5ab2
    • S
      net: llc: drop VLA in llc_sap_mcast() · 678f4bda
      Salvatore Mesoraca 提交于
      Avoid a VLA[1] by using a real constant expression instead of a variable.
      The compiler should be able to optimize the original code and avoid using
      an actual VLA. Anyway this change is useful because it will avoid a false
      positive with -Wvla, it might also help the compiler generating better
      code.
      
      [1] https://lkml.org/lkml/2018/3/7/621Signed-off-by: NSalvatore Mesoraca <s.mesoraca16@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      678f4bda
    • C
      lan743x: make functions lan743x_csr_read and lan743x_csr_read static · c16b1a9c
      Colin Ian King 提交于
      Functions lan743x_csr_read and lan743x_csr_read are local to the source
      and do not need to be in global scope, so make them static.
      
      Cleans up sparse warning:
      drivers/net/ethernet/microchip/lan743x_main.c:56:5: warning: symbol
      lan743x_csr_read' was not declared. Should it be static?
      drivers/net/ethernet/microchip/lan743x_main.c:61:6: warning: symbol
      'lan743x_csr_write' was not declared. Should it be static?
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c16b1a9c
    • C
      lan743x: remove some redundant variables and assignments · 8e8af97a
      Colin Ian King 提交于
      Function lan743x_phy_init assigns pointer 'netdev' but this is never read
      and hence it can be removed. The return error code handling can also be
      cleaned up to remove the variable 'ret'.
      
      Function lan743x_phy_link_status_change assigns pointer 'phy' twice and
      this is never read, so it also can be removed.
      
      Finally, function lan743x_tx_napi_poll initializes pointer 'adapter'
      and then re-assigns the same value into this pointer a little later on
      so this second assignment is redundant and can be also removed.
      
      Cleans up clang warnings:
      drivers/net/ethernet/microchip/lan743x_main.c:951:2: warning: Value
      stored to 'netdev' is never read
      drivers/net/ethernet/microchip/lan743x_main.c:971:3: warning: Value
      stored to 'phy' is never read
      drivers/net/ethernet/microchip/lan743x_main.c:1583:26: warning: Value
      stored to 'adapter' during its initialization is never read
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e8af97a
    • C
      rds: remove redundant variable 'sg_off' · bdf08fc5
      Colin Ian King 提交于
      Variable sg_off is assigned a value but it is never read, hence it is
      redundant and can be removed.
      
      Cleans up clang warning:
      net/rds/message.c:373:2: warning: Value stored to 'sg_off' is never read
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Acked-by: NSowmini Varadhan <sowmini.varadhan@oracle.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdf08fc5
    • D
      ipv6: Use ip6_multipath_hash_policy() in rt6_multipath_hash(). · bbfa047a
      David S. Miller 提交于
      Make use of the new helper.
      Suggested-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbfa047a
    • D
      Merge branch 'mlxsw-Removing-dependency-of-mlxsw-on-GRE' · 27a9ae9b
      David S. Miller 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: Removing dependency of mlxsw on GRE
      
      Petr says:
      
      mlxsw_spectrum supports offloading of a tc action mirred egress mirror
      to a gretap or ip6gretap netdevice, which necessitates calls to
      functions defined in ip_gre, ip6_gre and ip6_tunnel modules. Previously
      this was enabled by introducing a hard dependency of MLXSW_SPECTRUM on
      NET_IPGRE and IPV6_GRE. However the rest of mlxsw is careful about
      picking which modules are absolutely required, and therefore the better
      approach is to make mlxsw_spectrum tolerant of absence of one or both of
      the GRE flavors.
      
      One way this might be resolved is by keeping the code in mlxsw_spectrum
      intact, and defining defaults for functions that mlxsw_spectrum depends
      on. The downsides are that other modules end up littered with these
      do-nothing defaults; that the driver ends up carrying quite a bit of
      dead code; and that the driver ends up having to explicitly depend on
      IPV6_TUNNEL to prevent configurations where mlxsw_spectrum is compiled
      in and and ip6_tunnel is a module, something that it currently can treat
      as an implementation detail of the IPV6_GRE dependency.
      
      Alternatively, the driver should just bite the bullet and ifdef-out the
      code that handles configurations that are not supported. Since that's
      what we are doing for IPv6 dependency, let's do the same for the GRE
      flavors.
      
      Patch #1 introduces a wrapper function for determining the value of
      ipv6.sysctl.multipath_hash_policy, which defaults to 0 on non-IPv6
      builds. That function is then used from spectrum_router.c, instead of
      the direct variable reference that was introduced there during the short
      window when the Spectrum driver had a hard dependency on IPv6.
      
      Patch #2 moves one function to keep together in one block all the
      callbacks for handling (IPv4) gretap mirroring.
      
      Patch #3 then introduces the ifdefs to hide the irrelevant code.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27a9ae9b