From: David Miller <davem@davemloft.net>
To: andy@greyhouse.net
Cc: 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: Fri, 16 Mar 2012 22:55:33 -0700 (PDT) [thread overview]
Message-ID: <20120316.225533.1194931730650486577.davem@davemloft.net> (raw)
In-Reply-To: <CAHashqDhq20rqeOEdB0onOkV9yGF-dDKh22Ea4ra1KG21Uc9xQ@mail.gmail.com>
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.
next prev parent reply other threads:[~2012-03-17 5:55 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 [this message]
2012-03-21 16:25 ` Andy Gospodarek
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=20120316.225533.1194931730650486577.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andy@greyhouse.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).