[PATCH v3 0/8] Reduce reliance on global response buffer in IAVF
Anatoly Burakov
anatoly.burakov at intel.com
Fri Mar 6 11:58:16 CET 2026
In many places where we are calling down into virtchnl, we are using a
globally allocated adminq response buffer. This is unnecessary, so replace
with adminq buffers allocated on stack. However, because IAVF virtchnl
message queue works asynchronously in most cases, we can't remove the
global buffer entirely, and we need to do some cleanup and refactoring to
be able to reduce our usage of these buffers. This patchset does that.
v1 -> v2:
- Stats query was passing in a pointer-to-pointer and storing pointer to
global adminq response buffer as output parameter, so changing that to a
local buffer resulted in storing a pointer to a buffer that was stack
allocated (i.e. introduced a use-after-free).
v2 -> v3:
- Reworked the virtchnl message handling to not rely on implicit behavior
- Split up into 8 patches for easy review
Anatoly Burakov (8):
net/iavf: avoid passing around pointers
net/iavf: add a variable for hena
net/iavf: add virtchnl interrupt enable flag
net/iavf: rework "async" virtchnl requests
net/iavf: refactor sending virtchnl messages
net/iavf: respect output buffer in virtchnl
net/iavf: do not use global virtchnl buffer
net/iavf: embed virtchnl response buffer
drivers/net/intel/iavf/iavf.h | 58 +---
drivers/net/intel/iavf/iavf_ethdev.c | 50 ++-
drivers/net/intel/iavf/iavf_vchnl.c | 483 ++++++++++++++++-----------
3 files changed, 304 insertions(+), 287 deletions(-)
--
2.47.3
More information about the dev
mailing list