liquidio: fix VF driver off-by-one bug when setting ethtool -C ethX rx-frames
authorWeilin Chang <weilin.chang@cavium.com>
Wed, 14 Jun 2017 16:11:31 +0000 (09:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Jun 2017 19:42:20 +0000 (15:42 -0400)
Signed-off-by: Weilin Chang <weilin.chang@cavium.com>
Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c

index 53856af07d46396ddc3ee2d5dbe73fe792f70cb8..28ecda3d34049342b6e58c108dd22679cb4ad8cc 100644 (file)
@@ -1808,7 +1808,7 @@ oct_cfg_rx_intrcnt(struct lio *lio,
                            (octeon_read_csr64(
                                 oct, CN23XX_VF_SLI_OQ_PKT_INT_LEVELS(q_no)) &
                             (0x3fffff00000000UL)) |
-                               rx_max_coalesced_frames);
+                               (rx_max_coalesced_frames - 1));
                        /*consider writing to resend bit here*/
                }
                intrmod->rx_frames = rx_max_coalesced_frames;