Skip to content

gnrc_pktbuf: allow write-protect of size 0 snips#11161

Merged
2 commits merged intoRIOT-OS:masterfrom
miri64:gnrc_pktbuf/fix/start-write-size-0
Mar 15, 2019
Merged

gnrc_pktbuf: allow write-protect of size 0 snips#11161
2 commits merged intoRIOT-OS:masterfrom
miri64:gnrc_pktbuf/fix/start-write-size-0

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Mar 12, 2019

Contribution description

Size 0 snips are legal packet snips (empty payload e.g.) so it doesn't
make sense to issue an error in the write-protection in that case.

API documentation doesn't mention it either and the tests still pass
with the check removed.

Testing procedure

Unittests should still pass, both with normal configuration

make -C tests/unittests tests-pktbuf test

and

USEMODULE=gnrc_pktbuf_malloc make -C tests/unittests tests-pktbuf test

(just noticed that this test fails in master as well due to an unrelated problem -.-)

Issues/PRs references

Requires #11163 to be fixed to actually be able to send empty packets with gnrc_networking.

miri64 added 2 commits March 12, 2019 14:34
Size 0 snips are legal packet snips (empty payload e.g.) so it doesn't
make sense to issue an error in the write-protection in that case.

API documentation doesn't mention it either and the tests still pass
with the check removed.
Size 0 snips are legal packet snips (empty payload e.g.) so it doesn't
make sense to issue an error in the write-protection in that case.

API documentation doesn't mention it either and the tests still pass
with the check removed.
@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 12, 2019
@miri64 miri64 requested review from a user and bergzand March 12, 2019 13:44
@miri64 miri64 added this to the Release 2019.04 milestone Mar 12, 2019
@miri64 miri64 changed the title gnrc_pktbuf_static: allow write-protect of size 0 snips gnrc_pktbuf: allow write-protect of size 0 snips Mar 12, 2019
@ghost
Copy link
Copy Markdown

ghost commented Mar 15, 2019

With txtsnd from examples/default sending zero bytes works with and without this PR.
Sending zero bytes with udp examples/gnr_networking does only work with this PR.

EDIT: zero bytes of payload of course :)

@ghost ghost added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Mar 15, 2019
@ghost ghost merged commit db58936 into RIOT-OS:master Mar 15, 2019
@miri64 miri64 deleted the gnrc_pktbuf/fix/start-write-size-0 branch March 15, 2019 14:32
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines 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.

1 participant