]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
IB/core: Add support for multicast loopback blocking
authorRon Livne <ronli@voltaire.com>
Tue, 15 Jul 2008 06:48:48 +0000 (23:48 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 15 Jul 2008 06:48:48 +0000 (23:48 -0700)
This patch also adds a creation flag for QPs,
IB_QP_CREATE_MULTICAST_BLOCK_LOOPBACK, which when set means that
multicast sends from the QP to a group that the QP is attached to will
not be looped back to the QP's receive queue.  This can be used to
save receive resources when a consumer does not want a local copy of
multicast traffic; for example IPoIB must waste CPU time throwing away
such local copies of multicast traffic.

This patch also adds a device capability flag that shows whether a
device supports this feature or not.

Signed-off-by: Ron Livne <ronli@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
include/rdma/ib_verbs.h

index 10ebaaae0161d7474d6578763be8e906022fb846..07b41e05565a50835d3283be4eaaf9767cf6cded 100644 (file)
@@ -104,6 +104,7 @@ enum ib_device_cap_flags {
        IB_DEVICE_UD_IP_CSUM            = (1<<18),
        IB_DEVICE_UD_TSO                = (1<<19),
        IB_DEVICE_MEM_MGT_EXTENSIONS    = (1<<21),
+       IB_DEVICE_BLOCK_MULTICAST_LOOPBACK = (1<<22),
 };
 
 enum ib_atomic_cap {
@@ -555,7 +556,8 @@ enum ib_qp_type {
 };
 
 enum ib_qp_create_flags {
-       IB_QP_CREATE_IPOIB_UD_LSO       = 1 << 0,
+       IB_QP_CREATE_IPOIB_UD_LSO               = 1 << 0,
+       IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK   = 1 << 1,
 };
 
 struct ib_qp_init_attr {