netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Gospodarek <gospo@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: andy@greyhouse.net, fubar@us.ibm.com, netdev@vger.kernel.org,
	ralf.zeidler@nsn.com
Subject: Re: [PATCH net-next] bonding: remove entries for master_ip and vlan_ip and query devices instead
Date: Wed, 21 Mar 2012 12:25:53 -0400	[thread overview]
Message-ID: <20120321162553.GA11165@quad.redhat.com> (raw)
In-Reply-To: <20120316.225533.1194931730650486577.davem@davemloft.net>

On Fri, Mar 16, 2012 at 10:55:33PM -0700, David Miller wrote:
> From: Andy Gospodarek <andy@greyhouse.net>
> Date: Fri, 16 Mar 2012 09:48:23 -0400
> 
> > On Thu, Mar 15, 2012 at 9:03 PM, Jay Vosburgh <fubar@us.ibm.com> wrote:
> >>>@@ -2618,7 +2624,9 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
> >>>               if (!bond_vlan_used(bond)) {
> >>>                       pr_debug("basa: empty vlan: arp_send\n");
> >>>                       bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
> >>>-                                    bond->master_ip, 0);
> >>>+                                    bond_confirm_addr(bond->dev,
> >>>+                                                      targets[i],
> >>>+                                                      0), 0);
> >>
> >>        Same comment here and for the later calls to bond_confirm_addr,
> >> here putting "targets[i]" and perhaps the 0 on the previous line,
> >> although I'm less sure that it won't look funky.
> >>
> >>        -J
> >>
> > 
> > These we a bit tough to get looking great.  What I did really seemed
> > like the best I could do and keep it to a reasonable length.  If you
> > want me to just keep the length of these lines <100 characters wide, I
> > could combine them into the same line.  Either way is fine with me,
> > but I really just didn't want the code to get too wide and hard to
> > read when using a standard size terminal.
> 
> It seems to me that the easiest thing to do is:
> 
> 	__be32 addr = bond_confirm_addr(bond->dev, targets[i], 0);
> 	bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], addr, 0);
> 
> And actually this sequence is used in three places, so even better
> to put it into a helper function.

For readability it makes sense to pop this function out like you have
suggested.  I'm not sure I want to make a helper function for both
calls, but I'll take a look at post an update patch.

      reply	other threads:[~2012-03-21 19:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 16:21 [PATCH net-next] bonding: remove entries for master_ip and vlan_ip and query devices instead Andy Gospodarek
2012-03-16  1:03 ` Jay Vosburgh
2012-03-16 13:48   ` Andy Gospodarek
2012-03-17  5:55     ` David Miller
2012-03-21 16:25       ` Andy Gospodarek [this message]

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=20120321162553.GA11165@quad.redhat.com \
    --to=gospo@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=ralf.zeidler@nsn.com \
    /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).