On Thu, 01 Dec 2016 09:04:17 -0800 Eric Dumazet <eric.duma...@gmail.com> wrote:
> BTW, if you are doing tests on mlx4 40Gbit, I'm mostly testing with mlx5 50Gbit, but I do have 40G NIC in the machines too. > would you check the > following quick/dirty hack, using lots of low-rate flows ? What tool should I use to send "low-rate flows"? And what am I looking for? > mlx4 has really hard time to transmit small TSO packets (2 or 3 MSS) > > diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c > b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c > index 12ea3405f442..96940666abd3 100644 > --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c > +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c > @@ -2631,6 +2631,11 @@ static void mlx4_en_del_vxlan_port(struct net_device > *dev, > queue_work(priv->mdev->workqueue, &priv->vxlan_del_task); > } > > +static int mlx4_gso_segs_min = 4; /* TSO packets with less than 4 segments > are segmented */ > +module_param_named(mlx4_gso_segs_min, mlx4_gso_segs_min, uint, 0644); > +MODULE_PARM_DESC(mlx4_gso_segs_min, "threshold for software segmentation of > small TSO packets"); > + > + > static netdev_features_t mlx4_en_features_check(struct sk_buff *skb, > struct net_device *dev, > netdev_features_t features) > @@ -2651,6 +2656,8 @@ static netdev_features_t mlx4_en_features_check(struct > sk_buff *skb, > (udp_hdr(skb)->dest != priv->vxlan_port)) > features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK); > } > + if (skb_is_gso(skb) && skb_shinfo(skb)->gso_segs < mlx4_gso_segs_min) > + features &= NETIF_F_GSO_MASK; > > return features; > } -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer