On 17.07.2020 22:30, Jakub Kicinski wrote:
On Fri, 17 Jul 2020 18:37:04 +0300 Claudiu Manoil wrote:
+ if (tx_ictt == ENETC_TXIC_TIMETHR)
+ ic_mode |= ENETC_IC_TX_OPTIMAL;
Doesn't seem you ever read/check the ENETC_IC_TX_OPTIMAL flag?
It's used implicitly though ;), as it signals a state change when
the user changes the default value of the tx time threshold,
triggering the device recofiguration with the new value. True that
the said reconfiguration could be also performed in the 'MANUAL' state.
I added the extra state called 'OPTIMAL' to make the code more easier to
follow actually. I mean, it's easy to follow that the tx coalescing
state starts in the "OPTIMAL" mode, w/ the preconfigured "optimal"
value. Then if the user changes the value, doing some manual tuning of
tx-usecs, it moves into the 'MANUAL' mode, returning to the 'OPTIMAL'
mode if the user goes back to the optimal value.
This handling could also be done in the 'MANUAL' mode alone, so if you
want me to make this change pls let me know.
Thanks,
Claudiu