netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/4] Fix/Improve queue stats and subcrq indirect handling
@ 2025-07-02 17:18 Mingming Cao
  2025-07-02 17:18 ` [PATCH v2 net-next 1/4] ibmvnic: Use atomic64_t for queue stats Mingming Cao
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Mingming Cao @ 2025-07-02 17:18 UTC (permalink / raw)
  To: netdev; +Cc: bjking1, haren, ricklind, davemarq, mmc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=true, Size: 2427 bytes --]

This patch series introduces fixes and improvements to the ibmvnic driver, 
focusing on accurate statistics reporting, CRQ scalability.

Patch 1: Convert per-queue RX/TX stats to atomic64_t to ensure thread-safe 
updates in concurrent environments. This establishes a safe and consistent 
foundation for subsequent statistics-related fixes.

Patch 2: Replace hardcoded NUM_RX_STATS and NUM_TX_STATS macros by dynamically
 deriving the counts using sizeof. This fixes a mismatch introduced in commit 
2ee73c54a615 (“ibmvnic: Add stat for tx direct vs tx batched”) and ensures 
that all stat fields are correctly reported via ethtool -S.

Patch 3: Fix inaccurate sar statistics by implementing ndo_get_stats64() and 
removing the outdated manual updates to netdev->stats.

Patch 4: Raise the default number of indirect sub-CRQ entries to 128 on POWER9 
and later systems, improving performance under high-throughput workloads. A 
module parameter is included as a fallback for compatibility on older systems; 
this is documented as a transitional mechanism, not intended for dynamic tuning.


--------------------------------------

Changes since v1:
 Link to v1: https://www.spinics.net/lists/netdev/msg1103893.html

Patch 1 (was Patch 2 in v1): Introduces atomic64_t stats early to establish 
a consistent foundation. Replaces atomic64_sub() with atomic64_sub_return() 
and adds a warning for underflow. This change now comes first to ensure correct
 ordering of dependency with stat size derivation.

Patch 2 (was Patch 1 in v1): Commit message rewritten to clearly highlight the 
mismatch bug caused by static stat counts and rebased on top of the atomic64 
conversion to avoid broken logic during intermediate states.

Patch 3: No functional changes

Patch 4: Commit message clarified to explain the use of 128 indirect entries 
on POWER9+ systems and the intent of the module parameter as a transitional 
fallback for legacy or constrained systems.

Mingming Cao (4):
  ibmvnic: Use atomic64_t for queue stats
  ibmvnic: Fix hardcoded NUM_RX_STATS/NUM_TX_STATS with dynamic sizeof
  ibmvnic: Use ndo_get_stats64 to fix inaccurate SAR reporting
  ibmvnic: Make max subcrq indirect entries tunable via module param

 drivers/net/ethernet/ibm/ibmvnic.c | 101 ++++++++++++++++++++---------
 drivers/net/ethernet/ibm/ibmvnic.h |  29 +++++----
 2 files changed, 89 insertions(+), 41 deletions(-)

-- 
2.39.3 (Apple Git-146)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-04 17:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 17:18 [PATCH v2 net-next 0/4] Fix/Improve queue stats and subcrq indirect handling Mingming Cao
2025-07-02 17:18 ` [PATCH v2 net-next 1/4] ibmvnic: Use atomic64_t for queue stats Mingming Cao
2025-07-02 17:18 ` [PATCH v2 net-next 2/4] ibmvnic: Fix hardcoded NUM_RX_STATS/NUM_TX_STATS with dynamic sizeof Mingming Cao
2025-07-04 17:14   ` Simon Horman
2025-07-02 17:18 ` [PATCH v2 net-next 3/4] ibmvnic: Use ndo_get_stats64 to fix inaccurate SAR reporting Mingming Cao
2025-07-04 17:19   ` Simon Horman
2025-07-02 17:18 ` [PATCH v2 net-next 4/4] ibmvnic: Make max subcrq indirect entries tunable via module param Mingming Cao
2025-07-04 17:05   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).