Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12406734 authored by Ron Livne's avatar Ron Livne Committed by Roland Dreier
Browse files

IPoIB: Use multicast loopback blocking if available



Set IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK for IPoIB's UD QPs if
supported by the underlying device.  This creates an improvement of up
to 39% in bandwidth when sending multicast packets with IPoIB, and an
improvment of 12% in cpu usage.

Signed-off-by: default avatarRon Livne <ronli@voltaire.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 521e575b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -199,7 +199,10 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca)
	init_attr.recv_cq = priv->recv_cq;

	if (priv->hca_caps & IB_DEVICE_UD_TSO)
		init_attr.create_flags = IB_QP_CREATE_IPOIB_UD_LSO;
		init_attr.create_flags |= IB_QP_CREATE_IPOIB_UD_LSO;

	if (priv->hca_caps & IB_DEVICE_BLOCK_MULTICAST_LOOPBACK)
		init_attr.create_flags |= IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK;

	if (dev->features & NETIF_F_SG)
		init_attr.cap.max_send_sge = MAX_SKB_FRAGS + 1;