[ofa-general] [PATCH] IB/ipoib: Add likely in data path

Eli Cohen eli at mellanox.co.il
Wed Oct 17 02:18:39 PDT 2007


Add likely in data path

For connected mode, it is likely that if the neighbour has a cm
object than IPOIB_FLAG_OPER_UP is set.

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

---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 894b1dc..350a048 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -680,7 +680,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		neigh = *to_ipoib_neigh(skb->dst->neighbour);
 
 		if (ipoib_cm_get(neigh)) {
-			if (ipoib_cm_up(neigh)) {
+			if (likely(ipoib_cm_up(neigh))) {
 				ipoib_cm_send(dev, skb, ipoib_cm_get(neigh));
 				goto out;
 			}
-- 
1.5.3.4





More information about the general mailing list