aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-03-20 13:08:26 -0500
committerRoland Dreier <rolandd@cisco.com>2006-03-20 13:08:26 -0500
commitbfef73fa78ca1e56175dcbd33aa11de4764f85a5 (patch)
tree4d0021bcdd8e27891f2e1e1caa2b0c97f7c91d1d /drivers
parente10e271bfd295bf805dc294460868e1deb938211 (diff)
IPoIB: Get rid of useless test of queue length
In neigh_add_path(), the queue of delayed packets can never be full, because the queue is always freshly created and cannot be found by any other code path. In fact, the test of the queue length is worse than useless: if somehow the test ever triggered and path_rec_start() also failed, then dev_kfree_skb_any() will be called twice on the same skb. Fix this by deleting the useless test. Pointed out by Michael S. Tsirkin <mst@mellanox.co.il>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 1633aadae421..0ebacd558ff6 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -519,12 +519,7 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
519 be32_to_cpup((__be32 *) skb->dst->neighbour->ha)); 519 be32_to_cpup((__be32 *) skb->dst->neighbour->ha));
520 } else { 520 } else {
521 neigh->ah = NULL; 521 neigh->ah = NULL;
522 if (skb_queue_len(&neigh->queue) < IPOIB_MAX_PATH_REC_QUEUE) { 522 __skb_queue_tail(&neigh->queue, skb);
523 __skb_queue_tail(&neigh->queue, skb);
524 } else {
525 ++priv->stats.tx_dropped;
526 dev_kfree_skb_any(skb);
527 }
528 523
529 if (!path->query && path_rec_start(dev, path)) 524 if (!path->query && path_rec_start(dev, path))
530 goto err; 525 goto err;