[PATCH] IPoIB: Fix SA client retransmission strategy
authorHal Rosenstock <halr@voltaire.com>
Sun, 18 Sep 2005 20:47:53 +0000 (13:47 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 19 Sep 2005 05:02:38 +0000 (22:02 -0700)
We got a little mixed up with what the backoff member holds in the
IPoIB multicast group structure: sometimes it was used as a number of
seconds, and sometimes it was used as a number of jiffies.  Fix the
code so that backoff is always in seconds.

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_multicast.c

index aca7aea18a69006ed0b403a439611c66dd0f9781..3aab4d85abfc67575d210a22c41d81195dd978c2 100644 (file)
@@ -145,7 +145,7 @@ static struct ipoib_mcast *ipoib_mcast_alloc(struct net_device *dev,
 
        mcast->dev = dev;
        mcast->created = jiffies;
-       mcast->backoff = HZ;
+       mcast->backoff = 1;
        mcast->logcount = 0;
 
        INIT_LIST_HEAD(&mcast->list);
@@ -396,7 +396,7 @@ static void ipoib_mcast_join_complete(int status,
                        IPOIB_GID_ARG(mcast->mcmember.mgid), status);
 
        if (!status && !ipoib_mcast_join_finish(mcast, mcmember)) {
-               mcast->backoff = HZ;
+               mcast->backoff = 1;
                down(&mcast_mutex);
                if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
                        queue_work(ipoib_workqueue, &priv->mcast_task);
@@ -496,7 +496,7 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast,
                if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
                        queue_delayed_work(ipoib_workqueue,
                                           &priv->mcast_task,
-                                          mcast->backoff);
+                                          mcast->backoff * HZ);
                up(&mcast_mutex);
        } else
                mcast->query_id = ret;