From: Eric Dumazet <eric.dumazet@gmail.com>
To: sarveshwar.bandi@emulex.com
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-2.6] bonding: Bonding driver does not consider the gso_max_size/gso_max_segs setting of slave devices.
Date: Wed, 21 Nov 2012 06:55:06 -0800 [thread overview]
Message-ID: <1353509706.2590.33.camel@edumazet-glaptop> (raw)
In-Reply-To: <649de771-427a-4876-af3c-9f84a164a7f1@CMEXHTCAS2.ad.emulex.com>
On Wed, 2012-11-21 at 20:05 +0530, sarveshwar.bandi@emulex.com wrote:
> From: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
>
> Patch sets the lowest gso_max_size and gso_max_segs values of the slave devices during enslave and detach.
>
> Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
> ---
> drivers/net/bonding/bond_main.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index b2530b0..5f5b69f 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1379,6 +1379,8 @@ static void bond_compute_features(struct bonding *bond)
> struct net_device *bond_dev = bond->dev;
> netdev_features_t vlan_features = BOND_VLAN_FEATURES;
> unsigned short max_hard_header_len = ETH_HLEN;
> + unsigned int gso_max_size = GSO_MAX_SIZE;
> + u16 gso_max_segs = GSO_MAX_SEGS;
> int i;
> unsigned int flags, dst_release_flag = IFF_XMIT_DST_RELEASE;
>
> @@ -1394,11 +1396,16 @@ static void bond_compute_features(struct bonding *bond)
> dst_release_flag &= slave->dev->priv_flags;
> if (slave->dev->hard_header_len > max_hard_header_len)
> max_hard_header_len = slave->dev->hard_header_len;
> +
> + gso_max_size = min(gso_max_size, slave->dev->gso_max_size);
> + gso_max_segs = min(gso_max_segs, slave->dev->gso_max_segs);
> }
>
> done:
> bond_dev->vlan_features = vlan_features;
> bond_dev->hard_header_len = max_hard_header_len;
> + bond_dev->gso_max_segs = gso_max_segs;
> + netif_set_gso_max_size(bond_dev, gso_max_size);
>
> flags = bond_dev->priv_flags & ~IFF_XMIT_DST_RELEASE;
> bond_dev->priv_flags = flags | dst_release_flag;
Acked-by: Eric Dumazet <edumazet@google.com>
next prev parent reply other threads:[~2012-11-21 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 14:35 [PATCH net-2.6] bonding: Bonding driver does not consider the gso_max_size/gso_max_segs setting of slave devices sarveshwar.bandi
2012-11-21 14:55 ` Eric Dumazet [this message]
2012-11-21 16:51 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353509706.2590.33.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sarveshwar.bandi@emulex.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox