1. 24 Jan, 2022 2 commits
  2. 22 Jan, 2022 3 commits
  3. 21 Jan, 2022 21 commits
  4. 20 Jan, 2022 14 commits
    • Joe Damato's avatar
      i40e: fix unsigned stat widths · 3b8428b8
      Joe Damato authored
      Change i40e_update_vsi_stats and struct i40e_vsi to use u64 fields to match
      the width of the stats counters in struct i40e_rx_queue_stats.
      
      Update debugfs code to use the correct format specifier for u64.
      
      Fixes: 41c445ff ("i40e: main driver core")
      Signed-off-by: default avatarJoe Damato <jdamato@fastly.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Tested-by: default avatarGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      3b8428b8
    • Karen Sornek's avatar
      i40e: Fix for failed to init adminq while VF reset · 0f344c81
      Karen Sornek authored
      Fix for failed to init adminq: -53 while VF is resetting via MAC
      address changing procedure.
      Added sync module to avoid reading deadbeef value in reinit adminq
      during software reset.
      Without this patch it is possible to trigger VF reset procedure
      during reinit adminq. This resulted in an incorrect reading of
      value from the AQP registers and generated the -53 error.
      
      Fixes: 5c3c48ac ("i40e: implement virtual device interface")
      Signed-off-by: default avatarGrzegorz Szczurek <grzegorzx.szczurek@intel.com>
      Signed-off-by: default avatarKaren Sornek <karen.sornek@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      0f344c81
    • Sylwester Dziedziuch's avatar
      i40e: Fix queues reservation for XDP · 92947844
      Sylwester Dziedziuch authored
      When XDP was configured on a system with large number of CPUs
      and X722 NIC there was a call trace with NULL pointer dereference.
      
      i40e 0000:87:00.0: failed to get tracking for 256 queues for VSI 0 err -12
      i40e 0000:87:00.0: setup of MAIN VSI failed
      
      BUG: kernel NULL pointer dereference, address: 0000000000000000
      RIP: 0010:i40e_xdp+0xea/0x1b0 [i40e]
      Call Trace:
      ? i40e_reconfig_rss_queues+0x130/0x130 [i40e]
      dev_xdp_install+0x61/0xe0
      dev_xdp_attach+0x18a/0x4c0
      dev_change_xdp_fd+0x1e6/0x220
      do_setlink+0x616/0x1030
      ? ahci_port_stop+0x80/0x80
      ? ata_qc_issue+0x107/0x1e0
      ? lock_timer_base+0x61/0x80
      ? __mod_timer+0x202/0x380
      rtnl_setlink+0xe5/0x170
      ? bpf_lsm_binder_transaction+0x10/0x10
      ? security_capable+0x36/0x50
      rtnetlink_rcv_msg+0x121/0x350
      ? rtnl_calcit.isra.0+0x100/0x100
      netlink_rcv_skb+0x50/0xf0
      netlink_unicast+0x1d3/0x2a0
      netlink_sendmsg+0x22a/0x440
      sock_sendmsg+0x5e/0x60
      __sys_sendto+0xf0/0x160
      ? __sys_getsockname+0x7e/0xc0
      ? _copy_from_user+0x3c/0x80
      ? __sys_setsockopt+0xc8/0x1a0
      __x64_sys_sendto+0x20/0x30
      do_syscall_64+0x33/0x40
      entry_SYSCALL_64_after_hwframe+0x44/0xae
      RIP: 0033:0x7f83fa7a39e0
      
      This was caused by PF queue pile fragmentation due to
      flow director VSI queue being placed right after main VSI.
      Because of this main VSI was not able to resize its
      queue allocation for XDP resulting in no queues allocated
      for main VSI when XDP was turned on.
      
      Fix this by always allocating last queue in PF queue pile
      for a flow director VSI.
      
      Fixes: 41c445ff ("i40e: main driver core")
      Fixes: 74608d17 ("i40e: add support for XDP_TX action")
      Signed-off-by: default avatarSylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
      Signed-off-by: default avatarMateusz Palczewski <mateusz.palczewski@intel.com>
      Reviewed-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Tested-by: default avatarKiran Bhandare <kiranx.bhandare@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      92947844
    • Jedrzej Jagielski's avatar
      i40e: Fix issue when maximum queues is exceeded · d701658a
      Jedrzej Jagielski authored
      Before this patch VF interface vanished when
      maximum queue number was exceeded. Driver tried
      to add next queues even if there was not enough
      space. PF sent incorrect number of queues to
      the VF when there were not enough of them.
      
      Add an additional condition introduced to check
      available space in 'qp_pile' before proceeding.
      This condition makes it impossible to add queues
      if they number is greater than the number resulting
      from available space.
      Also add the search for free space in PF queue
      pair piles.
      
      Without this patch VF interfaces are not seen
      when available space for queues has been
      exceeded and following logs appears permanently
      in dmesg:
      "Unable to get VF config (-32)".
      "VF 62 failed opcode 3, retval: -5"
      "Unable to get VF config due to PF error condition, not retrying"
      
      Fixes: 7daa6bf3 ("i40e: driver core headers")
      Fixes: 41c445ff ("i40e: main driver core")
      Signed-off-by: default avatarJaroslaw Gawin <jaroslawx.gawin@intel.com>
      Signed-off-by: default avatarSlawomir Laba <slawomirx.laba@intel.com>
      Signed-off-by: default avatarJedrzej Jagielski <jedrzej.jagielski@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      d701658a
    • Jedrzej Jagielski's avatar
      i40e: Increase delay to 1 s after global EMP reset · 9b13bd53
      Jedrzej Jagielski authored
      Recently simplified i40e_rebuild causes that FW sometimes
      is not ready after NVM update, the ping does not return.
      
      Increase the delay in case of EMP reset.
      Old delay of 300 ms was introduced for specific cards for 710 series.
      Now it works for all the cards and delay was increased.
      
      Fixes: 1fa51a65 ("i40e: Add delay after EMP reset for firmware to recover")
      Signed-off-by: default avatarArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
      Signed-off-by: default avatarJedrzej Jagielski <jedrzej.jagielski@intel.com>
      Tested-by: default avatarGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      9b13bd53
    • David S. Miller's avatar
      Merge branch 'stmmac-fixes' · 57afdc0a
      David S. Miller authored
      Yuji Ishikawa says:
      
      ====================
      net: stmmac: dwmac-visconti: Fix bit definitions and clock configuration for RMII mode
      
      This series is a fix for RMII/MII operation mode of the dwmac-visconti driver.
      It is composed of two parts:
      
      * 1/2: fix constant definitions for cleared bits in ETHER_CLK_SEL register
      * 2/2: fix configuration of ETHER_CLK_SEL register for running in RMII operation mode.
      
        net: stmmac: dwmac-visconti: Fix bit definitions for ETHER_CLK_SEL
          v1 -> v2:
            - added Fixes tag to commit message
      
        net: stmmac: dwmac-visconti: Fix clock configuration for RMII mode
          v1 -> v2:
            - added Fixes tag to commit message
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      57afdc0a
    • Yuji Ishikawa's avatar
      net: stmmac: dwmac-visconti: Fix clock configuration for RMII mode · 0959bc4b
      Yuji Ishikawa authored
      Bit pattern of the ETHER_CLOCK_SEL register for RMII/MII mode should be fixed.
      Also, some control bits should be modified with a specific sequence.
      
      Fixes: b38dd98f ("net: stmmac: Add Toshiba Visconti SoCs glue driver")
      Signed-off-by: default avatarYuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
      Reviewed-by: default avatarNobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0959bc4b
    • Yuji Ishikawa's avatar
      net: stmmac: dwmac-visconti: Fix bit definitions for ETHER_CLK_SEL · 1ba1a4a9
      Yuji Ishikawa authored
      just 0 should be used to represent cleared bits
      
      * ETHER_CLK_SEL_DIV_SEL_20
      * ETHER_CLK_SEL_TX_CLK_EXT_SEL_IN
      * ETHER_CLK_SEL_RX_CLK_EXT_SEL_IN
      * ETHER_CLK_SEL_TX_CLK_O_TX_I
      * ETHER_CLK_SEL_RMII_CLK_SEL_IN
      
      Fixes: b38dd98f ("net: stmmac: Add Toshiba Visconti SoCs glue driver")
      Signed-off-by: default avatarYuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
      Reviewed-by: default avatarNobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ba1a4a9
    • Ido Schimmel's avatar
      ipv6_tunnel: Rate limit warning messages · 6cee105e
      Ido Schimmel authored
      The warning messages can be invoked from the data path for every packet
      transmitted through an ip6gre netdev, leading to high CPU utilization.
      
      Fix that by rate limiting the messages.
      
      Fixes: 09c6bbf0 ("[IPV6]: Do mandatory IPv6 tunnel endpoint checks in realtime")
      Reported-by: default avatarMaksym Yaremchuk <maksymy@nvidia.com>
      Tested-by: default avatarMaksym Yaremchuk <maksymy@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cee105e
    • Moshe Tal's avatar
      ethtool: Fix link extended state for big endian · e2f08207
      Moshe Tal authored
      The link extended sub-states are assigned as enum that is an integer
      size but read from a union as u8, this is working for small values on
      little endian systems but for big endian this always give 0. Fix the
      variable in the union to match the enum size.
      
      Fixes: ecc31c60 ("ethtool: Add link extended state")
      Signed-off-by: default avatarMoshe Tal <moshet@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Tested-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarGal Pressman <gal@nvidia.com>
      Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2f08207
    • Robert Hancock's avatar
      net: phy: broadcom: hook up soft_reset for BCM54616S · d15c7e87
      Robert Hancock authored
      A problem was encountered with the Bel-Fuse 1GBT-SFP05 SFP module (which
      is a 1 Gbps copper module operating in SGMII mode with an internal
      BCM54616S PHY device) using the Xilinx AXI Ethernet MAC core, where the
      module would work properly on the initial insertion or boot of the
      device, but after the device was rebooted, the link would either only
      come up at 100 Mbps speeds or go up and down erratically.
      
      I found no meaningful changes in the PHY configuration registers between
      the working and non-working boots, but the status registers seemed to
      have a lot of error indications set on the SERDES side of the device on
      the non-working boot. I suspect the problem is that whatever happens on
      the SGMII link when the device is rebooted and the FPGA logic gets
      reloaded ends up putting the module's onboard PHY into a bad state.
      
      Since commit 6e2d85ec ("net: phy: Stop with excessive soft reset")
      the genphy_soft_reset call is not made automatically by the PHY core
      unless the callback is explicitly specified in the driver structure. For
      most of these Broadcom devices, there is probably a hardware reset that
      gets asserted to reset the PHY during boot, however for SFP modules
      (where the BCM54616S is commonly found) no such reset line exists, so if
      the board keeps the SFP cage powered up across a reboot, it will end up
      with no reset occurring during reboots.
      
      Hook up the genphy_soft_reset callback for BCM54616S to ensure that a
      PHY reset is performed before the device is initialized. This appears to
      fix the issue with erratic operation after a reboot with this SFP
      module.
      
      Fixes: 6e2d85ec ("net: phy: Stop with excessive soft reset")
      Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d15c7e87
    • Victor Nogueira's avatar
      net: sched: Clarify error message when qdisc kind is unknown · 973bf8fd
      Victor Nogueira authored
      When adding a tc rule with a qdisc kind that is not supported or not
      compiled into the kernel, the kernel emits the following error: "Error:
      Specified qdisc not found.". Found via tdc testing when ETS qdisc was not
      compiled in and it was not obvious right away what the message meant
      without looking at the kernel code.
      
      Change the error message to be more explicit and say the qdisc kind is
      unknown.
      Signed-off-by: default avatarVictor Nogueira <victor@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      973bf8fd
    • Congyu Liu's avatar
      net: fix information leakage in /proc/net/ptype · 47934e06
      Congyu Liu authored
      In one net namespace, after creating a packet socket without binding
      it to a device, users in other net namespaces can observe the new
      `packet_type` added by this packet socket by reading `/proc/net/ptype`
      file. This is minor information leakage as packet socket is
      namespace aware.
      
      Add a net pointer in `packet_type` to keep the net namespace of
      of corresponding packet socket. In `ptype_seq_show`, this net pointer
      must be checked when it is not NULL.
      
      Fixes: 2feb27db ("[NETNS]: Minor information leak via /proc/net/ptype file.")
      Signed-off-by: default avatarCongyu Liu <liu3101@purdue.edu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      47934e06
    • Linus Torvalds's avatar
      Merge tag 'net-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · fa2e1ba3
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from netfilter, bpf.
      
        Quite a handful of old regression fixes but most of those are
        pre-5.16.
      
        Current release - regressions:
      
         - fix memory leaks in the skb free deferral scheme if upper layer
           protocols are used, i.e. in-kernel TCP readers like TLS
      
        Current release - new code bugs:
      
         - nf_tables: fix NULL check typo in _clone() functions
      
         - change the default to y for Vertexcom vendor Kconfig
      
         - a couple of fixes to incorrect uses of ref tracking
      
         - two fixes for constifying netdev->dev_addr
      
        Previous releases - regressions:
      
         - bpf:
            - various verifier fixes mainly around register offset handling
              when passed to helper functions
            - fix mount source displayed for bpffs (none -> bpffs)
      
         - bonding:
            - fix extraction of ports for connection hash calculation
            - fix bond_xmit_broadcast return value when some devices are down
      
         - phy: marvell: add Marvell specific PHY loopback
      
         - sch_api: don't skip qdisc attach on ingress, prevent ref leak
      
         - htb: restore minimal packet size handling in rate control
      
         - sfp: fix high power modules without diagnostic monitoring
      
         - mscc: ocelot:
            - don't let phylink re-enable TX PAUSE on the NPI port
            - don't dereference NULL pointers with shared tc filters
      
         - smsc95xx: correct reset handling for LAN9514
      
         - cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
      
         - phy: micrel: use kszphy_suspend/_resume for irq aware devices,
           avoid races with the interrupt
      
        Previous releases - always broken:
      
         - xdp: check prog type before updating BPF link
      
         - smc: resolve various races around abnormal connection termination
      
         - sit: allow encapsulated IPv6 traffic to be delivered locally
      
         - axienet: fix init/reset handling, add missing barriers, read the
           right status words, stop queues correctly
      
         - add missing dev_put() in sock_timestamping_bind_phc()
      
        Misc:
      
         - ipv4: prevent accidentally passing RTO_ONLINK to
           ip_route_output_key_hash() by sanitizing flags
      
         - ipv4: avoid quadratic behavior in netns dismantle
      
         - stmmac: dwmac-oxnas: add support for OX810SE
      
         - fsl: xgmac_mdio: add workaround for erratum A-009885"
      
      * tag 'net-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (92 commits)
        ipv4: add net_hash_mix() dispersion to fib_info_laddrhash keys
        ipv4: avoid quadratic behavior in netns dismantle
        net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module
        powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses
        dt-bindings: net: Document fsl,erratum-a009885
        net/fsl: xgmac_mdio: Add workaround for erratum A-009885
        net: mscc: ocelot: fix using match before it is set
        net: phy: micrel: use kszphy_suspend()/kszphy_resume for irq aware devices
        net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
        nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()
        net: axienet: increase default TX ring size to 128
        net: axienet: fix for TX busy handling
        net: axienet: fix number of TX ring slots for available check
        net: axienet: Fix TX ring slot available check
        net: axienet: limit minimum TX ring size
        net: axienet: add missing memory barriers
        net: axienet: reset core on initialization prior to MDIO access
        net: axienet: Wait for PhyRstCmplt after core reset
        net: axienet: increase reset timeout
        bpf, selftests: Add ringbuf memory type confusion test
        ...
      fa2e1ba3