diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-10-29 01:37:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-29 02:02:36 -0400 |
commit | fcace2fe7a86237c451b09aaf7e2e9d19e09887f (patch) | |
tree | c8ffce0ee37b0e659af53ce40a956c2f4a91bfb3 /drivers | |
parent | 8867cd7c8678ff2d9d0382dbbfbcc7a3e7e61cbc (diff) |
infiniband: ipoib replace IPOIB_GID_FMT with %p6
Replace all uses of IPOIB_GID_FMT, IPOIB_GID_RAW_ARG() and IPOIB_GID_ARG()
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_cm.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 25 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 70 |
3 files changed, 45 insertions, 58 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 7b14c2c39500..d98d87bfe365 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -1128,8 +1128,8 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn, | |||
1128 | goto err_send_cm; | 1128 | goto err_send_cm; |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | ipoib_dbg(priv, "Request connection 0x%x for gid " IPOIB_GID_FMT " qpn 0x%x\n", | 1131 | ipoib_dbg(priv, "Request connection 0x%x for gid %p6 qpn 0x%x\n", |
1132 | p->qp->qp_num, IPOIB_GID_ARG(pathrec->dgid), qpn); | 1132 | p->qp->qp_num, pathrec->dgid.raw, qpn); |
1133 | 1133 | ||
1134 | return 0; | 1134 | return 0; |
1135 | 1135 | ||
@@ -1276,8 +1276,8 @@ void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx) | |||
1276 | if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &tx->flags)) { | 1276 | if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &tx->flags)) { |
1277 | list_move(&tx->list, &priv->cm.reap_list); | 1277 | list_move(&tx->list, &priv->cm.reap_list); |
1278 | queue_work(ipoib_workqueue, &priv->cm.reap_task); | 1278 | queue_work(ipoib_workqueue, &priv->cm.reap_task); |
1279 | ipoib_dbg(priv, "Reap connection for gid " IPOIB_GID_FMT "\n", | 1279 | ipoib_dbg(priv, "Reap connection for gid %p6\n", |
1280 | IPOIB_GID_ARG(tx->neigh->dgid)); | 1280 | tx->neigh->dgid.raw); |
1281 | tx->neigh = NULL; | 1281 | tx->neigh = NULL; |
1282 | } | 1282 | } |
1283 | } | 1283 | } |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index fddded7900d1..e7f4f94c3e92 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -359,9 +359,9 @@ void ipoib_mark_paths_invalid(struct net_device *dev) | |||
359 | spin_lock_irq(&priv->lock); | 359 | spin_lock_irq(&priv->lock); |
360 | 360 | ||
361 | list_for_each_entry_safe(path, tp, &priv->path_list, list) { | 361 | list_for_each_entry_safe(path, tp, &priv->path_list, list) { |
362 | ipoib_dbg(priv, "mark path LID 0x%04x GID " IPOIB_GID_FMT " invalid\n", | 362 | ipoib_dbg(priv, "mark path LID 0x%04x GID %p6 invalid\n", |
363 | be16_to_cpu(path->pathrec.dlid), | 363 | be16_to_cpu(path->pathrec.dlid), |
364 | IPOIB_GID_ARG(path->pathrec.dgid)); | 364 | path->pathrec.dgid.raw); |
365 | path->valid = 0; | 365 | path->valid = 0; |
366 | } | 366 | } |
367 | 367 | ||
@@ -413,11 +413,11 @@ static void path_rec_completion(int status, | |||
413 | unsigned long flags; | 413 | unsigned long flags; |
414 | 414 | ||
415 | if (!status) | 415 | if (!status) |
416 | ipoib_dbg(priv, "PathRec LID 0x%04x for GID " IPOIB_GID_FMT "\n", | 416 | ipoib_dbg(priv, "PathRec LID 0x%04x for GID %p6\n", |
417 | be16_to_cpu(pathrec->dlid), IPOIB_GID_ARG(pathrec->dgid)); | 417 | be16_to_cpu(pathrec->dlid), pathrec->dgid.raw); |
418 | else | 418 | else |
419 | ipoib_dbg(priv, "PathRec status %d for GID " IPOIB_GID_FMT "\n", | 419 | ipoib_dbg(priv, "PathRec status %d for GID %p6\n", |
420 | status, IPOIB_GID_ARG(path->pathrec.dgid)); | 420 | status, path->pathrec.dgid.raw); |
421 | 421 | ||
422 | skb_queue_head_init(&skqueue); | 422 | skb_queue_head_init(&skqueue); |
423 | 423 | ||
@@ -527,8 +527,8 @@ static int path_rec_start(struct net_device *dev, | |||
527 | { | 527 | { |
528 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 528 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
529 | 529 | ||
530 | ipoib_dbg(priv, "Start path record lookup for " IPOIB_GID_FMT "\n", | 530 | ipoib_dbg(priv, "Start path record lookup for %p6\n", |
531 | IPOIB_GID_ARG(path->pathrec.dgid)); | 531 | path->pathrec.dgid.raw); |
532 | 532 | ||
533 | init_completion(&path->done); | 533 | init_completion(&path->done); |
534 | 534 | ||
@@ -764,12 +764,11 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
764 | 764 | ||
765 | if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) && | 765 | if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) && |
766 | (be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) { | 766 | (be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) { |
767 | ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x " | 767 | ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %p6\n", |
768 | IPOIB_GID_FMT "\n", | ||
769 | skb->dst ? "neigh" : "dst", | 768 | skb->dst ? "neigh" : "dst", |
770 | be16_to_cpup((__be16 *) skb->data), | 769 | be16_to_cpup((__be16 *) skb->data), |
771 | IPOIB_QPN(phdr->hwaddr), | 770 | IPOIB_QPN(phdr->hwaddr), |
772 | IPOIB_GID_RAW_ARG(phdr->hwaddr + 4)); | 771 | phdr->hwaddr + 4); |
773 | dev_kfree_skb_any(skb); | 772 | dev_kfree_skb_any(skb); |
774 | ++dev->stats.tx_dropped; | 773 | ++dev->stats.tx_dropped; |
775 | return NETDEV_TX_OK; | 774 | return NETDEV_TX_OK; |
@@ -845,9 +844,9 @@ static void ipoib_neigh_cleanup(struct neighbour *n) | |||
845 | else | 844 | else |
846 | return; | 845 | return; |
847 | ipoib_dbg(priv, | 846 | ipoib_dbg(priv, |
848 | "neigh_cleanup for %06x " IPOIB_GID_FMT "\n", | 847 | "neigh_cleanup for %06x %p6\n", |
849 | IPOIB_QPN(n->ha), | 848 | IPOIB_QPN(n->ha), |
850 | IPOIB_GID_RAW_ARG(n->ha + 4)); | 849 | n->ha + 4); |
851 | 850 | ||
852 | spin_lock_irqsave(&priv->lock, flags); | 851 | spin_lock_irqsave(&priv->lock, flags); |
853 | 852 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index d9d1223c3fd5..0de79cf4c07c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -71,9 +71,8 @@ static void ipoib_mcast_free(struct ipoib_mcast *mcast) | |||
71 | struct ipoib_neigh *neigh, *tmp; | 71 | struct ipoib_neigh *neigh, *tmp; |
72 | int tx_dropped = 0; | 72 | int tx_dropped = 0; |
73 | 73 | ||
74 | ipoib_dbg_mcast(netdev_priv(dev), | 74 | ipoib_dbg_mcast(netdev_priv(dev), "deleting multicast group %p6\n", |
75 | "deleting multicast group " IPOIB_GID_FMT "\n", | 75 | mcast->mcmember.mgid.raw); |
76 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | ||
77 | 76 | ||
78 | spin_lock_irq(&priv->lock); | 77 | spin_lock_irq(&priv->lock); |
79 | 78 | ||
@@ -205,9 +204,8 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
205 | 204 | ||
206 | if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { | 205 | if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { |
207 | if (test_and_set_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { | 206 | if (test_and_set_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { |
208 | ipoib_warn(priv, "multicast group " IPOIB_GID_FMT | 207 | ipoib_warn(priv, "multicast group %p6 already attached\n", |
209 | " already attached\n", | 208 | mcast->mcmember.mgid.raw); |
210 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | ||
211 | 209 | ||
212 | return 0; | 210 | return 0; |
213 | } | 211 | } |
@@ -215,9 +213,8 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
215 | ret = ipoib_mcast_attach(dev, be16_to_cpu(mcast->mcmember.mlid), | 213 | ret = ipoib_mcast_attach(dev, be16_to_cpu(mcast->mcmember.mlid), |
216 | &mcast->mcmember.mgid, set_qkey); | 214 | &mcast->mcmember.mgid, set_qkey); |
217 | if (ret < 0) { | 215 | if (ret < 0) { |
218 | ipoib_warn(priv, "couldn't attach QP to multicast group " | 216 | ipoib_warn(priv, "couldn't attach QP to multicast group %p6\n", |
219 | IPOIB_GID_FMT "\n", | 217 | mcast->mcmember.mgid.raw); |
220 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | ||
221 | 218 | ||
222 | clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags); | 219 | clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags); |
223 | return ret; | 220 | return ret; |
@@ -248,9 +245,8 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
248 | mcast->ah = ah; | 245 | mcast->ah = ah; |
249 | spin_unlock_irq(&priv->lock); | 246 | spin_unlock_irq(&priv->lock); |
250 | 247 | ||
251 | ipoib_dbg_mcast(priv, "MGID " IPOIB_GID_FMT | 248 | ipoib_dbg_mcast(priv, "MGID %p6 AV %p, LID 0x%04x, SL %d\n", |
252 | " AV %p, LID 0x%04x, SL %d\n", | 249 | mcast->mcmember.mgid.raw, |
253 | IPOIB_GID_ARG(mcast->mcmember.mgid), | ||
254 | mcast->ah->ah, | 250 | mcast->ah->ah, |
255 | be16_to_cpu(mcast->mcmember.mlid), | 251 | be16_to_cpu(mcast->mcmember.mlid), |
256 | mcast->mcmember.sl); | 252 | mcast->mcmember.sl); |
@@ -295,9 +291,8 @@ ipoib_mcast_sendonly_join_complete(int status, | |||
295 | 291 | ||
296 | if (status) { | 292 | if (status) { |
297 | if (mcast->logcount++ < 20) | 293 | if (mcast->logcount++ < 20) |
298 | ipoib_dbg_mcast(netdev_priv(dev), "multicast join failed for " | 294 | ipoib_dbg_mcast(netdev_priv(dev), "multicast join failed for %p6, status %d\n", |
299 | IPOIB_GID_FMT ", status %d\n", | 295 | mcast->mcmember.mgid.raw, status); |
300 | IPOIB_GID_ARG(mcast->mcmember.mgid), status); | ||
301 | 296 | ||
302 | /* Flush out any queued packets */ | 297 | /* Flush out any queued packets */ |
303 | netif_tx_lock_bh(dev); | 298 | netif_tx_lock_bh(dev); |
@@ -356,9 +351,8 @@ static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast) | |||
356 | ipoib_warn(priv, "ib_sa_join_multicast failed (ret = %d)\n", | 351 | ipoib_warn(priv, "ib_sa_join_multicast failed (ret = %d)\n", |
357 | ret); | 352 | ret); |
358 | } else { | 353 | } else { |
359 | ipoib_dbg_mcast(priv, "no multicast record for " IPOIB_GID_FMT | 354 | ipoib_dbg_mcast(priv, "no multicast record for %p6, starting join\n", |
360 | ", starting join\n", | 355 | mcast->mcmember.mgid.raw); |
361 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | ||
362 | } | 356 | } |
363 | 357 | ||
364 | return ret; | 358 | return ret; |
@@ -386,9 +380,8 @@ static int ipoib_mcast_join_complete(int status, | |||
386 | struct net_device *dev = mcast->dev; | 380 | struct net_device *dev = mcast->dev; |
387 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 381 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
388 | 382 | ||
389 | ipoib_dbg_mcast(priv, "join completion for " IPOIB_GID_FMT | 383 | ipoib_dbg_mcast(priv, "join completion for %p6 (status %d)\n", |
390 | " (status %d)\n", | 384 | mcast->mcmember.mgid.raw, status); |
391 | IPOIB_GID_ARG(mcast->mcmember.mgid), status); | ||
392 | 385 | ||
393 | /* We trap for port events ourselves. */ | 386 | /* We trap for port events ourselves. */ |
394 | if (status == -ENETRESET) | 387 | if (status == -ENETRESET) |
@@ -417,15 +410,11 @@ static int ipoib_mcast_join_complete(int status, | |||
417 | 410 | ||
418 | if (mcast->logcount++ < 20) { | 411 | if (mcast->logcount++ < 20) { |
419 | if (status == -ETIMEDOUT) { | 412 | if (status == -ETIMEDOUT) { |
420 | ipoib_dbg_mcast(priv, "multicast join failed for " IPOIB_GID_FMT | 413 | ipoib_dbg_mcast(priv, "multicast join failed for %p6, status %d\n", |
421 | ", status %d\n", | 414 | mcast->mcmember.mgid.raw, status); |
422 | IPOIB_GID_ARG(mcast->mcmember.mgid), | ||
423 | status); | ||
424 | } else { | 415 | } else { |
425 | ipoib_warn(priv, "multicast join failed for " | 416 | ipoib_warn(priv, "multicast join failed for %p6, status %d\n", |
426 | IPOIB_GID_FMT ", status %d\n", | 417 | mcast->mcmember.mgid.raw, status); |
427 | IPOIB_GID_ARG(mcast->mcmember.mgid), | ||
428 | status); | ||
429 | } | 418 | } |
430 | } | 419 | } |
431 | 420 | ||
@@ -457,8 +446,7 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast, | |||
457 | ib_sa_comp_mask comp_mask; | 446 | ib_sa_comp_mask comp_mask; |
458 | int ret = 0; | 447 | int ret = 0; |
459 | 448 | ||
460 | ipoib_dbg_mcast(priv, "joining MGID " IPOIB_GID_FMT "\n", | 449 | ipoib_dbg_mcast(priv, "joining MGID %p6\n", mcast->mcmember.mgid.raw); |
461 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | ||
462 | 450 | ||
463 | rec.mgid = mcast->mcmember.mgid; | 451 | rec.mgid = mcast->mcmember.mgid; |
464 | rec.port_gid = priv->local_gid; | 452 | rec.port_gid = priv->local_gid; |
@@ -643,8 +631,8 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast) | |||
643 | ib_sa_free_multicast(mcast->mc); | 631 | ib_sa_free_multicast(mcast->mc); |
644 | 632 | ||
645 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { | 633 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { |
646 | ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n", | 634 | ipoib_dbg_mcast(priv, "leaving MGID %p6\n", |
647 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | 635 | mcast->mcmember.mgid.raw); |
648 | 636 | ||
649 | /* Remove ourselves from the multicast group */ | 637 | /* Remove ourselves from the multicast group */ |
650 | ret = ib_detach_mcast(priv->qp, &mcast->mcmember.mgid, | 638 | ret = ib_detach_mcast(priv->qp, &mcast->mcmember.mgid, |
@@ -675,8 +663,8 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb) | |||
675 | mcast = __ipoib_mcast_find(dev, mgid); | 663 | mcast = __ipoib_mcast_find(dev, mgid); |
676 | if (!mcast) { | 664 | if (!mcast) { |
677 | /* Let's create a new send only group now */ | 665 | /* Let's create a new send only group now */ |
678 | ipoib_dbg_mcast(priv, "setting up send only multicast group for " | 666 | ipoib_dbg_mcast(priv, "setting up send only multicast group for %p6\n", |
679 | IPOIB_GID_FMT "\n", IPOIB_GID_RAW_ARG(mgid)); | 667 | mgid); |
680 | 668 | ||
681 | mcast = ipoib_mcast_alloc(dev, 0); | 669 | mcast = ipoib_mcast_alloc(dev, 0); |
682 | if (!mcast) { | 670 | if (!mcast) { |
@@ -809,14 +797,14 @@ void ipoib_mcast_restart_task(struct work_struct *work) | |||
809 | /* ignore group which is directly joined by userspace */ | 797 | /* ignore group which is directly joined by userspace */ |
810 | if (test_bit(IPOIB_FLAG_UMCAST, &priv->flags) && | 798 | if (test_bit(IPOIB_FLAG_UMCAST, &priv->flags) && |
811 | !ib_sa_get_mcmember_rec(priv->ca, priv->port, &mgid, &rec)) { | 799 | !ib_sa_get_mcmember_rec(priv->ca, priv->port, &mgid, &rec)) { |
812 | ipoib_dbg_mcast(priv, "ignoring multicast entry for mgid " | 800 | ipoib_dbg_mcast(priv, "ignoring multicast entry for mgid %p6\n", |
813 | IPOIB_GID_FMT "\n", IPOIB_GID_ARG(mgid)); | 801 | mgid.raw); |
814 | continue; | 802 | continue; |
815 | } | 803 | } |
816 | 804 | ||
817 | /* Not found or send-only group, let's add a new entry */ | 805 | /* Not found or send-only group, let's add a new entry */ |
818 | ipoib_dbg_mcast(priv, "adding multicast entry for mgid " | 806 | ipoib_dbg_mcast(priv, "adding multicast entry for mgid %p6\n", |
819 | IPOIB_GID_FMT "\n", IPOIB_GID_ARG(mgid)); | 807 | mgid.raw); |
820 | 808 | ||
821 | nmcast = ipoib_mcast_alloc(dev, 0); | 809 | nmcast = ipoib_mcast_alloc(dev, 0); |
822 | if (!nmcast) { | 810 | if (!nmcast) { |
@@ -849,8 +837,8 @@ void ipoib_mcast_restart_task(struct work_struct *work) | |||
849 | list_for_each_entry_safe(mcast, tmcast, &priv->multicast_list, list) { | 837 | list_for_each_entry_safe(mcast, tmcast, &priv->multicast_list, list) { |
850 | if (!test_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags) && | 838 | if (!test_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags) && |
851 | !test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { | 839 | !test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { |
852 | ipoib_dbg_mcast(priv, "deleting multicast group " IPOIB_GID_FMT "\n", | 840 | ipoib_dbg_mcast(priv, "deleting multicast group %p6\n", |
853 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | 841 | mcast->mcmember.mgid.raw); |
854 | 842 | ||
855 | rb_erase(&mcast->rb_node, &priv->multicast_tree); | 843 | rb_erase(&mcast->rb_node, &priv->multicast_tree); |
856 | 844 | ||