1. 20 Jul, 2020 19 commits
  2. 18 Jul, 2020 8 commits
  3. 17 Jul, 2020 13 commits
    • 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
    • Christophe JAILLET's avatar
      net: sun: cassini: switch from 'pci_' to 'dma_' API · dcc82bb0
      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 'cas_tx_tiny_alloc()', GFP_KERNEL can be used
      because a few lines below in its only caller, 'cas_alloc_rxds()', is also
      called. This function makes an explicit use of GFP_KERNEL.
      
      When memory is allocated in 'cas_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>
      dcc82bb0
    • Davide Caratti's avatar
      mptcp: silence warning in subflow_data_ready() · 8c728940
      Davide Caratti authored
      since commit d47a7215 ("mptcp: fix race in subflow_data_ready()"), it
      is possible to observe a regression in MP_JOIN kselftests. For sockets in
      TCP_CLOSE state, it's not sufficient to just wake up the main socket: we
      also need to ensure that received data are made available to the reader.
      Silence the WARN_ON_ONCE() in these cases: it preserves the syzkaller fix
      and restores kselftests	when they are ran as follows:
      
        # while true; do
        > make KBUILD_OUTPUT=/tmp/kselftest TARGETS=net/mptcp kselftest
        > done
      Reported-by: default avatarFlorian Westphal <fw@strlen.de>
      Fixes: d47a7215 ("mptcp: fix race in subflow_data_ready()")
      Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/47Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c728940
    • David S. Miller's avatar
      Merge branch 'usbnet-multicast-filter-support-for-cdc-ncm-devices' · 79814d81
      David S. Miller authored
      Bjørn Mork says:
      
      ====================
      usbnet: multicast filter support for cdc ncm devices
      
      This revives a 2 year old patch set from Miguel Rodríguez
      Pérez, which appears to have been lost somewhere along the
      way.  I've based it on the last version I found (v4), and
      added one patch which I believe must have been missing in
      the original.
      
      I kept Oliver's ack on one of the patches, since both the patch and
      the motivation still is the same.  Hope this is OK..
      
      Thanks to the anonymous user <wxcafe@wxcafe.net> for bringing up this
      problem in https://bugs.debian.org/965074
      
      This is only build and load tested by me.  I don't have any device
      where I can test the actual functionality.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79814d81
    • Miguel Rodríguez Pérez's avatar
      net: cdc_ncm: hook into set_rx_mode to admit multicast traffic · e10dcb1b
      Miguel Rodríguez Pérez authored
      We set set_rx_mode to usbnet_cdc_update_filter provided
      by cdc_ether that simply admits all multicast traffic
      if there is more than one multicast filter configured.
      Signed-off-by: default avatarMiguel Rodríguez Pérez <miguel@det.uvigo.gal>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e10dcb1b
    • Miguel Rodríguez Pérez's avatar
      net: cdc_ncm: add .ndo_set_rx_mode to cdc_ncm_netdev_ops · 37a2ebdd
      Miguel Rodríguez Pérez authored
      The cdc_ncm driver overrides the net_device_ops structure used by usbnet
      to be able to hook into .ndo_change_mtu. However, the structure was
      missing the .ndo_set_rx_mode field, preventing the driver from
      hooking into usbnet's set_rx_mode. This patch adds the missing callback to
      usbnet_set_rx_mode in net_device_ops.
      Signed-off-by: default avatarMiguel Rodríguez Pérez <miguel@det.uvigo.gal>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37a2ebdd