[ofa-general] RE: [PATCH/RFC] RDMA/nes: Print IPv4 addresses in a readable format

Glenn Streiff gstreiff at NetEffect.com
Wed Apr 23 11:52:48 PDT 2008


Acked-by: Glenn Streiff <gstreiff at neteffect.com>

thanks!

> Use NIPQUAD_FMT instead of printing raw 32-bit hex quantities in
> debugging output.
> 
> Signed-off-by: Roland Dreier <rolandd at cisco.com>
> ---
>  drivers/infiniband/hw/nes/nes.c       |    5 +++--
>  drivers/infiniband/hw/nes/nes_cm.c    |   13 +++++++------
>  drivers/infiniband/hw/nes/nes_utils.c |    4 +++-
>  3 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/nes/nes.c  b/drivers/infiniband/hw/nes/nes.c
> index c0671ad..a4e9269 100644
> --- a/drivers/infiniband/hw/nes/nes.c
> +++ b/drivers/infiniband/hw/nes/nes.c
> @@ -139,8 +139,9 @@ static int nes_inetaddr_event(struct notifier_block *notifier,
>  
>  	addr = ntohl(ifa->ifa_address);
>  	mask = ntohl(ifa->ifa_mask);
> -	nes_debug(NES_DBG_NETDEV, "nes_inetaddr_event: ip address %08X, netmask %08X.\n",
> -			addr, mask);
> +	nes_debug(NES_DBG_NETDEV, "nes_inetaddr_event: ip address " NIPQUAD_FMT
> +		  ", netmask " NIPQUAD_FMT ".\n",
> +		  HIPQUAD(addr), HIPQUAD(mask));
>  	list_for_each_entry(nesdev, &nes_dev_list, list) {
>  		nes_debug(NES_DBG_NETDEV, "Nesdev list entry = 0x%p. (%s)\n",
>  				nesdev, nesdev->netdev[0]->name);
> ...



More information about the general mailing list