[openib-general] [PATCH] IB/ipoib: unlikely in send

Eli cohen eli at dev.mellanox.co.il
Thu Sep 21 06:39:26 PDT 2006


Use unlikely in send flow

Signed-off-by: Eli Cohen <eli at dev.mellanox.co.il>
---

Index: openib-1.1-rc6/drivers/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- openib-1.1-rc6.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2006-09-21 16:19:33.000000000 +0300
+++ openib-1.1-rc6/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2006-09-21 16:20:39.000000000 +0300
@@ -385,7 +385,7 @@
 	struct ipoib_tx_buf *tx_req;
 	dma_addr_t addr;
 
-	if (skb->len > dev->mtu + INFINIBAND_ALEN) {
+	if (unlikely(skb->len > dev->mtu + INFINIBAND_ALEN)) {
 		ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n",
 			   skb->len, dev->mtu + INFINIBAND_ALEN);
 		++priv->stats.tx_dropped;






More information about the general mailing list