[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54B6FD60.8020106@gmail.com>
Date: Wed, 14 Jan 2015 15:36:00 -0800
From: John Fastabend <john.fastabend@...il.com>
To: "Arad, Ronen" <ronen.arad@...el.com>
CC: "roopa@...ulusnetworks.com" <roopa@...ulusnetworks.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"shemminger@...tta.com" <shemminger@...tta.com>,
"vyasevic@...hat.com" <vyasevic@...hat.com>,
"tgraf@...g.ch" <tgraf@...g.ch>,
"jhs@...atatu.com" <jhs@...atatu.com>,
"sfeldma@...il.com" <sfeldma@...il.com>,
"jiri@...nulli.us" <jiri@...nulli.us>,
"wkok@...ulusnetworks.com" <wkok@...ulusnetworks.com>
Subject: Re: [PATCH net-next] bridge: fix setlink/dellink notifications
On 01/14/2015 03:22 PM, Arad, Ronen wrote:
>
>
>> -----Original Message-----
>> From: netdev-owner@...r.kernel.org [mailto:netdev-owner@...r.kernel.org] On
>> Behalf Of roopa@...ulusnetworks.com
>> Sent: Tuesday, January 13, 2015 10:49 PM
>> To: netdev@...r.kernel.org; shemminger@...tta.com; vyasevic@...hat.com;
>> john.fastabend@...il.com; tgraf@...g.ch; jhs@...atatu.com; sfeldma@...il.com;
>> jiri@...nulli.us
>> Cc: wkok@...ulusnetworks.com
>> Subject: [PATCH net-next] bridge: fix setlink/dellink notifications
>>
>> From: Roopa Prabhu <roopa@...ulusnetworks.com>
>>
> [..]
[...]
>> err = dev->netdev_ops->ndo_bridge_setlink(dev, nlh);
>> -
>> - if (!err)
>> + if (!err) {
>> flags &= ~BRIDGE_FLAGS_SELF;
>> +
>> + /* Generate event to notify upper layer of bridge
>> + * change
>> + */
>> + if (!err)
>> + err = rtnl_bridge_notify(dev, oflags);
>> + }
>> }
>>
>> if (have_flags)
>> memcpy(nla_data(attr), &flags, sizeof(flags));
>
> What is the purpose of the above two lines (not changed by the patch)?
> They seem to copy over the flags with the successfully applied cases
> (MASTER and/or SELF) flags cleared back into the incoming netlink message.
> I could not figure any place where the modified flags attribute is used
This allows userspace to learn which operation failed when it is an
operation to set both the software bridge via BRIDGE_FLAGS_MASTER and
the the hardware via BRIDGE_FLAGS_SELF. When we get the error back
software looks at the flags to figure out how to recover/retry/etc.
.John
--
John Fastabend Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists