Skip to content

Commit b333b7e

Browse files
signal11davem330
authored andcommitted
6lowpan: consider checksum bytes in fragmentation threshold
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>
1 parent fed2c6f commit b333b7e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎net/ieee802154/6lowpan.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,8 @@ static netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev)
10471047
goto error;
10481048
}
10491049

1050-
if (skb->len <= IEEE802154_MTU) {
1050+
/* Send directly if less than the MTU minus the 2 checksum bytes. */
1051+
if (skb->len <= IEEE802154_MTU - IEEE802154_MFR_SIZE) {
10511052
err = dev_queue_xmit(skb);
10521053
goto out;
10531054
}

0 commit comments

Comments
 (0)