commit | f5a57723371f11ff953c4ba71184dc00e65469fc | [log] [tgz] |
---|---|---|
author | Eric Dumazet <edumazet@google.com> | Thu Feb 16 15:23:27 2017 -0800 |
committer | David S. Miller <davem@davemloft.net> | Sun Feb 19 18:15:23 2017 -0500 |
tree | 38f76e696c6934a7c0ff3500f9c36bd581ca4d51 | |
parent | 1786dbf3702e33ce3afd2d3dbe630bd04b1d2e58 [diff] |
mlx4: fix potential divide by 0 in mlx4_en_auto_moderation() 1) In the case where rate == priv->pkt_rate_low == priv->pkt_rate_high, mlx4_en_auto_moderation() does a divide by zero. 2) We want to properly change the moderation parameters if rx_frames was changed (like in ethtool -C eth0 rx-frames 16) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>