1. 10 9月, 2020 3 次提交
    • P
      net: dsa: microchip: Improve phy mode message · 805a7e6f
      Paul Barker 提交于
      Always print the selected phy mode for the CPU port when using the
      ksz9477 driver. If the phy mode was changed, also print the previous
      mode to aid in debugging.
      
      To make the message more clear, prefix it with the port number which it
      applies to and improve the language a little.
      Signed-off-by: NPaul Barker <pbarker@konsulko.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      805a7e6f
    • P
      net: dsa: microchip: Make switch detection more informative · 3c85f775
      Paul Barker 提交于
      To make switch detection more informative print the result of the
      ksz9477/ksz9893 compatibility check. With debug output enabled also
      print the contents of the Chip ID registers as a 40-bit hex string.
      
      As this detection is the first communication with the switch performed
      by the driver, making it easy to see any errors here will help identify
      issues with SPI data corruption or reset sequencing.
      Signed-off-by: NPaul Barker <pbarker@konsulko.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c85f775
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · d85427e3
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for net-next:
      
      1) Rewrite inner header IPv6 in ICMPv6 messages in ip6t_NPT,
         from Michael Zhou.
      
      2) do_ip_vs_set_ctl() dereferences uninitialized value,
         from Peilin Ye.
      
      3) Support for userdata in tables, from Jose M. Guisado.
      
      4) Do not increment ct error and invalid stats at the same time,
         from Florian Westphal.
      
      5) Remove ct ignore stats, also from Florian.
      
      6) Add ct stats for clash resolution, from Florian Westphal.
      
      7) Bump reference counter bump on ct clash resolution only,
         this is safe because bucket lock is held, again from Florian.
      
      8) Use ip_is_fragment() in xt_HMARK, from YueHaibing.
      
      9) Add wildcard support for nft_socket, from Balazs Scheidler.
      
      10) Remove superfluous IPVS dependency on iptables, from
          Yaroslav Bolyukin.
      
      11) Remove unused definition in ebt_stp, from Wang Hai.
      
      12) Replace CONFIG_NFT_CHAIN_NAT_{IPV4,IPV6} by CONFIG_NFT_NAT
          in selftests/net, from Fabian Frederick.
      
      13) Add userdata support for nft_object, from Jose M. Guisado.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d85427e3
  2. 09 9月, 2020 25 次提交
    • R
      net: ethernet/neterion/vxge: fix spelling of "functionality" · ac99a822
      Randy Dunlap 提交于
      Fix typo/spello of "functionality".
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: Jon Mason <jdmason@kudzu.us>
      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>
      ac99a822
    • 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
  3. 08 9月, 2020 12 次提交
    • J
      netfilter: nf_tables: add userdata support for nft_object · b131c964
      Jose M. Guisado Gomez 提交于
      Enables storing userdata for nft_object. Initially this will store an
      optional comment but can be extended in the future as needed.
      
      Adds new attribute NFTA_OBJ_USERDATA to nft_object.
      Signed-off-by: NJose M. Guisado Gomez <guigom@riseup.net>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      b131c964
    • F
      selftests/net: replace obsolete NFT_CHAIN configuration · 0c5edd77
      Fabian Frederick 提交于
      Replace old parameters with global NFT_NAT from commit db8ab388
      ("netfilter: nf_tables: merge ipv4 and ipv6 nat chain types")
      Signed-off-by: NFabian Frederick <fabf@skynet.be>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      0c5edd77
    • W
      netfilter: ebt_stp: Remove unused macro BPDU_TYPE_TCN · 36c3be8a
      Wang Hai 提交于
      BPDU_TYPE_TCN is never used after it was introduced.
      So better to remove it.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWang Hai <wanghai38@huawei.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      36c3be8a
    • V
      net: dsa: don't print non-fatal MTU error if not supported · 4349abdb
      Vladimir Oltean 提交于
      Commit 72579e14 ("net: dsa: don't fail to probe if we couldn't set
      the MTU") changed, for some reason, the "err && err != -EOPNOTSUPP"
      check into a simple "err". This causes the MTU warning to be printed
      even for drivers that don't have the MTU operations implemented.
      Fix that.
      Signed-off-by: NVladimir Oltean <olteanv@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      4349abdb
    • V
      net: dsa: change PHY error message again · c9ebf126
      Vladimir Oltean 提交于
      slave_dev->name is only populated at this stage if it was specified
      through a label in the device tree. However that is not mandatory.
      When it isn't, the error message looks like this:
      
      [    5.037057] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d
      [    5.044672] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d
      [    5.052275] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d
      [    5.059877] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d
      
      which is especially confusing since the error gets printed on behalf of
      the DSA master (fsl_enetc in this case).
      
      Printing an error message that contains a valid reference to the DSA
      port's name is difficult at this point in the initialization stage, so
      at least we should print some info that is more reliable, even if less
      user-friendly. That may be the driver name and the hardware port index.
      
      After this change, the error is printed as:
      
      [    6.051587] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 0
      [    6.061192] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 1
      [    6.070765] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 2
      [    6.080324] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 3
      Signed-off-by: NVladimir Oltean <olteanv@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      c9ebf126
    • J
      net: tighten the definition of interface statistics · 0db0c34c
      Jakub Kicinski 提交于
      This patch is born out of an investigation into which IEEE statistics
      correspond to which struct rtnl_link_stats64 members. Turns out that
      there seems to be reasonable consensus on the matter, among many drivers.
      To save others the time (and it took more time than I'm comfortable
      admitting) I'm adding comments referring to IEEE attributes to
      struct rtnl_link_stats64.
      
      Up until now we had two forms of documentation for stats - in
      Documentation/ABI/testing/sysfs-class-net-statistics and the comments
      on struct rtnl_link_stats64 itself. While the former is very cautious
      in defining the expected behavior, the latter feel quite dated and
      may not be easy to understand for modern day driver author
      (e.g. rx_over_errors). At the same time modern systems are far more
      complex and once obvious definitions lost their clarity. For example
      - does rx_packet count at the MAC layer (aFramesReceivedOK)?
      packets processed correctly by hardware? received by the driver?
      or maybe received by the stack?
      
      I tried to clarify the expectations, further clarifications from
      others are very welcome.
      
      The part hardest to untangle is rx_over_errors vs rx_fifo_errors
      vs rx_missed_errors. After much deliberation I concluded that for
      modern HW only two of the counters will make sense. The distinction
      between internal FIFO overflow and packets dropped due to back-pressure
      from the host is likely too implementation (driver and device) specific
      to expose in the standard stats.
      
      Now - which two of those counters we select to use is anyone's pick:
      
      sysfs documentation suggests rx_over_errors counts packets which
      did not fit into buffers due to MTU being too small, which I reused.
      There don't seem to be many modern drivers using it (well, CAN drivers
      seem to love this statistic).
      
      Of the remaining two I picked rx_missed_errors to report device drops.
      bnxt reports it and it's folded into "drop"s in procfs (while
      rx_fifo_errors is an error, and modern devices usually receive the frame
      OK, they just can't admit it into the pipeline).
      
      Of the drivers I looked at only AMD Lance-like and NS8390-like use all
      three of these counters. rx_missed_errors counts missed frames,
      rx_over_errors counts overflow events, and rx_fifo_errors counts frames
      which were truncated because they didn't fit into buffers. This suggests
      that rx_fifo_errors may be the correct stat for truncated packets, but
      I'd think a FIFO stat counting truncated packets would be very confusing
      to a modern reader.
      
      v2:
       - add driver developer notes about ethtool stat count and reset
       - replace Ethernet with IEEE 802.3 to better indicate source of attrs
       - mention byte counters don't count FCS
       - clarify RX counter is from device to host
       - drop "sightly" from sysfs paragraph
       - add examples of ethtool stats
       - s/incoming/received/ s/incoming/transmitted/
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      0db0c34c
    • W
      rxrpc: Remove unused macro rxrpc_min_rtt_wlen · 81365af1
      Wang Hai 提交于
      rxrpc_min_rtt_wlen is never used after it was introduced.
      So better to remove it.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWang Hai <wanghai38@huawei.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      81365af1
    • J
      Merge branch 'sfc-ethtool-for-EF100-and-related-improvements' · 14e9e262
      Jakub Kicinski 提交于
      Edward Cree says:
      
      ====================
      sfc: ethtool for EF100 and related improvements
      
      This series adds the ethtool support to the EF100 driver that was held
       back from the original submission as the lack of phy_ops caused issues.
      Patch #2, removing the phy_op indirection, deals with this.  There are a
       lot of checkpatch warnings / xmastree violations but they're all in
       pure code movement so I've left the code as it is.
      While patch #1 is technically a fix and possibly could go to 'net', I've
       put it in this series since it only becomes triggerable with the added
       'ethtool --reset' support.
      ====================
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      14e9e262
    • E
      sfc: simplify DMA mask setting · 08bdbcae
      Edward Cree 提交于
      Christoph says[1] that dma_set_mask_and_coherent() is smart enough to
       truncate the mask itself if it's too long.  So we can get rid of our
       "lop off one bit and retry" loop in efx_init_io().
      
      [1]: https://www.spinics.net/lists/netdev/msg677266.htmlSigned-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      08bdbcae
    • E
      sfc: remove EFX_DRIVER_VERSION · 60bd2a2d
      Edward Cree 提交于
      Per-module versions for in-tree drivers are deprecated.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      60bd2a2d
    • E
      sfc: handle limited FEC support · 400d64cf
      Edward Cree 提交于
      If the reported PHY capabilities do not include a given FEC mode, don't
       attempt to select that FEC mode anyway.  If the user tries to set a mode
       through ethtool that is not supported, return an error.
      The _REQUESTED bits don't appear in the supported caps, but are implied
       by the corresponding FEC bits.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      400d64cf
    • E
      sfc: add ethtool ops and miscellaneous ndos to EF100 · 4404c089
      Edward Cree 提交于
      Mostly just calls to existing common functions.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      4404c089