Skip to content

prov/lnx: lnx cleanup and general fixes to prepare for incoming FI_MSG and FI_RMA support#12188

Open
aingerson wants to merge 4 commits intoofiwg:mainfrom
aingerson:lnx
Open

prov/lnx: lnx cleanup and general fixes to prepare for incoming FI_MSG and FI_RMA support#12188
aingerson wants to merge 4 commits intoofiwg:mainfrom
aingerson:lnx

Conversation

@aingerson
Copy link
Copy Markdown
Contributor

Clean up and reorganize code to get ready for more support coming soon
Consolidate environment variables for clarity and removal of redundant lookups
Fix capability settings and checking

@aingerson
Copy link
Copy Markdown
Contributor Author

@amirshehataornl I'm working on finally adding FI_RMA support and did some cleanup and reorganization. Let me know if you have any issues with it! The first two patches don't have any functional changes, just moving code around. The last one is just fixing some fi_info settings.

@aingerson aingerson force-pushed the lnx branch 3 times, most recently from 7d49b1d to 830e30a Compare April 28, 2026 14:39
This patch doesn't include any functional changes.
Just cleans up the code in various ways:

- rename lnx_ops.c to lnx_srx.c to include only shared receive code
- move tag ops to lnx_msg.c to prepare for adding more functionality
while not having lnx_ops.c get too out of hand
- reduce extern functions declared in lnx.h/add static to appropriate
functions
- remove unused functions and definitions
- add missing definition of LNX_SUB_ID_BITS instead of hardcoded value
- standardize function declaration formatting
- fix formatting changes (line length, alignment, trailing whitespace)
- remove a few unnecessary comments
- cleanup unnecessary headers

Signed-off-by: Alexia Ingerson <alexia.ingerson@intel.com>
…cess

Consolidate environment variables into a single struct that is initialized
in one place on getinfo. This helps the code organization and makes the
environment variables easily findable.

This also removes redundant environment variable look ups (like the lookup
happening on everything single fi_av_insert).

Signed-off-by: Alexia Ingerson <alexia.ingerson@intel.com>
fi_mr_test requires FI_RMA which lnx does not support yet

Signed-off-by: Alexia Ingerson <alexia.ingerson@intel.com>
LNX has limitations in capabilities (for example, does not support
FI_RMA, FI_RMA, etc). Even if the linked providers all support a
requested capability, it does not mean the lnx provider can be used.
We need to check against the supported lnx capabilites and properly
return -FI_ENODATA if the application requested something the provider
does not support. This adds a call to ofi_check_info and updates the
lnx capabilities to the correct subset of supported capabilites for
validation. It also modifies the shared tx/rx ctx attributes since
lnx does not support those as well as the mr mode because lnx does
not require FI_MR_RAW.

In addition to the improper checking, lnx was not setting the returned
info->caps, tx_attr->caps, and rx_attr->caps to the application and
always returning 0 for all capabilities. This also adds checking of
linked provider capabilites during generation to properly set the
returned capabilities to the application.

Request FI_PEER and FI_AV_USER_ID for linked providers. Support for
the peer API is required to be linked together using the lnx provider.

Switch lnx_generate_link_info params to match convention of (input, output)

Signed-off-by: Alexia Ingerson <alexia.ingerson@intel.com>
@jfillers
Copy link
Copy Markdown
Contributor

Hi @aingerson, I've been working with @amirshehataornl on implementing FI_MSG capability for LNX. Are we in conflict with work you are currently doing or is this just preparation?

@jfillers
Copy link
Copy Markdown
Contributor

Looked at the changes briefly. I see that you split lnx_ops.c into two separate files. My changes are all based on the single lnx_ops.c. What would be the best way for us to reconcile the differences in our changes? Would it be better for me to update my side once your patch has been merged?

@aingerson
Copy link
Copy Markdown
Contributor Author

@jfillers Hey there! Sorry I didn't realize you were working on this. I did already finish all the RMA and MSG support. Let's sync offline about this and exchange notes and thoughts. Are you on slack?

@aingerson
Copy link
Copy Markdown
Contributor Author

@jfillers when you have a chance, can you give this PR a thumbs up if you're ok with merging it?
@ooststep I'll wait for your final review to merge

@jfillers
Copy link
Copy Markdown
Contributor

jfillers commented May 8, 2026

@jfillers when you have a chance, can you give this PR a thumbs up if you're ok with merging it? @ooststep I'll wait for your final review to merge

👍 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants