Skip to content

RFC ieee802154: 6lowpan: cleanup and rework dispatch evaluation

Alexander Aring linux-wpan 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest16 patches 20 repliesIn review
  2. v1 RFC16 patches 27 repliesSuperseded

changes since v2 from the cover letter

- I know there is some patch on net-next which occurs in merge conflicts, I will wait until this patch is in bluetooth-next before sending as PATCH.
- fix the "ieee820154: 6lowpan: dispatch evaluation rework" by also doing dispatch evaluation on FRAG1. Also we do now FRAG1 uncompression (if iphc) on-the-fly. This is currently solved by doing special lltype handling in generic 6LoWPAN. Maybe we can introduce some "payload_len" parameter to the uncompression functions, to avoid the use of skb->cb.
The complete patch looks different now, I fixup also some other patches into this patch.
Also add skb_unshare on dispatches where we manipulate the skb data. Change address handling for fragmentation for parse again skb_mac_header instead using skb->cb which was filled from lower layer.
- replace the removal of wdev running patch "ieee802154: 6lowpan: change if lowpan dev is running".
- add lowpan_dff dispatch.
- change reserved dispatch values to use ranges.
- add "ieee802154: 6lowpan: register packet layer while open".
- add "ieee802154: 6lowpan: remove check on null".
- change order at "ieee802154: 6lowpan: trivial checks at" to check on "wdev->type != ARPHRD_IEEE802154" at first.
- change "ieee802154: 6lowpan: check on valid 802.15.4 frame", we don't need to check on addr none. Dataframes which belongs to a "node" type should always have source and destination addresses. This need to be handled in the lower layers.
- add "ieee802154: 6lowpan: remove tx full-size" which removes a ugly workaround to calculate the full size of iphc packet. We don't need it since we use FRAG1 uncompression on the fly. Also change this behaviour for transmit and remove the ugly workaround functions.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16ieee802154: 6lowpan: change dev vars to wdev and ldevnet/ieee802154/6lowpan/6lowpan_i.h net/ieee802154/6lowpan/core.c net/ieee802154/6lowpan/reassembly.c +2 more+82 -840 replies
2/16ieee802154: 6lowpan: register packet layer while opennet/ieee802154/6lowpan/core.c+18 -103 replies
3/16ieee802154: 6lowpan: remove check on nullnet/ieee802154/6lowpan/core.c+1 -12 replies
4/16ieee802154: 6lowpan: remove set to zeronet/ieee802154/6lowpan/core.c+0 -20 replies
5/16ieee802154: 6lowpan: remove EXPORT_SYMBOLnet/ieee802154/6lowpan/reassembly.c+0 -10 replies
6/16ieee802154: 6lowpan: change if lowpan dev is runningnet/ieee802154/6lowpan/rx.c+6 -52 replies
7/16ieee802154: 6lowpan: cleanup pull of iphc bytesnet/ieee802154/6lowpan/rx.c+2 -70 replies
8/16ieee802154: 6lowpan: trivial checks at firstnet/ieee802154/6lowpan/rx.c+2 -40 replies
9/16ieee802154: 6lowpan: earlier skb->dev switchnet/ieee802154/6lowpan/rx.c+2 -12 replies
10/16ieee820154: 6lowpan: dispatch evaluation reworkinclude/net/6lowpan.h net/6lowpan/iphc.c net/6lowpan/nhc_udp.c +3 more+278 -1053 replies
11/16ieee802154: 6lowpan: add generic lowpan header checknet/ieee802154/6lowpan/rx.c+27 -10 replies
12/16ieee802154: 6lowpan: add handler for all dispatch valuesnet/ieee802154/6lowpan/rx.c+90 -00 replies
13/16ieee802154: 6lowpan: add check for reserved dispatchnet/ieee802154/6lowpan/rx.c+13 -13 replies
14/16ieee802154: 6lowpan: check on valid 802.15.4 frameinclude/linux/ieee802154.h include/net/mac802154.h net/ieee802154/6lowpan/rx.c+48 -02 replies
15/16ieee802154: 6lowpan: remove packet type to hostnet/ieee802154/6lowpan/rx.c+0 -10 replies
16/16ieee802154: 6lowpan: remove tx full-size calc workaroundinclude/net/6lowpan.h net/ieee802154/6lowpan/tx.c+11 -1202 replies

Reviews trailers per patch

15 of 16 patches have a Reviewed-by or Acked-by.

PatchStefan Schmidt
SeriesT-b
1/16R-b
2/16R-b
3/16R-b
4/16R-b
5/16R-b
6/16R-b
7/16R-b
8/16R-b
9/16R-b
10/16
11/16R-b
12/16R-b
13/16R-b
14/16R-b
15/16R-b
16/16R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [RFCv2 bluetooth-next 00/16] ieee802154: 6lowpan: cleanup and rework dispatch evaluation

Hi,

this patch series contains a rework of 802.15.4 6LoWPAN receive handling. We need to check on some things before which never checked before, like is 802.15.4 dataframe, if we can access skb->data[0] (could be that skb->len is 0 then), etc.

Also various bug fixes like the masking for fragmentation dispatch value which is currently wrong. Also we should again check the dispatch value after successful reassembly a fragment, we currently assume always a iphc header there. This is wrong it could also be a non-compressed header. This can occur if the compressed header is larger than lower interface MTU size, we doesn't react on this while transmit which is another issue. Nevertheless we also don't reach this case at worst-case compression currently.

I introduced a complete new handling for the dispatch values based on mac80211 receive handling mechanism.

- Alex

changes since v2:
- I know there is some patch on net-next which occurs in merge conflicts, I will wait until this patch is in bluetooth-next before sending as PATCH.
- fix the "ieee820154: 6lowpan: dispatch evaluation rework" by also doing dispatch evaluation on FRAG1. Also we do now FRAG1 uncompression (if iphc) on-the-fly. This is currently solved by doing special lltype handling in generic 6LoWPAN. Maybe we can introduce some "payload_len" parameter to the uncompression functions, to avoid the use of skb->cb.
The complete patch looks different now, I fixup also some other patches into this patch.
Also add skb_unshare on dispatches where we manipulate the skb data. Change address handling for fragmentation for parse again skb_mac_header instead using skb->cb which was filled from lower layer.
- replace the removal of wdev running patch "ieee802154: 6lowpan: change if lowpan dev is running".
- add lowpan_dff dispatch.
- change reserved dispatch values to use ranges.
- add "ieee802154: 6lowpan: register packet layer while open".
- add "ieee802154: 6lowpan: remove check on null".
- change order at "ieee802154: 6lowpan: trivial checks at" to check on "wdev->type != ARPHRD_IEEE802154" at first.
- change "ieee802154: 6lowpan: check on valid 802.15.4 frame", we don't need to check on addr none. Dataframes which belongs to a "node" type should always have source and destination addresses. This need to be handled in the lower layers.
- add "ieee802154: 6lowpan: remove tx full-size" which removes a ugly workaround to calculate the full size of iphc packet. We don't need it since we use FRAG1 uncompression on the fly. Also change this behaviour for transmit and remove the ugly workaround functions.

Alexander Aring (16):
ieee802154: 6lowpan: change dev vars to wdev and ldev
ieee802154: 6lowpan: register packet layer while open
ieee802154: 6lowpan: remove check on null
ieee802154: 6lowpan: remove set to zero
ieee802154: 6lowpan: remove EXPORT_SYMBOL
ieee802154: 6lowpan: change if lowpan dev is running
ieee802154: 6lowpan: cleanup pull of iphc bytes
ieee802154: 6lowpan: trivial checks at first
ieee802154: 6lowpan: earlier skb->dev switch
ieee820154: 6lowpan: dispatch evaluation rework
ieee802154: 6lowpan: add generic lowpan header check
ieee802154: 6lowpan: add handler for all dispatch values
ieee802154: 6lowpan: add check for reserved dispatch
ieee802154: 6lowpan: check on valid 802.15.4 frame
ieee802154: 6lowpan: remove packet type to host
ieee802154: 6lowpan: remove tx full-size calc workaround

 include/linux/ieee802154.h          |  25 +++
 include/net/6lowpan.h               | 144 +++------------
 include/net/mac802154.h             |  15 ++
 net/6lowpan/iphc.c                  |  13 +-
 net/6lowpan/nhc_udp.c               |  13 +-
 net/ieee802154/6lowpan/6lowpan_i.h  |  14 +-
 net/ieee802154/6lowpan/core.c       | 115 ++++++------
 net/ieee802154/6lowpan/reassembly.c | 141 ++++++++++-----
 net/ieee802154/6lowpan/rx.c         | 350 ++++++++++++++++++++++++++++--------
 net/ieee802154/6lowpan/tx.c         |  51 +++---
 10 files changed, 559 insertions(+), 322 deletions(-)
Signature · 1 line
2.5.0