lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 05 Dec 2014 06:04:44 -0800
From:	Roopa Prabhu <roopa@...ulusnetworks.com>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
CC:	jiri@...nulli.us, sfeldma@...il.com, jhs@...atatu.com,
	bcrl@...ck.org, tgraf@...g.ch, john.fastabend@...il.com,
	stephen@...workplumber.org, linville@...driver.com,
	nhorman@...driver.com, nicolas.dichtel@...nd.com,
	vyasevic@...hat.com, f.fainelli@...il.com, buytenh@...tstofly.org,
	aviadr@...lanox.com, netdev@...r.kernel.org, davem@...emloft.net,
	shm@...ulusnetworks.com, gospo@...ulusnetworks.com
Subject: Re: [PATCH 2/3] bridge: offload bridge port attributes to switch
 asic if feature flag set

ack again, will fix the formatting issues. thanks

On 12/5/14, 5:21 AM, Sergei Shtylyov wrote:
> Hello.
>
> On 12/5/2014 5:26 AM, roopa@...ulusnetworks.com wrote:
>
>> From: Roopa Prabhu <roopa@...ulusnetworks.com>
>
>> This allows offloading to switch asic without having the user to set
>> any flag. And this is done in the bridge driver to rollback kernel 
>> settings
>> on hw offload failure if required in the future.
>
>> With this, it also makes sure a notification goes out only after the
>> attributes are set both in the kernel and hw.
>> ---
>>   net/bridge/br_netlink.c |   27 ++++++++++++++++++++++++++-
>>   1 file changed, 26 insertions(+), 1 deletion(-)
>
>> diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
>> index 9f5eb55..ce173f0 100644
>> --- a/net/bridge/br_netlink.c
>> +++ b/net/bridge/br_netlink.c
>> @@ -407,9 +407,21 @@ int br_setlink(struct net_device *dev, struct 
>> nlmsghdr *nlh)
>>                   afspec, RTM_SETLINK);
>>       }
>>
>> +    if ((dev->features & NETIF_F_HW_SWITCH_OFFLOAD) &&
>> +            dev->netdev_ops->ndo_bridge_setlink) {
>> +        int ret = dev->netdev_ops->ndo_bridge_setlink(dev, nlh);
>
>    Need empty line after declaration.
>
>> +        if (ret && ret != -EOPNOTSUPP) {
>> +            /* XXX Fix this in the future to rollback
>> +             * kernel settings and return error
>> +             */
>> +            br_warn(p->br, "error offloading bridge attributes "
>> +                    "on port %u(%s)\n", (unsigned int) p->port_no,
>
>    Don't break up the message strings. Also, your continuation lines 
> should start under the next character after ( on the first line.
>
>> +                    p->dev->name);
>> +        }
>> +    }
>> +
>>       if (err == 0)
>>           br_ifinfo_notify(RTM_NEWLINK, p);
>> -
>
>    Why?
>
>>   out:
>>       return err;
>>   }
>> @@ -433,6 +445,19 @@ int br_dellink(struct net_device *dev, struct 
>> nlmsghdr *nlh)
>>       err = br_afspec((struct net_bridge *)netdev_priv(dev), p,
>>               afspec, RTM_DELLINK);
>>
>> +    if (dev->features & NETIF_F_HW_SWITCH_OFFLOAD
>> +            && dev->netdev_ops->ndo_bridge_setlink) {
>> +        int ret = dev->netdev_ops->ndo_bridge_dellink(dev, nlh);
>> +        if (ret && ret != -EOPNOTSUPP) {
>> +            /* XXX Fix this in the future to rollback
>> +             * kernel settings and return error
>> +             */
>> +            br_warn(p->br, "error offloading bridge attributes "
>> +                    "on port %u(%s)\n", (unsigned int) p->port_no,
>> +                    p->dev->name);
>
>    Same comments here.
>
>> +        }
>> +    }
>> +
>>       return err;
>>   }
>>   static int br_validate(struct nlattr *tb[], struct nlattr *data[])
>
> WBR, Sergei
>
> -- 
> 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

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ