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] [day] [month] [year] [list]
Date:	Sun, 22 Mar 2015 20:53:27 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Mahesh Bandewar <maheshb@...gle.com>,
	Jay Vosburgh <j.vosburgh@...il.com>,
	Andy Gospodarek <andy@...yhouse.net>,
	Veaceslav Falico <vfalico@...il.com>,
	Nikolay Aleksandrov <nikolay@...hat.com>,
	David Miller <davem@...emloft.net>
CC:	Maciej Zenczykowski <maze@...gle.com>,
	netdev <netdev@...r.kernel.org>,
	Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next v2 1/4] bonding: Handle notifications during
 work-queue processing gracefully

Hello.

On 3/21/2015 8:39 AM, Mahesh Bandewar wrote:

> RTNL is required for sending notifications and if rtnl can not be
> acquired, current code skips sending notification. This is especially
> bad if the monitoring values selected are large.

> This patch adds a bitmask and uses a bit per such work-queue and attempts
> to reschedule the work (aggressively) until notifications are sent out and
> then resumes the regular cycle.

> Signed-off-by: Mahesh Bandewar <maheshb@...gle.com>
> ---
>   include/net/bonding.h | 19 +++++++++++++++++++
>   1 file changed, 19 insertions(+)

> diff --git a/include/net/bonding.h b/include/net/bonding.h
> index 0ac45b4f7f2a..fede3ab4bbcf 100644
> --- a/include/net/bonding.h
> +++ b/include/net/bonding.h
[...]
> @@ -259,6 +260,24 @@ struct bond_vlan_tag {
>   	unsigned short	vlan_id;
>   };
>
> +typedef enum {
> +	BOND_MII_NOTIF = 0,
> +	BOND_ARP_NOTIF,
> +	BOND_AD_NOTIF,
> +} bond_notif_pending_t;
> +
> +static inline bool bond_get_notif_pending(struct bonding *bond,
> +					  bond_notif_pending_t bit)
> +{
> +	return !!test_and_clear_bit(bit, &bond->notif_work_mask);
> +}
> +
> +static inline void bond_set_notif_pending(struct bonding *bond,
> +					  bond_notif_pending_t bit)
> +{
> +		set_bit(bit, &bond->notif_work_mask);

    One tab to many here. :-)

> +}
> +
>   /**
>    * Returns NULL if the net_device does not belong to any of the bond's slaves
>    *

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ