]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipoib: Fix thinko in packet length checks
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>
Wed, 21 Mar 2007 13:45:05 +0000 (15:45 +0200)
committerRoland Dreier <rolandd@cisco.com>
Thu, 22 Mar 2007 21:40:16 +0000 (14:40 -0700)
commit77960312da2a37287b9f074246f3b366f30a79de
treed52442b5807bef8cfb7a8267d1d824012828c569
parent4cb5f359b6f6e4784fd95e0a075953b9795d2794
IB/ipoib: Fix thinko in packet length checks

The packet length checks in ipoib are broken: we add 4 bytes (IPoIB
encapsulation header) when sending a packet, not 20 bytes (hardware
address length) to each packet.  Therefore, if connected mode is
enabled so that the interface MTU is larger than the multicast MTU,
IPoIB may end up trying to send too-long multicast packets.  For
example, multicast is broken if a message of size 2048 bytes is sent
on an interface with UD MTU 2048, because 2048 is bigger than the real
limit of 2044 but the code tests against the wrong limit of 2060.

This patch fixes <https://bugs.openfabrics.org/show_bug.cgi?id=418>,
submitted by Scott Weitzenkamp <sweitzen@cisco.com>.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c