Skip to content

Reduce reliance on global response buffer in IAVF

Anatoly Burakov dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest8 patches 9 repliesIn review

Changes in v3 from the cover letter

- Reworked the virtchnl message handling to not rely on implicit behavior
- Split up into 8 patches for easy review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8net/iavf: avoid passing around pointersdrivers/net/intel/iavf/iavf.h drivers/net/intel/iavf/iavf_ethdev.c drivers/net/intel/iavf/iavf_vchnl.c+20 -211 reply
2/8net/iavf: add a variable for henadrivers/net/intel/iavf/iavf_vchnl.c+3 -11 reply
3/8net/iavf: add virtchnl interrupt enable flagdrivers/net/intel/iavf/iavf.h drivers/net/intel/iavf/iavf_ethdev.c+4 -01 reply
4/8net/iavf: rework "async" virtchnl requestsdrivers/net/intel/iavf/iavf.h drivers/net/intel/iavf/iavf_vchnl.c+121 -1191 reply
5/8net/iavf: refactor sending virtchnl messagesdrivers/net/intel/iavf/iavf_vchnl.c+70 -811 reply
6/8net/iavf: respect output buffer in virtchnldrivers/net/intel/iavf/iavf_vchnl.c+7 -01 reply
7/8net/iavf: do not use global virtchnl bufferdrivers/net/intel/iavf/iavf_vchnl.c+89 -581 reply
8/8net/iavf: embed virtchnl response bufferdrivers/net/intel/iavf/iavf.h drivers/net/intel/iavf/iavf_ethdev.c drivers/net/intel/iavf/iavf_vchnl.c+1 -181 reply

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchBruce Richardson
1/8A-b
2/8A-b
3/8A-b
4/8A-b
5/8A-b
6/8A-b
7/8A-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/8] Reduce reliance on global response buffer in IAVF

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(-)
Signature · 1 line
2.47.3