[ofa-general] skb queue management in ipoib

Michael S. Tsirkin mst at dev.mellanox.co.il
Mon May 21 23:36:34 PDT 2007


Roland, all,

	currently, IPoIB keeps skb queues while SA query/connection request is
	outstanding.  These queues have a length limit, but once the
	limit is reached, new packets are dropped. Example:

                       if (skb_queue_len(&neigh->queue) < IPOIB_MAX_PATH_REC_QUEUE)
                                __skb_queue_tail(&neigh->queue, skb);
                        else {
                                ipoib_warn(priv, "queue length limit %d. Packet drop.\n",
                                           skb_queue_len(&neigh->queue));
                                goto err_drop;
                        }


	I think that managing this queue in a FIFO manner, dropping
	old packets and inserting new ones instead would be better:
	and older packet has more chance to have been timed out.
	So we would do something along the lines of:

                       __skb_queue_tail(&neigh->queue, skb);
                       if (skb_queue_len(&neigh->queue) > IPOIB_MAX_PATH_REC_QUEUE) {
                                skb = __skb_dequeue_tail(&neigh->queue);
                                ipoib_warn(priv, "queue length limit %d. Packet drop.\n",
                                           skb_queue_len(&neigh->queue));
                                goto err_drop;
                       }

Does this make sense?

-- 
MST



More information about the general mailing list