提交 e4477031 编写于 作者: R Roland Dreier

RDMA/nes: Print IPv4 addresses in a readable format

Use NIPQUAD_FMT instead of printing raw 32-bit hex quantities in
debugging output.
Acked-by: NGlenn Streiff <gstreiff@neteffect.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 2bd01c5d
...@@ -139,8 +139,9 @@ static int nes_inetaddr_event(struct notifier_block *notifier, ...@@ -139,8 +139,9 @@ static int nes_inetaddr_event(struct notifier_block *notifier,
addr = ntohl(ifa->ifa_address); addr = ntohl(ifa->ifa_address);
mask = ntohl(ifa->ifa_mask); mask = ntohl(ifa->ifa_mask);
nes_debug(NES_DBG_NETDEV, "nes_inetaddr_event: ip address %08X, netmask %08X.\n", nes_debug(NES_DBG_NETDEV, "nes_inetaddr_event: ip address " NIPQUAD_FMT
addr, mask); ", netmask " NIPQUAD_FMT ".\n",
HIPQUAD(addr), HIPQUAD(mask));
list_for_each_entry(nesdev, &nes_dev_list, list) { list_for_each_entry(nesdev, &nes_dev_list, list) {
nes_debug(NES_DBG_NETDEV, "Nesdev list entry = 0x%p. (%s)\n", nes_debug(NES_DBG_NETDEV, "Nesdev list entry = 0x%p. (%s)\n",
nesdev, nesdev->netdev[0]->name); nesdev, nesdev->netdev[0]->name);
......
...@@ -852,8 +852,8 @@ static struct nes_cm_node *find_node(struct nes_cm_core *cm_core, ...@@ -852,8 +852,8 @@ static struct nes_cm_node *find_node(struct nes_cm_core *cm_core,
/* get a handle on the hte */ /* get a handle on the hte */
hte = &cm_core->connected_nodes; hte = &cm_core->connected_nodes;
nes_debug(NES_DBG_CM, "Searching for an owner node:%x:%x from core %p->%p\n", nes_debug(NES_DBG_CM, "Searching for an owner node: " NIPQUAD_FMT ":%x from core %p->%p\n",
loc_addr, loc_port, cm_core, hte); HIPQUAD(loc_addr), loc_port, cm_core, hte);
/* walk list and find cm_node associated with this session ID */ /* walk list and find cm_node associated with this session ID */
spin_lock_irqsave(&cm_core->ht_lock, flags); spin_lock_irqsave(&cm_core->ht_lock, flags);
...@@ -902,8 +902,8 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core, ...@@ -902,8 +902,8 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core,
} }
spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
nes_debug(NES_DBG_CM, "Unable to find listener- %x:%x\n", nes_debug(NES_DBG_CM, "Unable to find listener for " NIPQUAD_FMT ":%x\n",
dst_addr, dst_port); HIPQUAD(dst_addr), dst_port);
/* no listener */ /* no listener */
return NULL; return NULL;
...@@ -1067,8 +1067,9 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, ...@@ -1067,8 +1067,9 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,
cm_node->loc_port = cm_info->loc_port; cm_node->loc_port = cm_info->loc_port;
cm_node->rem_port = cm_info->rem_port; cm_node->rem_port = cm_info->rem_port;
cm_node->send_write0 = send_first; cm_node->send_write0 = send_first;
nes_debug(NES_DBG_CM, "Make node addresses : loc = %x:%x, rem = %x:%x\n", nes_debug(NES_DBG_CM, "Make node addresses : loc = " NIPQUAD_FMT ":%x, rem = " NIPQUAD_FMT ":%x\n",
cm_node->loc_addr, cm_node->loc_port, cm_node->rem_addr, cm_node->rem_port); HIPQUAD(cm_node->loc_addr), cm_node->loc_port,
HIPQUAD(cm_node->rem_addr), cm_node->rem_port);
cm_node->listener = listener; cm_node->listener = listener;
cm_node->netdev = nesvnic->netdev; cm_node->netdev = nesvnic->netdev;
cm_node->cm_id = cm_info->cm_id; cm_node->cm_id = cm_info->cm_id;
......
...@@ -660,7 +660,9 @@ int nes_arp_table(struct nes_device *nesdev, u32 ip_addr, u8 *mac_addr, u32 acti ...@@ -660,7 +660,9 @@ int nes_arp_table(struct nes_device *nesdev, u32 ip_addr, u8 *mac_addr, u32 acti
/* DELETE or RESOLVE */ /* DELETE or RESOLVE */
if (arp_index == nesadapter->arp_table_size) { if (arp_index == nesadapter->arp_table_size) {
nes_debug(NES_DBG_NETDEV, "mac address not in ARP table - cannot delete or resolve\n"); nes_debug(NES_DBG_NETDEV, "MAC for " NIPQUAD_FMT " not in ARP table - cannot %s\n",
HIPQUAD(ip_addr),
action == NES_ARP_RESOLVE ? "resolve" : "delete");
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册