1. Jul 20, 2020
  2. Jul 18, 2020
    • Armin Wolf's avatar
      ne2k-pci: Use netif_msg_init to initialize msg_enable bits · a050d82f
      Armin Wolf authored
      
      
      Use netif_msg_enable() to process param settings.
      
      Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a050d82f
    • David S. Miller's avatar
      Merge branch 'net-atlantic-add-support-for-FW-4-x' · 1143fede
      David S. Miller authored
      
      
      Mark Starovoytov says:
      
      ====================
      net: atlantic: add support for FW 4.x
      
      This patch set adds support for FW 4.x, which is about to get into the
      production for some products.
      4.x is mostly compatible with 3.x, save for soft reset, which requires
      the acquisition of 2 additional semaphores.
      Other differences (e.g. absence of PTP support) are handled via
      capabilities.
      
      Note: 4.x targets specific products only. 3.x is still the main firmware
      branch, which should be used by most users (at least for now).
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1143fede
    • Dmitry Bogdanov's avatar
      net: atlantic: add support for FW 4.x · 0044b1e1
      Dmitry Bogdanov authored
      
      
      This patch adds support for FW 4.x, which is about to get into the
      production for some products.
      4.x is mostly compatible with 3.x, save for soft reset, which requires
      the acquisition of 2 additional semaphores.
      Other differences (e.g. absence of PTP support) are handled via
      capabilities.
      
      Note: 4.x targets specific products only. 3.x is still the main firmware
      branch, which should be used by most users (at least for now).
      
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarMark Starovoytov <mstarovoitov@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0044b1e1
    • Mark Starovoytov's avatar
      net: atlantic: align return value of ver_match function with function name · b567edbf
      Mark Starovoytov authored
      
      
      This patch aligns the return value of hw_atl_utils_ver_match function with
      its name.
      Change the return type to bool, because it's better aligned with the actual
      usage. Return true when the version matches, false otherwise.
      
      Signed-off-by: default avatarMark Starovoytov <mstarovoitov@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b567edbf
    • Mark Einon's avatar
      net: ethernet: et131x: Remove redundant register read · 11f3c1f5
      Mark Einon authored
      
      
      Following the removal of an unused variable assignment (remove
      unused variable 'pm_csr') the associated register read can also go,
      as the read also occurs in the subsequent et1310_in_phy_coma()
      call.
      
      Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11f3c1f5
    • Zhang Changzhong's avatar
      net: ethernet: et131x: Remove unused variable 'pm_csr' · eacc43d2
      Zhang Changzhong authored
      Gcc report warning as follows:
      
      drivers/net/ethernet/agere/et131x.c:953:6: warning:
       variable 'pm_csr' set but not used [-Wunused-but-set-variable]
        953 |  u32 pm_csr;
            |      ^~~~~~
      drivers/net/ethernet/agere/et131x.c:1002:6:warning:
       variable 'pm_csr' set but not used [-Wunused-but-set-variable]
       1002 |  u32 pm_csr;
            |      ^~~~~~
      drivers/net/ethernet/agere/et131x.c:3446:8: warning:
       variable 'pm_csr' set but not used [-Wunused-but-set-variable]
       3446 |    u32 pm_csr;
            |        ^~~~~~
      
      After commit 38df6492
      
       ("et131x: Add PCIe gigabit ethernet driver
      et131x to drivers/net"), 'pm_csr' is never used in these functions,
      so removing it to avoid build warning.
      
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Acked-by: default avatarMark Einon <mark.einon@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eacc43d2
    • Zhang Changzhong's avatar
      net: bna: Remove unused variable 't' · 5686b109
      Zhang Changzhong authored
      Gcc report warning as follows:
      
      drivers/net/ethernet/brocade/bna/bfa_ioc.c:1538:6: warning:
       variable 't' set but not used [-Wunused-but-set-variable]
       1538 |  u32 t;
            |      ^
      
      After commit c107ba17
      
       ("bna: Firmware Patch Simplification"),
      't' is never used, so removing it to avoid build warning.
      
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5686b109
    • Jakub Kicinski's avatar
      net: bnxt: don't complain if TC flower can't be supported · 18c7015c
      Jakub Kicinski authored
      
      
      The fact that NETIF_F_HW_TC is not set should be a sufficient
      indication to the user that TC offloads are not supported.
      No need to bother users of older firmware versions with
      pointless warnings on every boot.
      
      Also, since the support is optional, bnxt_init_tc() should not
      return an error in case FW is old, similarly to how error
      is not returned when CONFIG_BNXT_FLOWER_OFFLOAD is not set.
      
      With that we can add an error message to the caller, to warn
      about actual unexpected failures.
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18c7015c
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2020-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · d44a919a
      David S. Miller authored
      
      
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2020-07-16
      
      Fixes:
      1) Fix build break when CONFIG_XPS is not set
      2) Fix missing switch_id for representors
      
      Updates:
      1) IPsec XFRM RX offloads from Raed and Huy.
        - Added IPSec RX steering flow tables to NIC RX
        - Refactoring of the existing FPGA IPSec, to add support
          for ConnectX IPsec.
        - RX data path handling for IPSec traffic
        - Synchronize offloading device ESN with xfrm received SN
      
      2) Parav allows E-Switch to siwtch to switchdev mode directly without
         the need to go through legacy mode first.
      
      3) From Tariq, Misc updates including:
         3.1) indirect calls for RX and XDP handlers
         3.2) Make MLX5_EN_TLS non-prompt as it should always be enabled when
              TLS and MLX5_EN are selected.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d44a919a
    • Christophe JAILLET's avatar
      net: alteon: Avoid some useless memset · 721dab2b
      Christophe JAILLET authored
      Avoid a memset after a call to 'dma_alloc_coherent()'.
      This is useless since
      commit 518a2f19
      
       ("dma-mapping: zero memory returned from dma_alloc_*")
      
      Replace a kmalloc+memset with a corresponding kzalloc.
      
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      721dab2b
    • Christophe JAILLET's avatar
      net: alteon: switch from 'pci_' to 'dma_' API · f4079e5d
      Christophe JAILLET authored
      
      
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below and has been
      hand modified to replace GFP_ with a correct flag.
      It has been compile tested.
      
      When memory is allocated in 'ace_allocate_descriptors()' and
      'ace_init()' GFP_KERNEL can be used because both functions are called from
      the probe function and no lock is acquired.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f4079e5d
    • Christophe JAILLET's avatar
      net: sungem: switch from 'pci_' to 'dma_' API · 8d4f62ca
      Christophe JAILLET authored
      
      
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below and has been
      hand modified to replace GFP_ with a correct flag.
      It has been compile tested.
      
      When memory is allocated in 'gem_init_one()', GFP_KERNEL can be used
      because it is a probe function and no lock is acquired.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d4f62ca
    • Suraj Upadhyay's avatar
      net: decnet: af_decnet: Simplify goto loop. · e0c3f4c4
      Suraj Upadhyay authored
      
      
      Replace goto loop with while loop.
      
      Signed-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0c3f4c4
    • David S. Miller's avatar
      Merge branch 'tcp-dsack-multi-seg' · c4fefd5a
      David S. Miller authored
      
      
      Priyaranjan Jha says:
      
      ====================
      tcp: improve handling of DSACK covering multiple segments
      
      Currently, while processing DSACK, we assume DSACK covers only one
      segment. This leads to significant underestimation of no. of duplicate
      segments with LRO/GRO. Also, the existing SNMP counters, TCPDSACKRecv
      and TCPDSACKOfoRecv, make similar assumption for DSACK, which makes them
      unusable for estimating spurious retransmit rates.
      
      This patch series fixes the segment accounting with DSACK, by estimating
      number of duplicate segments based on: (DSACKed sequence range) / MSS.
      It also introduces a new SNMP counter, TCPDSACKRecvSegs, which tracks
      the estimated number of duplicate segments.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c4fefd5a
    • Priyaranjan Jha's avatar
      tcp: add SNMP counter for no. of duplicate segments reported by DSACK · e3a5a1e8
      Priyaranjan Jha authored
      
      
      There are two existing SNMP counters, TCPDSACKRecv and TCPDSACKOfoRecv,
      which are incremented depending on whether the DSACKed range is below
      the cumulative ACK sequence number or not. Unfortunately, these both
      implicitly assume each DSACK covers only one segment. This makes these
      counters unusable for estimating spurious retransmit rates,
      or real/non-spurious loss rate.
      
      This patch introduces a new SNMP counter, TCPDSACKRecvSegs, which tracks
      the estimated number of duplicate segments based on:
      (DSACKed sequence range) / MSS. This counter is usable for estimating
      spurious retransmit rates, or real/non-spurious loss rate.
      
      Signed-off-by: default avatarPriyaranjan Jha <priyarjha@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3a5a1e8
    • Priyaranjan Jha's avatar
      tcp: fix segment accounting when DSACK range covers multiple segments · a71d77e6
      Priyaranjan Jha authored
      
      
      Currently, while processing DSACK, we assume DSACK covers only one
      segment. This leads to significant underestimation of DSACKs with
      LRO/GRO. This patch fixes segment accounting with DSACK by estimating
      segment count from DSACK sequence range / MSS.
      
      Signed-off-by: default avatarPriyaranjan Jha <priyarjha@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarYousuk Seung <ysseung@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a71d77e6