diff options
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/mpc.c | 13 | ||||
-rw-r--r-- | net/atm/mpoa_caches.c | 12 |
2 files changed, 7 insertions, 18 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index c304ef1513b9..a48a5d580408 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -229,20 +229,15 @@ int atm_mpoa_delete_qos(struct atm_mpoa_qos *entry) | |||
229 | /* this is buggered - we need locking for qos_head */ | 229 | /* this is buggered - we need locking for qos_head */ |
230 | void atm_mpoa_disp_qos(struct seq_file *m) | 230 | void atm_mpoa_disp_qos(struct seq_file *m) |
231 | { | 231 | { |
232 | unsigned char *ip; | ||
233 | char ipaddr[16]; | ||
234 | struct atm_mpoa_qos *qos; | 232 | struct atm_mpoa_qos *qos; |
235 | 233 | ||
236 | qos = qos_head; | 234 | qos = qos_head; |
237 | seq_printf(m, "QoS entries for shortcuts:\n"); | 235 | seq_printf(m, "QoS entries for shortcuts:\n"); |
238 | 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"); | 236 | 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"); |
239 | 237 | ||
240 | ipaddr[sizeof(ipaddr)-1] = '\0'; | ||
241 | while (qos != NULL) { | 238 | while (qos != NULL) { |
242 | ip = (unsigned char *)&qos->ipaddr; | ||
243 | sprintf(ipaddr, "%u.%u.%u.%u", NIPQUAD(ip)); | ||
244 | seq_printf(m, "%u.%u.%u.%u\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", | 239 | seq_printf(m, "%u.%u.%u.%u\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", |
245 | NIPQUAD(ipaddr), | 240 | NIPQUAD(qos->ipaddr), |
246 | qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, | 241 | qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, |
247 | qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); | 242 | qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); |
248 | qos = qos->next; | 243 | qos = qos->next; |
@@ -1083,7 +1078,6 @@ static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *mpc) | |||
1083 | static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry) | 1078 | static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry) |
1084 | { | 1079 | { |
1085 | uint32_t dst_ip = msg->content.in_info.in_dst_ip; | 1080 | uint32_t dst_ip = msg->content.in_info.in_dst_ip; |
1086 | unsigned char *ip __attribute__ ((unused)) = (unsigned char *)&dst_ip; | ||
1087 | struct atm_mpoa_qos *qos = atm_mpoa_search_qos(dst_ip); | 1081 | struct atm_mpoa_qos *qos = atm_mpoa_search_qos(dst_ip); |
1088 | eg_cache_entry *eg_entry = client->eg_ops->get_by_src_ip(dst_ip, client); | 1082 | eg_cache_entry *eg_entry = client->eg_ops->get_by_src_ip(dst_ip, client); |
1089 | 1083 | ||
@@ -1097,7 +1091,7 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien | |||
1097 | entry->shortcut = eg_entry->shortcut; | 1091 | entry->shortcut = eg_entry->shortcut; |
1098 | } | 1092 | } |
1099 | if(entry->shortcut){ | 1093 | if(entry->shortcut){ |
1100 | dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(ip)); | 1094 | dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(dst_ip)); |
1101 | client->eg_ops->put(eg_entry); | 1095 | client->eg_ops->put(eg_entry); |
1102 | return; | 1096 | return; |
1103 | } | 1097 | } |
@@ -1123,8 +1117,7 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc) | |||
1123 | 1117 | ||
1124 | uint32_t dst_ip = msg->content.in_info.in_dst_ip; | 1118 | uint32_t dst_ip = msg->content.in_info.in_dst_ip; |
1125 | in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); | 1119 | in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); |
1126 | ip = (unsigned char *)&dst_ip; | 1120 | 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 %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(ip)); | ||
1128 | ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry); | 1121 | ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry); |
1129 | if(entry == NULL){ | 1122 | if(entry == NULL){ |
1130 | printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); | 1123 | printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); |
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c index 64ddebb64060..781ed1b9329d 100644 --- a/net/atm/mpoa_caches.c +++ b/net/atm/mpoa_caches.c | |||
@@ -223,7 +223,6 @@ static void in_cache_remove_entry(in_cache_entry *entry, | |||
223 | but an easy one... */ | 223 | but an easy one... */ |
224 | static void clear_count_and_expired(struct mpoa_client *client) | 224 | static void clear_count_and_expired(struct mpoa_client *client) |
225 | { | 225 | { |
226 | unsigned char *ip; | ||
227 | in_cache_entry *entry, *next_entry; | 226 | in_cache_entry *entry, *next_entry; |
228 | struct timeval now; | 227 | struct timeval now; |
229 | 228 | ||
@@ -236,8 +235,7 @@ static void clear_count_and_expired(struct mpoa_client *client) | |||
236 | next_entry = entry->next; | 235 | next_entry = entry->next; |
237 | if((now.tv_sec - entry->tv.tv_sec) | 236 | if((now.tv_sec - entry->tv.tv_sec) |
238 | > entry->ctrl_info.holding_time){ | 237 | > entry->ctrl_info.holding_time){ |
239 | ip = (unsigned char*)&entry->ctrl_info.in_dst_ip; | 238 | dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %u.%u.%u.%u\n", NIPQUAD(entry->ctrl_info.in_dst_ip)); |
240 | dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %u.%u.%u.%u\n", NIPQUAD(ip)); | ||
241 | client->in_ops->remove_entry(entry, client); | 239 | client->in_ops->remove_entry(entry, client); |
242 | } | 240 | } |
243 | entry = next_entry; | 241 | entry = next_entry; |
@@ -455,7 +453,6 @@ static void eg_cache_remove_entry(eg_cache_entry *entry, | |||
455 | 453 | ||
456 | static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_client *client) | 454 | static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_client *client) |
457 | { | 455 | { |
458 | unsigned char *ip; | ||
459 | eg_cache_entry *entry = kmalloc(sizeof(eg_cache_entry), GFP_KERNEL); | 456 | eg_cache_entry *entry = kmalloc(sizeof(eg_cache_entry), GFP_KERNEL); |
460 | 457 | ||
461 | if (entry == NULL) { | 458 | if (entry == NULL) { |
@@ -463,8 +460,7 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli | |||
463 | return NULL; | 460 | return NULL; |
464 | } | 461 | } |
465 | 462 | ||
466 | ip = (unsigned char *)&msg->content.eg_info.eg_dst_ip; | 463 | 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)); |
467 | dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %u.%u.%u.%u, this should be our IP\n", NIPQUAD(ip)); | ||
468 | memset(entry, 0, sizeof(eg_cache_entry)); | 464 | memset(entry, 0, sizeof(eg_cache_entry)); |
469 | 465 | ||
470 | atomic_set(&entry->use, 1); | 466 | atomic_set(&entry->use, 1); |
@@ -481,8 +477,8 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli | |||
481 | do_gettimeofday(&(entry->tv)); | 477 | do_gettimeofday(&(entry->tv)); |
482 | entry->entry_state = EGRESS_RESOLVED; | 478 | entry->entry_state = EGRESS_RESOLVED; |
483 | dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id)); | 479 | dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id)); |
484 | ip = (unsigned char *)&entry->ctrl_info.mps_ip; | 480 | dprintk("mpoa: mpoa_caches.c: mps_ip = %u.%u.%u.%u\n", |
485 | dprintk("mpoa: mpoa_caches.c: mps_ip = %u.%u.%u.%u\n", NIPQUAD(ip)); | 481 | NIPQUAD(entry->ctrl_info.mps_ip)); |
486 | atomic_inc(&entry->use); | 482 | atomic_inc(&entry->use); |
487 | 483 | ||
488 | write_unlock_irq(&client->egress_lock); | 484 | write_unlock_irq(&client->egress_lock); |