<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>No resource tracking per qp for multicast groups</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I noticed that there is no per-qp tracking of multicast groups of which it is a member. Thus, for example, if a user-space app dies without a chance to perform its cleanup, the (nonexistent) QP will still be listed in the HCA firmware as a member of its multicast groups.  This has 2 effects:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">1. The effective number of qp's which can join that multicast group has been reduced (since it has zombie entries).</FONT>

<BR><FONT SIZE=2 FACE="Arial">2. If the above QP gets re-used, it will still be a member of the multicast groups (and therefore receive packets which were not intended for the new user of the QP).</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I suggest tracking mcast group membership in kernel-space only. If we don't wish to change the verbs layer behavior, we can just detach a qp from all its multicast groups (if any) in ib_destroy_qp (although this is not IB compliant -- see IB Spec 11.2.4.4 (we should return an error in this case)).  Otherwise, I think we'll need something messy  (such as an ib_verbs layer function requesting a QP to detach from all its multicast groups.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">My preference is to leave the verbs layer alone as much as possible.  Track the multicast group membership per qp (gid and lid) in struct ib_qp, and make calls in ib_destroy_qp() to ib_mcast_detach().</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Jack</FONT>
</P>

</BODY>
</HTML>