Skip to content

Commit

Permalink
prov/efa: Shrink the size of extra_info array
Browse files Browse the repository at this point in the history
Currently, extra_info is a 256*8 bytes array in
efa_rdm_ep and efa_rdm_peer, this is way too much
as it can cover 256*64 bits of extra features/requests
that RDM endpoint is likely to have.
This patch reduces it to 4*8 bytes array that
can cover 256 bits which should be enough for the foreseeable
future.

Signed-off-by: Shi Jin <[email protected]>
  • Loading branch information
shijin-aws committed Sep 17, 2024
1 parent a34b25c commit 4050272
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prov/efa/docs/efa_rdm_protocol_v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ Note, the field `extra_info` was named `features` when protocol v4 was initially
only planned for extra features. Later, we discovered that the handshake subprotocol can also be used to pass
additional request information, thus introduced the concept of "extra request" and renamed this field `extra_info`.

`nextra_p3` is number of `extra_info` flags of the endpoint plus 3. The "plus 3" is for historical reasons.
`nextra_p3` is number of 64-bit `extra_info` elements of the endpoint plus 3. The "plus 3" is for historical reasons.
When protocol v4 was initially introduced, this field is named `maxproto`. The original plan was that protocol
v4 can only have 64 extra features/requests. If the number of extra feature/request ever exceeds 64, the next
feature/request will be defined as version 5 feature/request, (version 6 if the number exceeds 128, so on so
Expand Down
7 changes: 6 additions & 1 deletion prov/efa/src/rdm/efa_rdm_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ struct efa_ep_addr {
#define EFA_RDM_EXTRA_FEATURE_READ_NACK BIT_ULL(6)
#define EFA_RDM_EXTRA_FEATURE_REQUEST_USER_RECV_QP BIT_ULL(7)
#define EFA_RDM_NUM_EXTRA_FEATURE_OR_REQUEST 8
#define EFA_RDM_MAX_NUM_EXINFO (256)
/*
* The length of 64-bit extra_info array used in efa_rdm_ep
* and efa_rdm_peer
* 4 means 64*4=256 bits of extra features or requests
*/
#define EFA_RDM_MAX_NUM_EXINFO (4)

/*
* Packet type ID of each packet type (section 1.3)
Expand Down

0 comments on commit 4050272

Please sign in to comment.