1. 04 9月, 2022 1 次提交
  2. 03 9月, 2022 29 次提交
  3. 02 9月, 2022 10 次提交
    • J
      net: remove netif_tx_napi_add() · c3f760ef
      Jakub Kicinski 提交于
      All callers are now gone.
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3f760ef
    • E
      net: bql: add more documentation · 977f1aa5
      Eric Dumazet 提交于
      Add some documentation for netdev_tx_sent_queue() and
      netdev_tx_completed_queue()
      
      Stating that netdev_tx_completed_queue() must be called once
      per TX completion round is apparently not obvious for everybody.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      977f1aa5
    • D
      Merge branch 'net-ipa-transaction-state-IDs' · 25de4a0b
      David S. Miller 提交于
      Alex Elder says:
      
      ====================
      net: ipa: use IDs to track transaction state
      
      This series is the first of three groups of changes that simplify
      the way the IPA driver tracks the state of its transactions.
      
      Each GSI channel has a fixed number of transactions allocated at
      initialization time.  The number allocated matches the number of
      TREs in the transfer ring associated with the channel.  This is
      because the transfer ring limits the number of transfers that can
      ever be underway, and in the worst case, each transaction represents
      a single TRE.
      
      Transactions go through various states during their lifetime.
      Currently a set of lists keeps track of which transactions are in
      each state.  Initially, all transactions are free.  An allocated
      transaction is placed on the allocated list.  Once an allocated
      transaction is committed, it is moved from the allocated to the
      committed list.  When a committed transaction is sent to hardware
      (via a doorbell) it is moved to the pending list.  When hardware
      signals that some work has completed, transactions are moved to the
      completed list.  Finally, when a completed transaction is polled
      it's moved to the polled list before being removed when it becomes
      free.
      
      Changing a transaction's state thus normally involves manipulating
      two lists, and to prevent corruption a spinlock is held while the
      lists are updated.
      
      Transactions move through their states in a well-defined sequence
      though, and they do so strictly in order.  So transaction 0 is
      always allocated before transaction 1; transaction 0 is always
      committed before transaction 1; and so on, through completion,
      polling, and becoming free.  Because of this, it's sufficient to
      just keep track of which transaction is the first in each state.
      The rest of the transactions in a given state can be derived from
      the first transaction in an "adjacent" state.  As a result, we can
      track the state of all transactions with a set of indexes, and can
      update these without the need for a spinlock.
      
      This first group of patches just defines the set of indexes that
      will be used for this new way of tracking transaction state.  Two
      more groups of patches will follow.  I've broken the 17 patches into
      these three groups to facilitate review.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25de4a0b
    • A
      net: ipa: track polled transactions with an ID · fd3bd039
      Alex Elder 提交于
      Add a transaction ID to track the first element in the transaction
      array that has been polled.  Advance the ID when we are releasing a
      transaction.
      
      Temporarily add warnings that verify that the first polled
      transaction tracked by the ID matches the first element on the
      polled list, both when polling and freeing.
      
      Remove the temporary warnings added by the previous commit.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd3bd039
    • A
      net: ipa: track completed transactions with an ID · 949cd0b5
      Alex Elder 提交于
      Add a transaction ID field to track the first element in the
      transaction array that has completed but has not yet been polled.
      
      Advance the ID when we are processing a transaction in the NAPI
      polling loop (where completed transactions become polled).
      
      Temporarily add warnings that verify that the first completed
      transaction tracked by the ID matches the first element on the
      completed list, both when pending and completing.
      
      Remove the temporary warnings added by the previous commit.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      949cd0b5
    • A
      net: ipa: track pending transactions with an ID · eeff7c14
      Alex Elder 提交于
      Add a transaction ID field to track the first element in the
      transaction array that is pending (sent to hardware) but not yet
      complete.  Advance the ID when a completion event for a channel
      indicates that transactions have completed.
      
      Temporarily add warnings that verify that the first pending
      transaction tracked by the ID matches the first element on the
      pending list, both when pending and completing, as well as when
      resetting the channel.
      
      Remove the temporary warnings added by the previous commit.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eeff7c14
    • A
      net: ipa: track committed transactions with an ID · fc95d958
      Alex Elder 提交于
      Add a transaction ID field to track the first element in a channel's
      transaction array that has been committed, but not yet passed to the
      hardware.  Advance the ID when the hardware is notified via doorbell
      that TREs from a transaction are ready for consumption.
      
      Temporarily add warnings that verify that the first committed
      transaction tracked by the ID matches the first element on the
      committed list, both when committing and pending (at doorbell).
      
      Remove the temporary warnings added by the previous commit.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc95d958
    • A
      net: ipa: track allocated transactions with an ID · 41e2a2c0
      Alex Elder 提交于
      Transactions for a channel are now managed in an array, with a free
      transaction ID indicating which is the next one free.
      
      Add another transaction ID field to track the first element in the
      array that has been allocated.  Advance it when a transaction is
      committed (because that is when that transaction leaves allocated
      state).
      
      Temporarily add warnings that verify that the first allocated
      transaction tracked by the ID matches the first element on the
      allocated list, both when allocating and committing a transaction.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41e2a2c0
    • A
      net: ipa: use an array for transactions · 12382d11
      Alex Elder 提交于
      Transactions are always allocated one at a time.  The maximum number
      of them we could ever need occurs if each TRE is assigned to a
      transaction.  So a channel requires no more transactions than the
      number of TREs in its transfer ring.  That number is known to be a
      power-of-2 less than 65536.
      
      The transaction pool abstraction is used for other things, but for
      transactions we can use a simple array of transaction structures,
      and use a free index to indicate which entry in the array is the
      next one free for allocation.
      
      By having the number of elements in the array be a power-of-2, we
      can use an ever-incrementing 16-bit free index, and use it modulo
      the array size.  Distinguish a "trans_id" (whose value can exceed
      the number of entries in the transaction array) from a "trans_index"
      (which is less than the number of entries).
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12382d11
    • D
      Merge branch 'lan966x-make-reset-optional' · a01105f1
      David S. Miller 提交于
      Michael Walle says:
      
      ====================
      net: lan966x: make reset optional
      
      This is the remaining part of the reset rework on the LAN966x targetting
      the netdev tree.
      
      The former series can be found at:
      https://lore.kernel.org/lkml/20220826115607.1148489-1-michael@walle.cc/
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a01105f1