Skip to content

Conversation

maribu
Copy link
Member

@maribu maribu commented Aug 9, 2022

Backport of #18416

Contribution description

A single character type resulted in way fewer TX descriptors being available than allocated. Not only resulted this in wasting memory, but also when more iolist chunks than descriptors are send, the

    assert(iolist_count(iolist) <= ETH_TX_DESCRIPTOR_COUNT);

does not trigger. As a result, old TX descriptors are being overwritten in this case.

Testing procedure

@fabian18 has a test that reliably triggers the bug. He should be able to confirm it is gone now. But actually, it should be pretty obvious from the code that this fixes a typo.

Issues/PRs references

None

A single character type resulted in way fewer TX descriptors being
available than allocated. Not only resulted this in wasting memory,
but also when more iolist chunks than descriptors are send, the

```C
    assert(iolist_count(iolist) <= ETH_TX_DESCRIPTOR_COUNT);
```

does not trigger. As a result, old TX descriptors are being overwritten
in this case.

(cherry picked from commit 82fbe08)
@maribu maribu added Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Aug 9, 2022
@maribu maribu requested a review from benpicco August 9, 2022 05:34
@chrysn chrysn enabled auto-merge August 9, 2022 05:46
@chrysn
Copy link
Member

chrysn commented Aug 9, 2022

Thanks. Priorizing this in CI over #18411, PR #18410 and PR #18417 for a speedy RC3.

@chrysn chrysn merged commit f1945d9 into RIOT-OS:2022.07-branch Aug 9, 2022
@maribu
Copy link
Member Author

maribu commented Aug 9, 2022

Thx :)

@maribu maribu deleted the backport/2022.07/cpu/stm32/periph/stm32_eth/bugfix branch August 9, 2022 14:17
@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants