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:	Wed, 2 Dec 2015 12:00:47 +0100
From:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To:	Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc:	davem@...emloft.net, idosch@...lanox.com, eladr@...lanox.com,
	yotamg@...lanox.com, ogerlitz@...lanox.com
Subject: Re: [patch net-next 10/26] bonding: fill-up LAG changeupper info
 struct and pass it along

On 12/01/2015 02:48 PM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...lanox.com>
> 
> Initialize netdev_lag_upper_info structure by TX type according to
> current bonding mode and pass it along via netdev_master_upper_dev_link.
> 
> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
> ---
>  drivers/net/bonding/bond_main.c | 43 +++++++++++++++++++++++++++--------------
>  1 file changed, 29 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index fa3ed1d..8747746 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1198,26 +1198,41 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
>  	return ret;
>  }
>  
> -static int bond_master_upper_dev_link(struct net_device *bond_dev,
> -				      struct net_device *slave_dev,
> -				      struct slave *slave)
> +static enum netdev_lag_tx_type bond_lag_tx_type(struct bonding *bond)
>  {
> +	switch (BOND_MODE(bond)) {
> +	case BOND_MODE_ROUNDROBIN:
> +		return NETDEV_LAG_TX_TYPE_ROUNDROBIN;
> +	case BOND_MODE_ACTIVEBACKUP:
> +		return NETDEV_LAG_TX_TYPE_ACTIVEBACKUP;
> +	case BOND_MODE_XOR:
> +	case BOND_MODE_8023AD:
> +		return NETDEV_LAG_TX_TYPE_HASH;
> +	default:
> +		return NETDEV_LAG_TX_TYPE_UNKNOWN;
> +	}
> +}

Bonding also has the broadcast mode (NETDEV_LAG_TX_BROADCAST).

> +
[snip]

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