1. 09 9月, 2018 5 次提交
    • Y
      failover: Fix error return code in net_failover_create · 09317da3
      YueHaibing 提交于
      if failover_register failed, 'err' code should be set correctly
      
      Fixes: cfc80d9a ("net: Introduce net_failover driver")
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09317da3
    • J
      net: stmmac: Enable TC Ops for GMAC >= 4 · cc577b01
      Jose Abreu 提交于
      GMAC >= 4 also supports CBS. Lets enable the TC Ops for these versions.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cc577b01
    • V
      net: sched: act_nat: remove dependency on rtnl lock · f20a4d01
      Vlad Buslov 提交于
      According to the new locking rule, we have to take tcf_lock for both
      ->init() and ->dump(), as RTNL will be removed.
      
      Use tcf spinlock to protect private nat action data from concurrent
      modification during dump. (nat init already uses tcf spinlock when changing
      action state)
      Signed-off-by: NVlad Buslov <vladbu@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f20a4d01
    • V
      net: sched: act_skbedit: remove dependency on rtnl lock · 6d7a8df6
      Vlad Buslov 提交于
      According to the new locking rule, we have to take tcf_lock for both
      ->init() and ->dump(), as RTNL will be removed.
      
      Use tcf lock to protect skbedit action struct private data from concurrent
      modification in init and dump. Use rcu swap operation to reassign params
      pointer under protection of tcf lock. (old params value is not used by
      init, so there is no need of standalone rcu dereference step)
      
      Remove rtnl lock assertion that is no longer required.
      Signed-off-by: NVlad Buslov <vladbu@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d7a8df6
    • J
      i40e(vf): remove i40e_ethtool_stats.h header file · 6ad96bdc
      Jacob Keller 提交于
      Essentially reverts commit 8fd75c58 ("i40e: move ethtool
      stats boiler plate code to i40e_ethtool_stats.h", 2018-08-30), and
      additionally moves the similar code in i40evf into i40evf_ethtool.c.
      
      The code was intially moved from i40e_ethtool.c into i40e_ethtool_stats.h
      as a way of better logically organizing the code. This has two problems.
      First, we can't have an inline function with variadic arguments on all
      platforms. Second, it gave the appearance that we had plans to share
      code between the i40e and i40evf drivers, due to having a near copy of
      the contents in the i40evf/i40e_ethtool_stats.h file.
      
      Patches which actually attempt to combine or share code between the i40e
      and i40evf drivers have not materialized, and are likely a ways off.
      
      Rather than fixing the one function which causes build issues, just move
      this code back into the i40e_ethtool.c and i40evf_ethtool.c files. Note
      that we also change these functions back from static inlines to just
      statics, since they're no longer in a header file.
      
      We can revisit this if/when work is done to actually attempt to share
      code between drivers. Alternatively, this stats code could be made more
      generic so that it can be shared across drivers as part of ethtool
      kernel work.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ad96bdc
  2. 08 9月, 2018 6 次提交
  3. 07 9月, 2018 5 次提交
    • Y
      bnxt_en: remove set but not used variable 'addr_type' · 38bb4ac9
      YueHaibing 提交于
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c: In function 'bnxt_tc_parse_flow':
      drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:186:6: warning:
       variable 'addr_type' set but not used [-Wunused-but-set-variable]
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38bb4ac9
    • Y
      openvswitch: Derive IP protocol number for IPv6 later frags · fa642f08
      Yi-Hung Wei 提交于
      Currently, OVS only parses the IP protocol number for the first
      IPv6 fragment, but sets the IP protocol number for the later fragments
      to be NEXTHDF_FRAGMENT.  This patch tries to derive the IP protocol
      number for the IPV6 later frags so that we can match that.
      Signed-off-by: NYi-Hung Wei <yihung.wei@gmail.com>
      Acked-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa642f08
    • Y
      liquidio CN23XX: Remove set but not used variable 'ring_flag' · ddc4d236
      YueHaibing 提交于
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c: In function 'cn23xx_setup_octeon_vf_device':
      drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:619:20: warning:
       variable 'ring_flag' set but not used [-Wunused-but-set-variable]
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ddc4d236
    • W
      liquidio: Add spoof checking on a VF MAC address · 48875222
      Weilin Chang 提交于
      1. Provide the API to set/unset the spoof checking feature.
      2. Add a function to periodically provide the count of found
         packets with spoof VF MAC address.
      3. Prevent VF MAC address changing while the spoofchk of the VF is
         on unless the changing MAC address is issued from PF.
      Signed-off-by: NWeilin Chang <weilin.chang@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48875222
    • D
      Merge tag 'mlx5e-updates-2018-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · ddc9cc01
      David S. Miller 提交于
      Saeed Mahameed says:
      
      ====================
      mlx5e-updates-2018-09-05
      
      This series provides updates to mlx5 ethernet driver.
      
      1) Starting with a four patches series to optimize flow counters updates,
      From Vlad Buslov:
      ==============================================
      
      By default mlx5 driver updates cached counters each second. Update function
      consumes noticeable amount of CPU resources. The goal of this patch series
      is to optimize update function.
      
      Investigation revealed following bottlenecks in fs counters
      implementation:
       1) Update code(scheduled each second) iterates over all counters twice.
       (first for finding and deleting counters that are marked for deletion,
       second iteration is for actually updating the counters)
       2) Counters are stored in rb tree. Linear iteration over all rb tree
       elements(rb_next in profiling data) consumed ~65% of time spent in
       update function.
      
      Following optimizations were implemented:
       1) Instead of just marking counters for deletion, store them in
       standalone list. This removes first iteration over whole counters tree.
       2) Store counters in sorted list to optimize traversing them and remove
       calls to rb_next.
      
      First implementation of these changes caused degradation of performance,
      instead of improving it. Investigation revealed that there first cache
      line of struct mlx5_fc is full and adding anything to it causes amount
      of cache misses to double. To mitigate that, following refactorings were
      implemented:
       - Change 'addlist' list type from double linked to single linked. This
       allowes to get free space for one additional pointer that is used to
       store deletion list(optimization 1)
       - Substitute rb tree with idr. Idr is non-intrusive data structure and
       doesn't require adding any new members to struct mlx5_fc. Use free
       space that became available for double linked sorted list that is used
       for traversing all counters. (optimization 2)
      
      Described changes reduced CPU time spent in mlx5_fc_stats_work from 70%
      to 44%. (global perf profile mode)
      ============================================
      
      The rest of the series are misc updates:
      
      2) From Kamal, Move mlx5e_priv_flags into en_ethtool.c, to avoid a
      compilation warning.
      
      3) From Roi Dayan, Move Q counters allocation and drop RQ to init_rx profile
      function to avoid allocating Q counters when not required.
      
      4) From Shay Agroskin, Replace PTP clock lock from RW lock to seq lock.
      Almost double the packet rate when timestamping is active on multiple TX
      queues.
      
      5) From: Natali Shechtman, set ECN for received packets using CQE indication.
      
      6) From: Alaa Hleihel, don't set CHECKSUM_COMPLETE on SCTP packets.
      CHECKSUM_COMPLETE is not applicable to SCTP protocol.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ddc9cc01
  4. 06 9月, 2018 24 次提交