IPoIB: Recycle loopback skbs instead of freeing and reallocating
commit1b844afe9e67d6cd441ae6df71051b4004f31dd2
authorRoland Dreier <rolandd@cisco.com>
Tue, 10 Jul 2007 20:43:53 +0000 (10 13:43 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 10 Jul 2007 20:43:53 +0000 (10 13:43 -0700)
tree4242f07678723cded8e36bd3e4e60d926e08647e
parent8909c571fa1e62e254c4045394e6eaccfadec6f4
IPoIB: Recycle loopback skbs instead of freeing and reallocating

InfiniBand HCAs replicate multicast packets back to the QP that sent
them if that QP is attached to the destination multicast group.  This
means that IPoIB multicasts are often replicated back to the receive
queue of the interface that generated them.  To avoid confusing the
network stack, we drop these duplicates within the IPoIB driver.

However, there's no reason to free the skb that received the duplicate
and then immediately allocate a new skb to post to the receive queue.
We can be more efficient and just repost the same skb.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_ib.c