Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ethernet driver HW rings #254

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Courtney3141
Copy link
Contributor

@Courtney3141 Courtney3141 commented Sep 23, 2024

This PR updates the ethernet driver HW rings to comply with sDDF queue conventions. Changes are:

  1. Use overflowing unsigneds for head and tail indices (rather than keeping indices modulo ring capacity).
  2. Use the entire capacity of the HW rings (rather than keeping 1-2 entries as guard entries which was previously required before changing 1).
  3. Keep ring capacity as an element in the HW ring struct. Prior to this PR, it was used as a macro throughout the code, and required as a function parameter to queue functions which already took the queue data structure as a parameter.
  4. Correct the memory barriers when reading from and writing to the ring DMA region. This involved the addition of two acquire fences to prevent re-orderings before reading, and the relaxing of a full memory barrier to a release barrier when adding an entry to the ring (writing).

Note that this PR is based off #253, and should be merged secondary to that.

Signed-off-by: Courtney Darville <courtneydarville94@outlook.com>
Signed-off-by: Courtney Darville <courtneydarville94@outlook.com>
Signed-off-by: Courtney Darville <courtneydarville94@outlook.com>
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.

1 participant