lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250702171804.86422-1-mmc@linux.ibm.com>
Date: Wed,  2 Jul 2025 10:18:00 -0700
From: Mingming Cao <mmc@...ux.ibm.com>
To: netdev@...r.kernel.org
Cc: bjking1@...ux.ibm.com, haren@...ux.ibm.com, ricklind@...ux.ibm.com,
        davemarq@...ux.ibm.com, mmc@...ux.ibm.com
Subject: [PATCH v2 net-next 0/4] Fix/Improve queue stats and subcrq indirect handling 

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)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ