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
| ||
|
Date: Wed, 21 Nov 2012 06:55:06 -0800 From: Eric Dumazet <eric.dumazet@...il.com> To: sarveshwar.bandi@...lex.com Cc: davem@...emloft.net, netdev@...r.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. On Wed, 2012-11-21 at 20:05 +0530, sarveshwar.bandi@...lex.com wrote: > From: Sarveshwar Bandi <sarveshwar.bandi@...lex.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@...lex.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@...gle.com> -- 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