1. 14 Sep, 2023 18 commits
  2. 13 Sep, 2023 8 commits
  3. 12 Sep, 2023 10 commits
  4. 11 Sep, 2023 4 commits
    • Brett Creeley's avatar
      iavf: Fix promiscuous mode configuration flow messages · 221465de
      Brett Creeley authored
      Currently when configuring promiscuous mode on the AVF we detect a
      change in the netdev->flags. We use IFF_PROMISC and IFF_ALLMULTI to
      determine whether or not we need to request/release promiscuous mode
      and/or multicast promiscuous mode. The problem is that the AQ calls for
      setting/clearing promiscuous/multicast mode are treated separately. This
      leads to a case where we can trigger two promiscuous mode AQ calls in
      a row with the incorrect state. To fix this make a few changes.
      
      Use IAVF_FLAG_AQ_CONFIGURE_PROMISC_MODE instead of the previous
      IAVF_FLAG_AQ_[REQUEST|RELEASE]_[PROMISC|ALLMULTI] flags.
      
      In iavf_set_rx_mode() detect if there is a change in the
      netdev->flags in comparison with adapter->flags and set the
      IAVF_FLAG_AQ_CONFIGURE_PROMISC_MODE aq_required bit. Then in
      iavf_process_aq_command() only check for IAVF_FLAG_CONFIGURE_PROMISC_MODE
      and call iavf_set_promiscuous() if it's set.
      
      In iavf_set_promiscuous() check again to see which (if any) promiscuous
      mode bits have changed when comparing the netdev->flags with the
      adapter->flags. Use this to set the flags which get sent to the PF
      driver.
      
      Add a spinlock that is used for updating current_netdev_promisc_flags
      and only allows one promiscuous mode AQ at a time.
      
      [1] Fixes the fact that we will only have one AQ call in the aq_required
      queue at any one time.
      
      [2] Streamlines the change in promiscuous mode to only set one AQ
      required bit.
      
      [3] This allows us to keep track of the current state of the flags and
      also makes it so we can take the most recent netdev->flags promiscuous
      mode state.
      
      [4] This fixes the problem where a change in the netdev->flags can cause
      IAVF_FLAG_AQ_CONFIGURE_PROMISC_MODE to be set in iavf_set_rx_mode(),
      but cleared in iavf_set_promiscuous() before the change is ever made via
      AQ call.
      
      Fixes: 47d34839 ("i40evf: Add driver support for promiscuous mode")
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Signed-off-by: default avatarAhmed Zaki <ahmed.zaki@intel.com>
      Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      221465de
    • Andrii Staikov's avatar
      i40e: fix potential memory leaks in i40e_remove() · 5ca636d9
      Andrii Staikov authored
      Instead of freeing memory of a single VSI, make sure
      the memory for all VSIs is cleared before releasing VSIs.
      Add releasing of their resources in a loop with the iteration
      number equal to the number of allocated VSIs.
      
      Fixes: 41c445ff ("i40e: main driver core")
      Signed-off-by: default avatarAndrii Staikov <andrii.staikov@intel.com>
      Signed-off-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      5ca636d9
    • Lorenzo Bianconi's avatar
      net: ethernet: mtk_eth_soc: fix pse_port configuration for MT7988 · 5a124b1f
      Lorenzo Bianconi authored
      MT7988 SoC support 3 NICs. Fix pse_port configuration in
      mtk_flow_set_output_device routine if the traffic is offloaded to eth2.
      Rely on mtk_pse_port definitions.
      
      Fixes: 88efedf5 ("net: ethernet: mtk_eth_soc: enable nft hw flowtable_offload for MT7988 SoC")
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a124b1f
    • Daniel Golle's avatar
      net: ethernet: mtk_eth_soc: fix uninitialized variable · e10a35ab
      Daniel Golle authored
      Variable dma_addr in function mtk_poll_rx can be uninitialized on
      some of the error paths. In practise this doesn't matter, even random
      data present in uninitialized stack memory can safely be used in the
      way it happens in the error path.
      
      However, in order to make Smatch happy make sure the variable is
      always initialized.
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e10a35ab