From patchwork Tue Nov 4 01:05:29 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Vosburgh X-Patchwork-Id: 7028 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 1ED50DDE1E for ; Tue, 4 Nov 2008 12:05:43 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754354AbYKDBFg (ORCPT ); Mon, 3 Nov 2008 20:05:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752918AbYKDBFg (ORCPT ); Mon, 3 Nov 2008 20:05:36 -0500 Received: from e31.co.us.ibm.com ([32.97.110.149]:58719 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754040AbYKDBFf (ORCPT ); Mon, 3 Nov 2008 20:05:35 -0500 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e31.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id mA414oV5016790 for ; Mon, 3 Nov 2008 18:04:50 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id mA415Y1G118682 for ; Mon, 3 Nov 2008 18:05:34 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id mA4153r5029340 for ; Mon, 3 Nov 2008 18:05:04 -0700 Received: from death.nxdomain.ibm.com (sig-9-48-84-242.mts.ibm.com [9.48.84.242]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id mA4152Cc029191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Nov 2008 18:05:03 -0700 Received: from localhost ([127.0.0.1] helo=death.nxdomain.ibm.com) by death.nxdomain.ibm.com with esmtp (Exim 4.69) (envelope-from ) id 1KxAML-0003uN-9Z; Mon, 03 Nov 2008 17:05:29 -0800 From: Jay Vosburgh To: netdev@vger.kernel.org Cc: Harvey Harrison Subject: %pI4 vs. NIPQUAD: %pI4 doing it wrong? X-Mailer: MH-E 8.0.3; nmh 1.3-RC3; GNU Emacs 22.2.1 Date: Mon, 03 Nov 2008 17:05:29 -0800 Message-ID: <15026.1225760729@death.nxdomain.ibm.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Running the latest net-next-2.6, I notice that %pI4 is apparently printing IPv4 addresses incorrectly (and differently than the NIPQUAD it replaced). The following is excerpted from the bonding driver's /proc/net/bonding/bond0 status file: [...] ARP IP target/s (n.n.n.n form): 01.0.1.1 (10.0.1.1), 01.02.03.04 (10.20.30.40) The first (incorrect) values are from %pI4, the ones in parentheses (which are correct) I added as a check using NIPQUAD with this patch: Is anybody else seeing this, or is it just me? I'm working on an x86. -J --- -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 56c823c..ced12ba 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3289,7 +3289,9 @@ static void bond_info_show_master(struct seq_file *seq) continue; if (printed) seq_printf(seq, ","); - seq_printf(seq, " %pI4", &bond->params.arp_targets[i]); + seq_printf(seq, " %pI4 (%u.%u.%u.%u)", + &bond->params.arp_targets[i], + NIPQUAD(bond->params.arp_targets[i])); printed = 1; } seq_printf(seq, "\n");