[ofa-general] Re: [PATCH] IB/ipoib: fix thinko in packet length checks

Michael S. Tsirkin mst at dev.mellanox.co.il
Thu Mar 22 10:54:16 PDT 2007


> Quoting Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [PATCH] IB/ipoib: fix thinko in packet length checks
> 
> > And by the way, the chunk in the datagram part looks the same.
> 
> Which chunk?

Original ipoib code had this:

        if (unlikely(skb->len > dev->mtu + INFINIBAND_ALEN)) {
                ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n",
                           skb->len, dev->mtu + INFINIBAND_ALEN);
                ++priv->stats.tx_dropped;
                ++priv->stats.tx_errors;
                dev_kfree_skb_any(skb);
                return;
        }

so length is compared to mtu + encap length here.

-- 
MST



More information about the general mailing list