[IPoIB] Only report IP addresses for adapters that have
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 7 Dec 2005 23:43:18 +0000 (23:43 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 7 Dec 2005 23:43:18 +0000 (23:43 +0000)
a non-zero packet filter.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@199 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_ibat.c

index a49e0c5..f6a8b75 100644 (file)
@@ -200,6 +200,19 @@ __ibat_get_ips(
                        continue;\r
 \r
                cl_obj_lock( &pAdapter->obj );\r
+\r
+               /*\r
+                * Only report IP addresses for adapters that have a non-zero\r
+                * packet filter since user-mode removal events are generated\r
+                * after the packet filter is cleared, but before the adapter\r
+                * is destroyed.\r
+                */\r
+               if( !pAdapter->packet_filter )\r
+               {\r
+                       cl_obj_unlock( &pAdapter->obj );\r
+                       continue;\r
+               }\r
+\r
                nIps += (LONG)cl_vector_get_size( &pAdapter->ip_vector );\r
 \r
                for( idx = 0;\r