-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
We are fragmenting too aggressively #193
Comments
I just noticed this too! I was trying to figure out what had changed. |
👍 |
Nice! Does anyone have a patch/pull request? |
This was more like a bug report. If the proposed change works it's only a fluke, it was off the top of my head On 18 Nov 2013, at 06:23, Adam Dunkels [email protected] wrote:
|
I am not very familiar with that part of the code or the reasons why it changed. |
MAC_MAX_PAYLOAD should be replaced by the maximum PHY frame size. There is one caveat though, if the framer appends bytes after the payload, they are not included in framer_hdrlen. In case of 802.15.4 the FCS is appended, so you have to replace MAC_MAX_PAYLOAD by 127 - 2. By doing that there is no need to use max(framer_hdrlen, 25) ce99c02 from #557 fixes this as a side effect Maybe a cleaner solution would be to add a function in framer to return the len of appended data. |
I observed that DIOs are now being sent fragmented without having grown in size!
The problem is in L1463 in
core/net/sicslowpan.c
:We are leaving too little space for the L2 payload. We reduce it by 25 first inside MAC_MAX_PAYLOAD (which defaults to 127 - 25) and then we further subtract framer_hdrlen.
There was nothing wrong with the old condition, so am I right to suspect it may be related with crypto at L2?
What we should be doing is subtract the highest of 25 or
framer_hdrlen
, like so (obviously formatted correctly etc):There are two more instances of
MAC_MAX_PAYLOAD - framer_hdrlen
which would need adjustments as well.One could argue that this is not a bug however it needs changed, since at the moment we don't have RPL in platforms which don't support 6lowpan fragmentation.
The text was updated successfully, but these errors were encountered: