linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 2/3] net/bonding: Return nothing for not applicable values
Date: Wed, 28 Nov 2007 17:13:15 -0800	[thread overview]
Message-ID: <26966.1196298795@death> (raw)
In-Reply-To: <87wss3jin5.fsf@szonett.ki.iif.hu>


>The previous code returned '\n' (that is, a single empty line)
>from most files, with one exception (xmit_hash_policy), where
>it returned 'NA\n'.  This patch consolidates each file to return
>nothing at all if not applicable, not even a '\n'.
>
>I find this behaviour more usual, more useful, more efficient
>and shorter to code from both sides.
[...]
>+	if ((bond->params.mode == BOND_MODE_XOR) ||
>+	    (bond->params.mode == BOND_MODE_8023AD)) {
> 		count = sprintf(buf, "%s %d\n",
> 			xmit_hashtype_tbl[bond->params.xmit_policy].modename,
> 			bond->params.xmit_policy);

	Rather than this (returning nothing if not in xor or 802.3ad
mode), I'd prefer to see this always return whatever the xmit policy is
(regardless of the mode), and remove the mode test from
bonding_store_xmit_hash().

	This would be consistent with the way the arp_ip_target option
is treated: the actual value is always displayed, even if it is not
used, and it is legal to change the value, regardless of the mode.

	Other than this, I'm fine with the changes.

	-J

---
	-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com

  parent reply	other threads:[~2007-11-29  1:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-28  0:52 [PATCH 2/3] net/bonding: Return nothing for not applicable values =?utf-8?q?Ferenc_W=C3=A1gner?=
2007-11-28  0:49 ` [PATCH 1/3] Remove trailing NULs from network bonding sysfs interface =?utf-8?q?Ferenc_W=C3=A1gner?=
2007-11-28  3:49   ` Randy Dunlap
2007-11-28  8:47     ` Wagner Ferenc
2007-11-28 15:38       ` Randy Dunlap
2007-11-29  0:16         ` [PATCH 4/3] net/bonding: Adhere to coding style: break line after the if condition =?utf-8?q?Ferenc_W=C3=A1gner?=
2007-11-29  1:01           ` Randy Dunlap
2007-11-29  1:13 ` Jay Vosburgh [this message]
2007-12-02 12:42   ` [PATCH 1/5] Remove trailing NULs from network bonding sysfs interface Wagner Ferenc
2007-12-02 13:09   ` [PATCH 2/5] net/bonding: Return nothing for not applicable values Wagner Ferenc
2007-12-02 13:09   ` [PATCH 3/5] net/bonding: Purely cosmetic: rename a local variable Wagner Ferenc
2007-12-02 13:10   ` [PATCH 4/5] net/bonding: Adhere to coding style: break line after the if condition Wagner Ferenc
2007-12-02 13:11   ` [PATCH 5/5] net/bonding: Allow setting and querying xmit policy regardless of mode Wagner Ferenc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26966.1196298795@death \
    --to=fubar@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wferi@niif.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).