Skip to content

Conversation

ibeecraft-amd
Copy link
Contributor

Running with Warnings enabled on X3 you get output warning that the NIC is not running low-latency firmware.

This commit simply suppresses the warning on X3 NICs.

Without commit on X3522:

ZF_ATTR="log_level=0x2;interface=ens1f0np0" ./zfsink 224.1.1.1:9001
  1000 | Interface ens1f0np0 is not in low latency mode.
  1000 | Low latency mode is recommended for best latency with TCPDirect.
  1000 | PIO not supported by efct interface but pio=3. Not attempting to allocate PIO buffer.
Polling reactor

With commit on X3522:

ZF_ATTR="log_level=0x2;interface=ens1f0np0" ./zfsink 224.1.1.1:9001
  1000 | PIO not supported by efct interface but pio=3. Not attempting to allocate PIO buffer.
Polling reactor

With Commit on X2522 running full-feature firmware:

ZF_ATTR="log_level=0x2;interface=enp131s0f0" ./zfsink 224.1.1.1:9001
  1000 | Interface enp131s0f0 is not in low latency mode.
  1000 | Low latency mode is recommended for best latency with TCPDirect.
Polling reactor

With commit on X2522 running ultra-low-latency firmware:

ZF_ATTR="log_level=0x2;interface=enp131s0f0" ./zfsink 224.1.1.1:^C01
sudo ip l set enp129s0f0 up
ZF_ATTR="log_level=0x2;interface=enp129s0f0" ./zfsink 224.1.1.1:9001
Polling reactor

@ibeecraft-amd ibeecraft-amd requested a review from a team as a code owner February 18, 2025 16:09
@ibeecraft-amd ibeecraft-amd changed the base branch from v8_1 to v9_0 February 24, 2025 11:28
@ibeecraft-amd ibeecraft-amd changed the title ON-14783: Supress FW variant warning on X3 NICs ON-14783: Use additional NIC flags for X3522 Feb 25, 2025
Comment on lines +658 to 659
/* For shared rxqs, we store the timestamp in a fake prefix when copying
* from the shared rx buffer into our own packet buffer. */
if( sti_nic->flags & ZF_RES_NIC_FLAG_SHARED_RXQ )
st_nic->rx_prefix_len = ES_DZ_RX_PREFIX_SIZE;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be based on EF_VI_CAP_RX_REF.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was based against Onload-9 branch which does not have this capability I can update it and rebase to master.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the following commit is merged to Onload-9 branch happy to update this: Xilinx-CNS/onload@7764b68

@ibeecraft-amd ibeecraft-amd marked this pull request as draft April 1, 2025 12:43
This commit adds two additional NIC flags for use with X3522 NICs. These being
ZF_RES_NIC_FLAG_SHARED_RXQ and ZF_RES_NIC_FLAG_CTPIO_ONLY. These are then used to
set up the stack.
Comment on lines +251 to +252
pio_available = 0;
zf_log_stack_warn(st, "Failed to query PIO capability (rc = %d)\n", rc);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused in this case. You've set pio_available to 0, but we still try ef_pio_alloc if !(attr->pio >= PIO_MUST_USE). I think we may as well exit here if ef_pio_alloc will always fail for x3 - which it should right? That said, I see that you're trying to preserve previous behaviour so maybe you can keep it as is

Copy link
Contributor Author

@ibeecraft-amd ibeecraft-amd Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sorry, I pushed it but hadn't finished working on this. Either way I see two ways of proceeding with this:

  1. Remove the setting of pio_available as it is not used
  2. Change the code to use this new capability check rather than try allocating the pio buffer (hesitant to do so as although should provide the same end result uses different function calls)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind either option. If we always fail ef_pio_alloc when the PIO capability is not supported, I would rather we not make the additional call. But it doesn't matter that we do, it's just more work.

Slightly related, this error message only seems to refer to the -ENOSYS case - "the API does not know how to retrieve support for the supplied capability". I think this may be a tad misleading when reporting -EOPNOTSUPP. You have reported the rc which would dispel some confusion.

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.

4 participants