aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_cm.c4
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c30
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c10
3 files changed, 22 insertions, 22 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 4248c3139364..181b1f32325f 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -1394,8 +1394,8 @@ void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,
1394 struct ipoib_dev_priv *priv = netdev_priv(dev); 1394 struct ipoib_dev_priv *priv = netdev_priv(dev);
1395 int e = skb_queue_empty(&priv->cm.skb_queue); 1395 int e = skb_queue_empty(&priv->cm.skb_queue);
1396 1396
1397 if (skb->dst) 1397 if (skb_dst(skb))
1398 skb->dst->ops->update_pmtu(skb->dst, mtu); 1398 skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu);
1399 1399
1400 skb_queue_tail(&priv->cm.skb_queue, skb); 1400 skb_queue_tail(&priv->cm.skb_queue, skb);
1401 if (e) 1401 if (e)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 69c6304cc943..e319d91f60a6 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -561,7 +561,7 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
561 struct ipoib_neigh *neigh; 561 struct ipoib_neigh *neigh;
562 unsigned long flags; 562 unsigned long flags;
563 563
564 neigh = ipoib_neigh_alloc(skb->dst->neighbour, skb->dev); 564 neigh = ipoib_neigh_alloc(skb_dst(skb)->neighbour, skb->dev);
565 if (!neigh) { 565 if (!neigh) {
566 ++dev->stats.tx_dropped; 566 ++dev->stats.tx_dropped;
567 dev_kfree_skb_any(skb); 567 dev_kfree_skb_any(skb);
@@ -570,9 +570,9 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
570 570
571 spin_lock_irqsave(&priv->lock, flags); 571 spin_lock_irqsave(&priv->lock, flags);
572 572
573 path = __path_find(dev, skb->dst->neighbour->ha + 4); 573 path = __path_find(dev, skb_dst(skb)->neighbour->ha + 4);
574 if (!path) { 574 if (!path) {
575 path = path_rec_create(dev, skb->dst->neighbour->ha + 4); 575 path = path_rec_create(dev, skb_dst(skb)->neighbour->ha + 4);
576 if (!path) 576 if (!path)
577 goto err_path; 577 goto err_path;
578 578
@@ -605,7 +605,7 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
605 goto err_drop; 605 goto err_drop;
606 } 606 }
607 } else 607 } else
608 ipoib_send(dev, skb, path->ah, IPOIB_QPN(skb->dst->neighbour->ha)); 608 ipoib_send(dev, skb, path->ah, IPOIB_QPN(skb_dst(skb)->neighbour->ha));
609 } else { 609 } else {
610 neigh->ah = NULL; 610 neigh->ah = NULL;
611 611
@@ -635,15 +635,15 @@ static void ipoib_path_lookup(struct sk_buff *skb, struct net_device *dev)
635 struct ipoib_dev_priv *priv = netdev_priv(skb->dev); 635 struct ipoib_dev_priv *priv = netdev_priv(skb->dev);
636 636
637 /* Look up path record for unicasts */ 637 /* Look up path record for unicasts */
638 if (skb->dst->neighbour->ha[4] != 0xff) { 638 if (skb_dst(skb)->neighbour->ha[4] != 0xff) {
639 neigh_add_path(skb, dev); 639 neigh_add_path(skb, dev);
640 return; 640 return;
641 } 641 }
642 642
643 /* Add in the P_Key for multicasts */ 643 /* Add in the P_Key for multicasts */
644 skb->dst->neighbour->ha[8] = (priv->pkey >> 8) & 0xff; 644 skb_dst(skb)->neighbour->ha[8] = (priv->pkey >> 8) & 0xff;
645 skb->dst->neighbour->ha[9] = priv->pkey & 0xff; 645 skb_dst(skb)->neighbour->ha[9] = priv->pkey & 0xff;
646 ipoib_mcast_send(dev, skb->dst->neighbour->ha + 4, skb); 646 ipoib_mcast_send(dev, skb_dst(skb)->neighbour->ha + 4, skb);
647} 647}
648 648
649static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev, 649static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
@@ -708,16 +708,16 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
708 struct ipoib_neigh *neigh; 708 struct ipoib_neigh *neigh;
709 unsigned long flags; 709 unsigned long flags;
710 710
711 if (likely(skb->dst && skb->dst->neighbour)) { 711 if (likely(skb_dst(skb) && skb_dst(skb)->neighbour)) {
712 if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) { 712 if (unlikely(!*to_ipoib_neigh(skb_dst(skb)->neighbour))) {
713 ipoib_path_lookup(skb, dev); 713 ipoib_path_lookup(skb, dev);
714 return NETDEV_TX_OK; 714 return NETDEV_TX_OK;
715 } 715 }
716 716
717 neigh = *to_ipoib_neigh(skb->dst->neighbour); 717 neigh = *to_ipoib_neigh(skb_dst(skb)->neighbour);
718 718
719 if (unlikely((memcmp(&neigh->dgid.raw, 719 if (unlikely((memcmp(&neigh->dgid.raw,
720 skb->dst->neighbour->ha + 4, 720 skb_dst(skb)->neighbour->ha + 4,
721 sizeof(union ib_gid))) || 721 sizeof(union ib_gid))) ||
722 (neigh->dev != dev))) { 722 (neigh->dev != dev))) {
723 spin_lock_irqsave(&priv->lock, flags); 723 spin_lock_irqsave(&priv->lock, flags);
@@ -743,7 +743,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
743 return NETDEV_TX_OK; 743 return NETDEV_TX_OK;
744 } 744 }
745 } else if (neigh->ah) { 745 } else if (neigh->ah) {
746 ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(skb->dst->neighbour->ha)); 746 ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(skb_dst(skb)->neighbour->ha));
747 return NETDEV_TX_OK; 747 return NETDEV_TX_OK;
748 } 748 }
749 749
@@ -772,7 +772,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
772 if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) && 772 if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) &&
773 (be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) { 773 (be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) {
774 ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %pI6\n", 774 ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %pI6\n",
775 skb->dst ? "neigh" : "dst", 775 skb_dst(skb) ? "neigh" : "dst",
776 be16_to_cpup((__be16 *) skb->data), 776 be16_to_cpup((__be16 *) skb->data),
777 IPOIB_QPN(phdr->hwaddr), 777 IPOIB_QPN(phdr->hwaddr),
778 phdr->hwaddr + 4); 778 phdr->hwaddr + 4);
@@ -817,7 +817,7 @@ static int ipoib_hard_header(struct sk_buff *skb,
817 * destination address onto the front of the skb so we can 817 * destination address onto the front of the skb so we can
818 * figure out where to send the packet later. 818 * figure out where to send the packet later.
819 */ 819 */
820 if ((!skb->dst || !skb->dst->neighbour) && daddr) { 820 if ((!skb_dst(skb) || !skb_dst(skb)->neighbour) && daddr) {
821 struct ipoib_pseudoheader *phdr = 821 struct ipoib_pseudoheader *phdr =
822 (struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr); 822 (struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr);
823 memcpy(phdr->hwaddr, daddr, INFINIBAND_ALEN); 823 memcpy(phdr->hwaddr, daddr, INFINIBAND_ALEN);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 425e31112ed7..a0e97532e714 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -261,7 +261,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
261 261
262 skb->dev = dev; 262 skb->dev = dev;
263 263
264 if (!skb->dst || !skb->dst->neighbour) { 264 if (!skb_dst(skb) || !skb_dst(skb)->neighbour) {
265 /* put pseudoheader back on for next time */ 265 /* put pseudoheader back on for next time */
266 skb_push(skb, sizeof (struct ipoib_pseudoheader)); 266 skb_push(skb, sizeof (struct ipoib_pseudoheader));
267 } 267 }
@@ -707,10 +707,10 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)
707 707
708out: 708out:
709 if (mcast && mcast->ah) { 709 if (mcast && mcast->ah) {
710 if (skb->dst && 710 if (skb_dst(skb) &&
711 skb->dst->neighbour && 711 skb_dst(skb)->neighbour &&
712 !*to_ipoib_neigh(skb->dst->neighbour)) { 712 !*to_ipoib_neigh(skb_dst(skb)->neighbour)) {
713 struct ipoib_neigh *neigh = ipoib_neigh_alloc(skb->dst->neighbour, 713 struct ipoib_neigh *neigh = ipoib_neigh_alloc(skb_dst(skb)->neighbour,
714 skb->dev); 714 skb->dev);
715 715
716 if (neigh) { 716 if (neigh) {