[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9D1F9FE58F08ED47AA451ABB038550E90A8AF60F@CMEXMB1.ad.emulex.com>
Date: Wed, 21 Nov 2012 14:44:37 +0000
From: "Bandi,Sarveshwar" <Sarveshwar.Bandi@...lex.Com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-2.6] bonding: Bonding driver does not consider the
gso_max_size setting of slaves.
Eric,
I realized the good up and I have reposted this patch. Please review the latest.
Thanks,
Sarvesh
-----Original Message-----
From: Eric Dumazet [mailto:eric.dumazet@...il.com]
Sent: Wednesday, November 21, 2012 8:14 PM
To: Bandi,Sarveshwar
Cc: davem@...emloft.net; netdev@...r.kernel.org
Subject: Re: [PATCH net-2.6] bonding: Bonding driver does not consider the gso_max_size setting of slaves.
On Wed, 2012-11-21 at 16:48 +0530, sarveshwar.bandi@...lex.com wrote:
> From: Sarveshwar Bandi <sarveshwar.bandi@...lex.com>
>
> Patch sets the lowest non-zero gso_max_size value of the slaves during
> enslave and detach.
>
> Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@...lex.com>
> ---
> drivers/net/bonding/bond_main.c | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/net/bonding/bond_main.c
> b/drivers/net/bonding/bond_main.c index b2530b0..5f19d16 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1198,6 +1198,31 @@ static void bond_attach_slave(struct bonding *bond, struct slave *new_slave)
> bond->slave_cnt++;
> }
>
> +static void bond_set_gso_max_size(struct bonding *bond) {
> + struct slave *slave;
> + struct net_device *bond_dev = bond->dev;
> + unsigned int gso_max_size = 0;
> + bool reset_gso_size = true;
> + int i;
> +
> + bond_for_each_slave(bond, slave, i) {
> + if (!slave->dev->gso_max_size)
> + continue;
> +
> + reset_gso_size = false;
> +
> + if (!gso_max_size ||
> + slave->dev->gso_max_size < gso_max_size)
> + gso_max_size = slave->dev->gso_max_size;
> + }
> +
> + if (gso_max_size && gso_max_size < bond_dev->gso_max_size)
> + netif_set_gso_max_size(bond_dev, gso_max_size);
> + else if (reset_gso_size)
> + netif_set_gso_max_size(bond_dev, 0); }
> +
This seems a bit complex, and I have no idea why you call netif_set_gso_max_size(bond_dev, 0);
Default gso_max_size is GSO_MAX_SIZE, not 0
Powered by blists - more mailing lists