1. May 17, 2023
    • Ahmed Zaki's avatar
      iavf: send VLAN offloading caps once after VFR · 7dcbdf29
      Ahmed Zaki authored
      When the user disables rxvlan offloading and then changes the number of
      channels, all VLAN ports are unable to receive traffic.
      
      Changing the number of channels triggers a VFR reset. During re-init, when
      VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS is received, we do:
      1 - set the IAVF_FLAG_SETUP_NETDEV_FEATURES flag
      2 - call
          iavf_set_vlan_offload_features(adapter, 0, netdev->features);
      
      The second step sends to the PF the __default__ features, in this case
      aq_required |= IAVF_FLAG_AQ_ENABLE_CTAG_VLAN_STRIPPING
      
      While the first step forces the watchdog task to call
      netdev_update_features() ->  iavf_set_features() ->
      iavf_set_vlan_offload_features(adapter, netdev->features, features).
      Since the user disabled the "rxvlan", this sets:
      aq_required |= IAVF_FLAG_AQ_DISABLE_CTAG_VLAN_STRIPPING
      
      When we start processing the AQ commands, both flags are enabled. Since we
      process DISABLE_XTAG first then ENABLE_XTAG, this results in the PF
      enabling the rxvlan offload. This breaks all communications on the VLAN
      net devices.
      
      Fix by removing the call to iavf_set_vlan_offload_features() (second
      step). Calling netdev_update_features() from watchdog task is enough for
      both init and reset paths.
      
      Fixes: 7598f4b4
      
       ("iavf: Move netdev_update_features() into watchdog task")
      Signed-off-by: default avatarAhmed Zaki <ahmed.zaki@intel.com>
      Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      7dcbdf29
    • Dawid Wesierski's avatar
      ice: Fix ice VF reset during iavf initialization · 7255355a
      Dawid Wesierski authored
      Fix the current implementation that causes ice_trigger_vf_reset()
      to start resetting the VF even when the VF-NIC is still initializing.
      
      When we reset NIC with ice driver it can interfere with
      iavf-vf initialization e.g. during consecutive resets induced by ice
      
      iavf                ice
        |                  |
        |<-----------------|
        |            ice resets vf
       iavf                |
       reset               |
       start               |
        |<-----------------|
        |             ice resets vf
        |             causing iavf
        |             initialization
        |             error
        |                  |
       iavf
       reset
       end
      
      This leads to a series of -53 errors
      (failed to init adminq) from the IAVF.
      
      Change the state of the vf_state field to be not active when the IAVF
      is still initializing. Make sure to wait until receiving the message on
      the message box to ensure that the vf is ready and initializded.
      
      In simple terms we use the ACTIVE flag to make sure that the ice
      driver knows if the iavf is ready for another reset
      
        iavf                  ice
          |                    |
          |                    |
          |<------------- ice resets vf
        iavf           vf_state != ACTIVE
        reset                  |
        start                  |
          |                    |
          |                    |
        iavf                   |
        reset-------> vf_state == ACTIVE
        end              ice resets vf
          |                    |
          |                    |
      
      Fixes: c54d209c
      
       ("ice: Wait for VF to be reset/ready before configuration")
      Signed-off-by: default avatarDawid Wesierski <dawidx.wesierski@intel.com>
      Signed-off-by: default avatarKamil Maziarz <kamil.maziarz@intel.com>
      Acked-by: default avatarJacob Keller <Jacob.e.keller@intel.com>
      Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      7255355a
    • Ahmed Zaki's avatar
      ice: Fix stats after PF reset · ab7470bc
      Ahmed Zaki authored
      After a core PF reset, the VFs were showing wrong Rx/Tx stats. This is a
      regression in commit 6624e780 ("ice: split ice_vsi_setup into smaller
      functions") caused by missing to set "stat_offsets_loaded = false" in the
      ice_vsi_rebuild() path.
      
      Fixes: 6624e780
      
       ("ice: split ice_vsi_setup into smaller functions")
      Signed-off-by: default avatarAhmed Zaki <ahmed.zaki@intel.com>
      Reviewed-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
      Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      ab7470bc
  2. May 16, 2023
  3. May 15, 2023
  4. May 14, 2023
  5. May 13, 2023
  6. May 12, 2023
  7. May 11, 2023
    • Linus Torvalds's avatar
      Merge tag 'net-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 6e27831b
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from netfilter.
      
        Current release - regressions:
      
         - mtk_eth_soc: fix NULL pointer dereference
      
        Previous releases - regressions:
      
         - core:
            - skb_partial_csum_set() fix against transport header magic value
            - fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
            - annotate sk->sk_err write from do_recvmmsg()
            - add vlan_get_protocol_and_depth() helper
      
         - netlink: annotate accesses to nlk->cb_running
      
         - netfilter: always release netdev hooks from notifier
      
        Previous releases - always broken:
      
         - core: deal with most data-races in sk_wait_event()
      
         - netfilter: fix possible bug_on with enable_hooks=1
      
         - eth: bonding: fix send_peer_notif overflow
      
         - eth: xpcs: fix incorrect number of interfaces
      
         - eth: ipvlan: fix out-of-bounds caused by unclear skb->cb
      
         - eth: stmmac: Initialize MAC_ONEUS_TIC_COUNTER register"
      
      * tag 'net-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (31 commits)
        af_unix: Fix data races around sk->sk_shutdown.
        af_unix: Fix a data race of sk->sk_receive_queue->qlen.
        net: datagram: fix data-races in datagram_poll()
        net: mscc: ocelot: fix stat counter register values
        ipvlan:Fix out-of-bounds caused by unclear skb->cb
        docs: networking: fix x25-iface.rst heading & index order
        gve: Remove the code of clearing PBA bit
        tcp: add annotations around sk->sk_shutdown accesses
        net: add vlan_get_protocol_and_depth() helper
        net: pcs: xpcs: fix incorrect number of interfaces
        net: deal with most data-races in sk_wait_event()
        net: annotate sk->sk_err write from do_recvmmsg()
        netlink: annotate accesses to nlk->cb_running
        kselftest: bonding: add num_grat_arp test
        selftests: forwarding: lib: add netns support for tc rule handle stats get
        Documentation: bonding: fix the doc of peer_notif_delay
        bonding: fix send_peer_notif overflow
        net: ethernet: mtk_eth_soc: fix NULL pointer dereference
        selftests: nft_flowtable.sh: check ingress/egress chain too
        selftests: nft_flowtable.sh: monitor result file sizes
        ...
      6e27831b
    • Linus Torvalds's avatar
      Merge tag 'media/v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 691e1eee
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
       - fix some unused-variable warning in mtk-mdp3
      
       - ignore unused suspend operations in nxp
      
       - some driver fixes in rcar-vin
      
      * tag 'media/v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        media: platform: mtk-mdp3: work around unused-variable warning
        media: nxp: ignore unused suspend operations
        media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
        media: rcar-vin: Fix NV12 size alignment
        media: rcar-vin: Gen3 can not scale NV12
      691e1eee