aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/clip.c4
-rw-r--r--net/atm/mpc.c26
-rw-r--r--net/atm/mpoa_caches.c18
3 files changed, 27 insertions, 21 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 5b5b96344ce6..2d33a83be799 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -822,8 +822,8 @@ static void atmarp_info(struct seq_file *seq, struct net_device *dev,
822 seq_printf(seq, "%-6s%-4s%-4s%5ld ", 822 seq_printf(seq, "%-6s%-4s%-4s%5ld ",
823 dev->name, svc ? "SVC" : "PVC", llc ? "LLC" : "NULL", exp); 823 dev->name, svc ? "SVC" : "PVC", llc ? "LLC" : "NULL", exp);
824 824
825 off = scnprintf(buf, sizeof(buf) - 1, "%d.%d.%d.%d", 825 off = scnprintf(buf, sizeof(buf) - 1, "%pI4",
826 NIPQUAD(entry->ip)); 826 &entry->ip);
827 while (off < 16) 827 while (off < 16)
828 buf[off++] = ' '; 828 buf[off++] = ' ';
829 buf[off] = '\0'; 829 buf[off] = '\0';
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 11b16d16661c..010b1d2a5a8f 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -232,8 +232,8 @@ void atm_mpoa_disp_qos(struct seq_file *m)
232 seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n"); 232 seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n");
233 233
234 while (qos != NULL) { 234 while (qos != NULL) {
235 seq_printf(m, "%u.%u.%u.%u\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", 235 seq_printf(m, "%pI4\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n",
236 NIPQUAD(qos->ipaddr), 236 &qos->ipaddr,
237 qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, 237 qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu,
238 qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); 238 qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu);
239 qos = qos->next; 239 qos = qos->next;
@@ -595,8 +595,8 @@ static int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg)
595 if (in_entry != NULL) mpc->in_ops->put(in_entry); 595 if (in_entry != NULL) mpc->in_ops->put(in_entry);
596 return -EINVAL; 596 return -EINVAL;
597 } 597 }
598 printk("mpoa: (%s) mpc_vcc_attach: attaching ingress SVC, entry = %u.%u.%u.%u\n", 598 printk("mpoa: (%s) mpc_vcc_attach: attaching ingress SVC, entry = %pI4\n",
599 mpc->dev->name, NIPQUAD(in_entry->ctrl_info.in_dst_ip)); 599 mpc->dev->name, &in_entry->ctrl_info.in_dst_ip);
600 in_entry->shortcut = vcc; 600 in_entry->shortcut = vcc;
601 mpc->in_ops->put(in_entry); 601 mpc->in_ops->put(in_entry);
602 } else { 602 } else {
@@ -627,8 +627,8 @@ static void mpc_vcc_close(struct atm_vcc *vcc, struct net_device *dev)
627 dprintk("mpoa: (%s) mpc_vcc_close:\n", dev->name); 627 dprintk("mpoa: (%s) mpc_vcc_close:\n", dev->name);
628 in_entry = mpc->in_ops->get_by_vcc(vcc, mpc); 628 in_entry = mpc->in_ops->get_by_vcc(vcc, mpc);
629 if (in_entry) { 629 if (in_entry) {
630 dprintk("mpoa: (%s) mpc_vcc_close: ingress SVC closed ip = %u.%u.%u.%u\n", 630 dprintk("mpoa: (%s) mpc_vcc_close: ingress SVC closed ip = %pI4\n",
631 mpc->dev->name, NIPQUAD(in_entry->ctrl_info.in_dst_ip)); 631 mpc->dev->name, &in_entry->ctrl_info.in_dst_ip);
632 in_entry->shortcut = NULL; 632 in_entry->shortcut = NULL;
633 mpc->in_ops->put(in_entry); 633 mpc->in_ops->put(in_entry);
634 } 634 }
@@ -1098,7 +1098,8 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien
1098 entry->shortcut = eg_entry->shortcut; 1098 entry->shortcut = eg_entry->shortcut;
1099 } 1099 }
1100 if(entry->shortcut){ 1100 if(entry->shortcut){
1101 dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(dst_ip)); 1101 dprintk("mpoa: (%s) using egress SVC to reach %pI4\n",
1102 client->dev->name, &dst_ip);
1102 client->eg_ops->put(eg_entry); 1103 client->eg_ops->put(eg_entry);
1103 return; 1104 return;
1104 } 1105 }
@@ -1123,7 +1124,8 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1123 __be32 dst_ip = msg->content.in_info.in_dst_ip; 1124 __be32 dst_ip = msg->content.in_info.in_dst_ip;
1124 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); 1125 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc);
1125 1126
1126 dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(dst_ip)); 1127 dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %pI4\n",
1128 mpc->dev->name, &dst_ip);
1127 ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry); 1129 ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry);
1128 if(entry == NULL){ 1130 if(entry == NULL){
1129 printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); 1131 printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name);
@@ -1171,14 +1173,14 @@ static void ingress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1171 in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask); 1173 in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask);
1172 1174
1173 if(entry == NULL){ 1175 if(entry == NULL){
1174 printk("mpoa: (%s) ingress_purge_rcvd: purge for a non-existing entry, ", mpc->dev->name); 1176 printk("mpoa: (%s) ingress_purge_rcvd: purge for a non-existing entry, ip = %pI4\n",
1175 printk("ip = %u.%u.%u.%u\n", NIPQUAD(dst_ip)); 1177 mpc->dev->name, &dst_ip);
1176 return; 1178 return;
1177 } 1179 }
1178 1180
1179 do { 1181 do {
1180 dprintk("mpoa: (%s) ingress_purge_rcvd: removing an ingress entry, ip = %u.%u.%u.%u\n" , 1182 dprintk("mpoa: (%s) ingress_purge_rcvd: removing an ingress entry, ip = %pI4\n",
1181 mpc->dev->name, NIPQUAD(dst_ip)); 1183 mpc->dev->name, &dst_ip);
1182 write_lock_bh(&mpc->ingress_lock); 1184 write_lock_bh(&mpc->ingress_lock);
1183 mpc->in_ops->remove_entry(entry, mpc); 1185 mpc->in_ops->remove_entry(entry, mpc);
1184 write_unlock_bh(&mpc->ingress_lock); 1186 write_unlock_bh(&mpc->ingress_lock);
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
index 24799e3e78f7..4504a4b339bb 100644
--- a/net/atm/mpoa_caches.c
+++ b/net/atm/mpoa_caches.c
@@ -94,7 +94,7 @@ static in_cache_entry *in_cache_add_entry(__be32 dst_ip,
94 return NULL; 94 return NULL;
95 } 95 }
96 96
97 dprintk("mpoa: mpoa_caches.c: adding an ingress entry, ip = %u.%u.%u.%u\n", NIPQUAD(dst_ip)); 97 dprintk("mpoa: mpoa_caches.c: adding an ingress entry, ip = %pI4\n", &dst_ip);
98 98
99 atomic_set(&entry->use, 1); 99 atomic_set(&entry->use, 1);
100 dprintk("mpoa: mpoa_caches.c: new_in_cache_entry: about to lock\n"); 100 dprintk("mpoa: mpoa_caches.c: new_in_cache_entry: about to lock\n");
@@ -150,7 +150,8 @@ static int cache_hit(in_cache_entry *entry, struct mpoa_client *mpc)
150 150
151 if( entry->count > mpc->parameters.mpc_p1 && 151 if( entry->count > mpc->parameters.mpc_p1 &&
152 entry->entry_state == INGRESS_INVALID){ 152 entry->entry_state == INGRESS_INVALID){
153 dprintk("mpoa: (%s) mpoa_caches.c: threshold exceeded for ip %u.%u.%u.%u, sending MPOA res req\n", mpc->dev->name, NIPQUAD(entry->ctrl_info.in_dst_ip)); 153 dprintk("mpoa: (%s) mpoa_caches.c: threshold exceeded for ip %pI4, sending MPOA res req\n",
154 mpc->dev->name, &entry->ctrl_info.in_dst_ip);
154 entry->entry_state = INGRESS_RESOLVING; 155 entry->entry_state = INGRESS_RESOLVING;
155 msg.type = SND_MPOA_RES_RQST; 156 msg.type = SND_MPOA_RES_RQST;
156 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN ); 157 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN );
@@ -184,7 +185,8 @@ static void in_cache_remove_entry(in_cache_entry *entry,
184 struct k_message msg; 185 struct k_message msg;
185 186
186 vcc = entry->shortcut; 187 vcc = entry->shortcut;
187 dprintk("mpoa: mpoa_caches.c: removing an ingress entry, ip = %u.%u.%u.%u\n",NIPQUAD(entry->ctrl_info.in_dst_ip)); 188 dprintk("mpoa: mpoa_caches.c: removing an ingress entry, ip = %pI4\n",
189 &entry->ctrl_info.in_dst_ip);
188 190
189 if (entry->prev != NULL) 191 if (entry->prev != NULL)
190 entry->prev->next = entry->next; 192 entry->prev->next = entry->next;
@@ -228,7 +230,8 @@ static void clear_count_and_expired(struct mpoa_client *client)
228 next_entry = entry->next; 230 next_entry = entry->next;
229 if((now.tv_sec - entry->tv.tv_sec) 231 if((now.tv_sec - entry->tv.tv_sec)
230 > entry->ctrl_info.holding_time){ 232 > entry->ctrl_info.holding_time){
231 dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %u.%u.%u.%u\n", NIPQUAD(entry->ctrl_info.in_dst_ip)); 233 dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %pI4\n",
234 &entry->ctrl_info.in_dst_ip);
232 client->in_ops->remove_entry(entry, client); 235 client->in_ops->remove_entry(entry, client);
233 } 236 }
234 entry = next_entry; 237 entry = next_entry;
@@ -453,7 +456,8 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli
453 return NULL; 456 return NULL;
454 } 457 }
455 458
456 dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %u.%u.%u.%u, this should be our IP\n", NIPQUAD(msg->content.eg_info.eg_dst_ip)); 459 dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %pI4, this should be our IP\n",
460 &msg->content.eg_info.eg_dst_ip);
457 461
458 atomic_set(&entry->use, 1); 462 atomic_set(&entry->use, 1);
459 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry: about to lock\n"); 463 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry: about to lock\n");
@@ -469,8 +473,8 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli
469 do_gettimeofday(&(entry->tv)); 473 do_gettimeofday(&(entry->tv));
470 entry->entry_state = EGRESS_RESOLVED; 474 entry->entry_state = EGRESS_RESOLVED;
471 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id)); 475 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id));
472 dprintk("mpoa: mpoa_caches.c: mps_ip = %u.%u.%u.%u\n", 476 dprintk("mpoa: mpoa_caches.c: mps_ip = %pI4\n",
473 NIPQUAD(entry->ctrl_info.mps_ip)); 477 &entry->ctrl_info.mps_ip);
474 atomic_inc(&entry->use); 478 atomic_inc(&entry->use);
475 479
476 write_unlock_irq(&client->egress_lock); 480 write_unlock_irq(&client->egress_lock);