aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-11-20 13:48:23 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-20 13:48:23 -0500
commitf44ea623443ee0bec266d62f1cd346881224d47d (patch)
tree6fc50fb77a463af11b45c7161ad382712e62a7bb
parentace5f1d425beaa272b6e91cecc87b2c075d7feb2 (diff)
parent073ae841d6a5098f7c6e17fc1f329350d950d1ce (diff)
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband: IPoIB: Clear high octet in QP number
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 1eaf00e9862c..85522daeb946 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -49,6 +49,8 @@
49 49
50#include <net/dst.h> 50#include <net/dst.h>
51 51
52#define IPOIB_QPN(ha) (be32_to_cpup((__be32 *) ha) & 0xffffff)
53
52MODULE_AUTHOR("Roland Dreier"); 54MODULE_AUTHOR("Roland Dreier");
53MODULE_DESCRIPTION("IP-over-InfiniBand net driver"); 55MODULE_DESCRIPTION("IP-over-InfiniBand net driver");
54MODULE_LICENSE("Dual BSD/GPL"); 56MODULE_LICENSE("Dual BSD/GPL");
@@ -520,8 +522,7 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
520 memcpy(&neigh->dgid.raw, &path->pathrec.dgid.raw, 522 memcpy(&neigh->dgid.raw, &path->pathrec.dgid.raw,
521 sizeof(union ib_gid)); 523 sizeof(union ib_gid));
522 524
523 ipoib_send(dev, skb, path->ah, 525 ipoib_send(dev, skb, path->ah, IPOIB_QPN(skb->dst->neighbour->ha));
524 be32_to_cpup((__be32 *) skb->dst->neighbour->ha));
525 } else { 526 } else {
526 neigh->ah = NULL; 527 neigh->ah = NULL;
527 __skb_queue_tail(&neigh->queue, skb); 528 __skb_queue_tail(&neigh->queue, skb);
@@ -599,8 +600,7 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
599 ipoib_dbg(priv, "Send unicast ARP to %04x\n", 600 ipoib_dbg(priv, "Send unicast ARP to %04x\n",
600 be16_to_cpu(path->pathrec.dlid)); 601 be16_to_cpu(path->pathrec.dlid));
601 602
602 ipoib_send(dev, skb, path->ah, 603 ipoib_send(dev, skb, path->ah, IPOIB_QPN(phdr->hwaddr));
603 be32_to_cpup((__be32 *) phdr->hwaddr));
604 } else if ((path->query || !path_rec_start(dev, path)) && 604 } else if ((path->query || !path_rec_start(dev, path)) &&
605 skb_queue_len(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) { 605 skb_queue_len(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) {
606 /* put pseudoheader back on for next time */ 606 /* put pseudoheader back on for next time */
@@ -661,8 +661,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
661 goto out; 661 goto out;
662 } 662 }
663 663
664 ipoib_send(dev, skb, neigh->ah, 664 ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(skb->dst->neighbour->ha));
665 be32_to_cpup((__be32 *) skb->dst->neighbour->ha));
666 goto out; 665 goto out;
667 } 666 }
668 667
@@ -694,7 +693,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
694 IPOIB_GID_FMT "\n", 693 IPOIB_GID_FMT "\n",
695 skb->dst ? "neigh" : "dst", 694 skb->dst ? "neigh" : "dst",
696 be16_to_cpup((__be16 *) skb->data), 695 be16_to_cpup((__be16 *) skb->data),
697 be32_to_cpup((__be32 *) phdr->hwaddr), 696 IPOIB_QPN(phdr->hwaddr),
698 IPOIB_GID_RAW_ARG(phdr->hwaddr + 4)); 697 IPOIB_GID_RAW_ARG(phdr->hwaddr + 4));
699 dev_kfree_skb_any(skb); 698 dev_kfree_skb_any(skb);
700 ++priv->stats.tx_dropped; 699 ++priv->stats.tx_dropped;
@@ -777,7 +776,7 @@ static void ipoib_neigh_destructor(struct neighbour *n)
777 776
778 ipoib_dbg(priv, 777 ipoib_dbg(priv,
779 "neigh_destructor for %06x " IPOIB_GID_FMT "\n", 778 "neigh_destructor for %06x " IPOIB_GID_FMT "\n",
780 be32_to_cpup((__be32 *) n->ha), 779 IPOIB_QPN(n->ha),
781 IPOIB_GID_RAW_ARG(n->ha + 4)); 780 IPOIB_GID_RAW_ARG(n->ha + 4));
782 781
783 spin_lock_irqsave(&priv->lock, flags); 782 spin_lock_irqsave(&priv->lock, flags);