1. 09 9月, 2020 24 次提交
    • R
      nfc: pn533/usb.c: fix spelling of "functions" · f5499c67
      Randy Dunlap 提交于
      Fix typo/spello of "functions".
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: linux-nfc@lists.01.org
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: netdev@vger.kernel.org
      Cc: Jiri Kosina <trivial@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f5499c67
    • W
      ipv6: add tos reflection in TCP reset and ack · e92dd77e
      Wei Wang 提交于
      Currently, ipv6 stack does not do any TOS reflection. To make the
      behavior consistent with v4 stack, this commit adds TOS reflection in
      tcp_v6_reqsk_send_ack() and tcp_v6_send_reset(). We clear the lower
      2-bit ECN value of the received TOS in compliance with RFC 3168 6.1.5
      robustness principles.
      Signed-off-by: NWei Wang <weiwan@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e92dd77e
    • D
      Merge tag 'rxrpc-next-20200908' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 56bbc22d
      David S. Miller 提交于
      David Howells says:
      
      ====================
      rxrpc: Allow more calls to same peer
      
      Here are some development patches for AF_RXRPC that allow more simultaneous
      calls to be made to the same peer with the same security parameters.  The
      current code allows a maximum of 4 simultaneous calls, which limits the afs
      filesystem to that many simultaneous threads.  This increases the limit to
      16.
      
      To make this work, the way client connections are limited has to be changed
      (incoming call/connection limits are unaffected) as the current code
      depends on queuing calls on a connection and then pushing the connection
      through a queue.  The limit is on the number of available connections.
      
      This is changed such that there's a limit[*] on the total number of calls
      systemwide across all namespaces, but the limit on the number of client
      connections is removed.
      
      Once a call is allowed to proceed, it finds a bundle of connections and
      tries to grab a call slot.  If there's a spare call slot, fine, otherwise
      it will wait.  If there's already a waiter, it will try to create another
      connection in the bundle, unless the limit of 4 is reached (4 calls per
      connection, giving 16).
      
      A number of things throttle someone trying to set up endless connections:
      
       - Calls that fail immediately have their conns deleted immediately,
      
       - Calls that don't fail immediately have to wait for a timeout,
      
       - Connections normally get automatically reaped if they haven't been used
         for 2m, but this is sped up to 2s if the number of connections rises
         over 900.  This number is tunable by sysctl.
      
      [*] Technically two limits - kernel sockets and userspace rxrpc sockets are
          accounted separately.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56bbc22d
    • C
      net: tc35815: switch from 'pci_' to 'dma_' API · cdd84a93
      Christophe JAILLET 提交于
      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 'tc35815_init_queues()' GFP_ATOMIC must be used
      because it can be called from 'tc35815_restart()' where some spinlock are
      taken.
      The call chain is:
        tc35815_restart
          --> tc35815_clear_queues
            --> tc35815_init_queues
      
      @@
      @@
      -    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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cdd84a93
    • C
      hippi: switch from 'pci_' to 'dma_' API · f33a7251
      Christophe JAILLET 提交于
      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 'rr_init_one()' GFP_KERNEL can be used because
      it is a probe function and no spinlock is taken in the between.
      
      When memory is allocated in 'rr_open()' GFP_KERNEL can be used because
      it is a '.ndo_open' function (see struct net_device_ops) and no spinlock is
      taken in the between.
      '.ndo_open' functions are synchronized using the rtnl_lock() semaphore.
      
      @@
      @@
      -    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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f33a7251
    • E
      sfc: coding style cleanups in mcdi_port_common.c · 161c4e88
      Edward Cree 提交于
      The code recently moved into this file contained a number of coding style
       issues, about which checkpatch and xmastree complained.  Fix them.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      161c4e88
    • N
      net: bridge: mcast: fix unused br var when lockdep isn't defined · 071445c6
      Nikolay Aleksandrov 提交于
      Stephen reported the following warning:
       net/bridge/br_multicast.c: In function 'br_multicast_find_port':
       net/bridge/br_multicast.c:1818:21: warning: unused variable 'br' [-Wunused-variable]
        1818 |  struct net_bridge *br = mp->br;
             |                     ^~
      
      It happens due to bridge's mlock_dereference() when lockdep isn't defined.
      Silence the warning by annotating the variable as __maybe_unused.
      
      Fixes: 0436862e ("net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report")
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      071445c6
    • W
      netlabel: Fix some kernel-doc warnings · 8c70b268
      Wang Hai 提交于
      Fixes the following W=1 kernel build warning(s):
      
      net/netlabel/netlabel_calipso.c:438: warning: Excess function parameter 'audit_secid' description in 'calipso_doi_remove'
      net/netlabel/netlabel_calipso.c:605: warning: Excess function parameter 'reg' description in 'calipso_req_delattr'
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWang Hai <wanghai38@huawei.com>
      Acked-by: NPaul Moore <paul@paul-moore.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c70b268
    • W
      net: wimax: i2400m: fix 'msg_skb' kernel-doc warning in i2400m_msg_to_dev() · 4ff62d82
      Wang Hai 提交于
      Fixes the following W=1 kernel build warning(s):
      
      drivers/net/wimax/i2400m/control.c:709: warning: Excess function parameter 'msg_skb' description in 'i2400m_msg_to_dev'
      
      This parameter is not in use. Remove it.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWang Hai <wanghai38@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ff62d82
    • W
      bnx2x: Fix some kernel-doc warnings · 525090b5
      Wang Hai 提交于
      Fixes the following W=1 kernel build warning(s):
      
      drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:4238: warning: Excess function parameter 'netdev' description in 'bnx2x_setup_tc'
      drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:4238: warning: Excess function parameter 'tc' description in 'bnx2x_setup_tc'
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWang Hai <wanghai38@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      525090b5
    • W
      cipso: fix 'audit_secid' kernel-doc warning in cipso_ipv4.c · 7edce636
      Wang Hai 提交于
      Fixes the following W=1 kernel build warning(s):
      
      net/ipv4/cipso_ipv4.c:510: warning: Excess function parameter 'audit_secid' description in 'cipso_v4_doi_remove'
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWang Hai <wanghai38@huawei.com>
      Acked-by: NPaul Moore <paul@paul-moore.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7edce636
    • W
      net: smsc911x: Remove unused variables · 652b4987
      Wei Xu 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/ethernet/smsc/smsc911x.c: In function ‘smsc911x_rx_fastforward’:
       drivers/net/ethernet/smsc/smsc911x.c:1199:16: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable]
      
       drivers/net/ethernet/smsc/smsc911x.c: In function ‘smsc911x_eeprom_write_location’:
       drivers/net/ethernet/smsc/smsc911x.c:2058:6: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable]
      Signed-off-by: NWei Xu <xuwei5@hisilicon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      652b4987
    • D
      Merge branch 'net-hns3-misc-updates' · 360ea6fc
      David S. Miller 提交于
      Huazhong Tan says:
      
      ====================
      net: hns3: misc updates
      
      There are some misc updates for the HNS3 ethernet driver.
      
      ====================
      
      Reviewed-by: Jakub Kicinski <kuba@kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      360ea6fc
    • G
      net: hns3: remove some unused function hns3_update_promisc_mode() · 2c7bcc1d
      Guojia Liao 提交于
      hns3_update_promisc_mode is defined, but not be used, so remove it.
      Signed-off-by: NGuojia Liao <liaoguojia@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c7bcc1d
    • H
      net: hns3: remove some unused macros related to queue · 3d93fda0
      Huazhong Tan 提交于
      There are several macros related queue defined, but never
      used, so remove them.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d93fda0
    • H
      net: hns3: remove unused field 'tc_num_last_time' in struct hclge_dev · 50626bcd
      Huazhong Tan 提交于
      'tc_num_last_time' is defined, but never used, so remove it.
      Reported-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      50626bcd
    • H
      net: hns3: remove unused field 'io_base' in struct hns3_enet_ring · b7ae986f
      Huazhong Tan 提交于
      'io_base' has been defined and initialized, but never used,
      so remove it.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7ae986f
    • G
      net: hns3: fix a typo in struct hclge_mac · a3a0ff01
      Guangbin Huang 提交于
      The member link of struct hclge_mac stores the link status of
      MAC and PHY if PHY exists, but its annotation uses word "exit",
      so fix it.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3a0ff01
    • G
      net: hns3: skip periodic service task if reset failed · e6394363
      Guangbin Huang 提交于
      When reset fails, if there are some pending jobs for the periodic
      service task, it does not do anything except print error each
      time the task is scheduled. So skip the periodic service task if
      reset failed.
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6394363
    • H
      net: hns3: narrow two local variable range in hclgevf_reset_prepare_wait() · d41884ee
      Huazhong Tan 提交于
      Since variable send_msg and ret only used in if branch, so move
      their definition into the if branch.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d41884ee
    • T
      net: sched: skip an unnecessay check · c1f1f16c
      Tom Rix 提交于
      Reviewing the error handling in tcf_action_init_1()
      most of the early handling uses
      
      err_out:
      	if (cookie) {
      		kfree(cookie->data);
      		kfree(cookie);
      	}
      
      before cookie could ever be set.
      
      So skip the unnecessay check.
      Signed-off-by: NTom Rix <trix@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1f1f16c
    • D
      rxrpc: Allow multiple client connections to the same peer · 288827d5
      David Howells 提交于
      Allow the number of parallel connections to a machine to be expanded from a
      single connection to a maximum of four.  This allows up to 16 calls to be
      in progress at the same time to any particular peer instead of 4.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      288827d5
    • D
      rxrpc: Rewrite the client connection manager · 245500d8
      David Howells 提交于
      Rewrite the rxrpc client connection manager so that it can support multiple
      connections for a given security key to a peer.  The following changes are
      made:
      
       (1) For each open socket, the code currently maintains an rbtree with the
           connections placed into it, keyed by communications parameters.  This
           is tricky to maintain as connections can be culled from the tree or
           replaced within it.  Connections can require replacement for a number
           of reasons, e.g. their IDs span too great a range for the IDR data
           type to represent efficiently, the call ID numbers on that conn would
           overflow or the conn got aborted.
      
           This is changed so that there's now a connection bundle object placed
           in the tree, keyed on the same parameters.  The bundle, however, does
           not need to be replaced.
      
       (2) An rxrpc_bundle object can now manage the available channels for a set
           of parallel connections.  The lock that manages this is moved there
           from the rxrpc_connection struct (channel_lock).
      
       (3) There'a a dummy bundle for all incoming connections to share so that
           they have a channel_lock too.  It might be better to give each
           incoming connection its own bundle.  This bundle is not needed to
           manage which channels incoming calls are made on because that's the
           solely at whim of the client.
      
       (4) The restrictions on how many client connections are around are
           removed.  Instead, a previous patch limits the number of client calls
           that can be allocated.  Ordinarily, client connections are reaped
           after 2 minutes on the idle queue, but when more than a certain number
           of connections are in existence, the reaper starts reaping them after
           2s of idleness instead to get the numbers back down.
      
           It could also be made such that new call allocations are forced to
           wait until the number of outstanding connections subsides.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      245500d8
    • D
      rxrpc: Impose a maximum number of client calls · b7a7d674
      David Howells 提交于
      Impose a maximum on the number of client rxrpc calls that are allowed
      simultaneously.  This will be in lieu of a maximum number of client
      connections as this is easier to administed as, unlike connections, calls
      aren't reusable (to be changed in a subsequent patch)..
      
      This doesn't affect the limits on service calls and connections.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      b7a7d674
  2. 08 9月, 2020 16 次提交