diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-03-28 15:15:38 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-30 10:03:36 -0400 |
commit | 5e6ce1f1a4ca83878f2966dd67afb39b631c4320 (patch) | |
tree | 4b1ebeeac784369b3c7b9be808d0f72735fca711 /drivers/net/ethernet/broadcom/genet/bcmgenet.h | |
parent | a8cdfbdf885f3d3b4940ea31696a4492afd331f7 (diff) |
net: bcmgenet: Fix coalescing settings handling
There were a number of issues with setting the RX coalescing parameters:
- we would not be preserving values that would have been configured
across close/open calls, instead we would always reset to no timeout
and 1 interrupt per packet, this would also prevent DIM from setting its
default usec/pkts values
- when adaptive RX would be turned on, we woud not be fetching the
default parameters, we would stay with no timeout/1 packet per interrupt
until the estimator kicks in and changes that
- finally disabling adaptive RX coalescing while providing parameters
would not be honored, and we would stay with whatever DIM had previously
determined instead of the user requested parameters
Fixes: 9f4ca05827a2 ("net: bcmgenet: Add support for adaptive RX coalescing")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Tal Gilboa <talgi@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/genet/bcmgenet.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h index 22c41e0430fb..b773bc07edf7 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.h +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.h @@ -578,8 +578,6 @@ struct bcmgenet_net_dim { u16 event_ctr; unsigned long packets; unsigned long bytes; - u32 coal_usecs; - u32 coal_pkts; struct net_dim dim; }; @@ -598,6 +596,8 @@ struct bcmgenet_rx_ring { unsigned int end_ptr; /* Rx ring end CB ptr */ unsigned int old_discards; struct bcmgenet_net_dim dim; + u32 rx_max_coalesced_frames; + u32 rx_coalesce_usecs; void (*int_enable)(struct bcmgenet_rx_ring *); void (*int_disable)(struct bcmgenet_rx_ring *); struct bcmgenet_priv *priv; |