diff options
author | Alex Elder <elder@linaro.org> | 2022-06-13 20:17:56 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-06-15 11:07:58 +0300 |
commit | 4e0f28e9ee4b6d690ba6d617e5d0524327d0d610 (patch) | |
tree | e2558615379c83a257ddcd2cfd8df8c4c4316d4a /drivers/net/ipa/gsi_trans.h | |
parent | 3eeabea6c895ee9f3f155fede65904d9bd54238a (diff) | |
download | linux-4e0f28e9ee4b6d690ba6d617e5d0524327d0d610.tar.xz |
net: ipa: introduce gsi_trans_tx_committed()
Create a new function that encapsulates recording information needed
for TX channel statistics when a transaction is committed.
Record the accumulated length in the transaction before the call
(for both RX and TX), so it can be used when updating TX statistics.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/gsi_trans.h')
-rw-r--r-- | drivers/net/ipa/gsi_trans.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ipa/gsi_trans.h b/drivers/net/ipa/gsi_trans.h index b5f80250ca00..7084507830c2 100644 --- a/drivers/net/ipa/gsi_trans.h +++ b/drivers/net/ipa/gsi_trans.h @@ -35,7 +35,7 @@ struct gsi_trans_pool; * @cancelled: If set by the core code, transaction was cancelled * @rsvd_count: Number of TREs reserved for this transaction * @used_count: Number of TREs *used* (could be less than rsvd_count) - * @len: Total # of transfer bytes represented in sgl[] (set by core) + * @len: Number of bytes sent or received by the transaction * @data: Preserved but not touched by the core transaction code * @cmd_opcode: Array of command opcodes (command channel only) * @sgl: An array of scatter/gather entries managed by core code @@ -45,8 +45,9 @@ struct gsi_trans_pool; * @byte_count: TX channel byte count recorded when transaction committed * @trans_count: Channel transaction count when committed (for BQL accounting) * - * The size used for some fields in this structure were chosen to ensure - * the full structure size is no larger than 128 bytes. + * The @len field is set when the transaction is committed. For RX + * transactions it is updated later to reflect the actual number of bytes + * received. */ struct gsi_trans { struct list_head links; /* gsi_channel lists */ |