Skip to content

Commit

Permalink
6lowpan: consider checksum bytes in fragmentation threshold
Browse files Browse the repository at this point in the history
Change the threshold for framentation of a lowpan packet from
using the MTU size to now use the MTU size minus the checksum length,
which is added by the hardware. For IEEE 802.15.4, this effectively
changes it from 127 bytes to 125 bytes.

Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alan Ott authored and David S. Miller committed Nov 30, 2012
1 parent fed2c6f commit b333b7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ieee802154/6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,8 @@ static netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev)
goto error;
}

if (skb->len <= IEEE802154_MTU) {
/* Send directly if less than the MTU minus the 2 checksum bytes. */
if (skb->len <= IEEE802154_MTU - IEEE802154_MFR_SIZE) {
err = dev_queue_xmit(skb);
goto out;
}
Expand Down

0 comments on commit b333b7e

Please sign in to comment.